Combinatorial mathematics:
1. Principle of addition: class independence; Multiplication principle: Step-by-step correlation.
2. Arrangement combination: http://www.cnblogs.com/PegasusWang/archive/2013/01/22/2872312.html
3. Recurrence Relationship: http://www.cnblogs.com/skyme/p/3541863.html
Arithmetical:
1, Prime and division of the problem: familiar with the concept can be.
2, the binary bit: master the conversion between the system
3, the same comodule operation: here we introduce the following three formulas:
(a+b) mod n = ((a mod n) + (b mod n)) mod n;
MoD n = ((a mod n)-(b mod n) +n) mod n;
AB mod n = (a mod n) (b mod n) mod n
Note that in subtraction, because a mod n may be less than B mod N, you need to add N to the result, and in multiplication you need to be aware that a mod n and b mod n multiplication will overflow, so be careful to save the intermediate result with a long type.
Mathematics in the algorithm