Solution

ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2021/discrete-mathematics-continuous-mathematics-and-probability/8/a/iv/solution

The red positions form a uniformly chosen subset of size , so there are equally likely colour patterns. A contiguous red block can start at positions , giving exactly favourable patterns. Therefore
If the cards are regarded as individually labelled, each colour pattern corresponds to permutations, so the same counting argument still applies. In the edge case , the formula correctly gives probability one.

New to topics? Read the docs here!