--- source: knowledge_base topic: discrete_math class_level: class_11 difficulty: advanced --- Discrete Mathematics: Permutations: P(n,r)=n!/(n-r)!. Combinations: C(n,r)=n!/(r!*(n-r)!). GCD(a,b)=GCD(b,a mod b). LCM(a,b)=a*b/GCD(a,b). Modular: a≡b(mod n) means n divides (a-b). Fermat's Little: a^(p-1)≡1(mod p) for prime p. De Morgan: NOT(A AND B)=NOT(A) OR NOT(B).