Bifalgorithm post · Brisk · Chapter 1
What are the three basic situations behind most counting problems?
What are the three basic situations behind most counting problems? (Brisk · Chapter 1) — "Most of the time, counting problems all boil down to a variation of o…
Ideas in this flowchart
- Most counting problems reduce to one of three basic situations.
- The three basic counting situations
- n^k: k different things each have n completely independent choices.
- n!/(n-k)!: choose an ordered sequence of k different things from n without repeats.
- n!: the special case of n!/(n-k)! when k = n.
- (n choose k): choose k different things from n when order does not matter.
- To identify the applicable situation, analyze the counting problem carefully.
- Ask whether repeated values are allowed.
- Ask whether the order of the values matters.
- Determining which situation applies is often subtle.
