Math mind map

Number theory, combinatorics, and arithmetic tricks.

Core idea: Replace simulation with an invariant, identity, or cycle.

Mnemonic: Model → reduce → prove · Cost: Shrink work with structure

Reduce: GCD, primes & factors

Signal: The property is divisibility or repeated common structure.

Move: Use Euclid, sieve candidates once, or enumerate factors only through the square root.

Examples: Greatest Common Divisor, Count Primes, Fraction Addition

Cycle: Modular arithmetic

Signal: Numbers grow huge or states repeat on a fixed clock.

Move: Reduce after each operation; exponentiate by squaring and detect repeated remainders.

Examples: Pow(x,n), Super Pow, Clock Cycles

Bits: XOR & masks

Signal: Boolean membership, cancellation, or a compact subset state fits in bits.

Move: Use XOR for paired cancellation and masks for set, test, and enumerate operations.

Examples: Single Number, Missing Number, Subset Masks

Digits: Base & combinatorics

Signal: The answer follows carry, digit extraction, or direct counting.

Move: Use divmod for representation; count arrangements instead of generating them when possible.

Examples: Add Strings, Happy Number, Pascal Triangle

Every mind map