cs-059 — The Committee Draw
| Field | Value |
|---|---|
| id | cs-059 |
| difficulty | Intermediate |
| topics | combinations, probability |
| lecture | lecture-15 |
| estimated time | 5-minute attempt + 10-minute discussion |
| prerequisites | loops, lists, and tracing from lectures 1-6 |
| objective | choose the technique, trace it faithfully, and defend the boundary behaviour |
| solution | held by the instructor; discussed after the attempt |
Problem
From 6 CS and 4 DS students, a 4-person committee must include at least one of each programme. Count compositions; then compute the probability a random draw satisfies it.
Your deliverable is the count (or probability) with the sample space stated, the case analysis, and a brute-force check for a small instance. If the problem is ambiguous anywhere, state the assumption you are making and carry on — a stated assumption is part of a good answer.
Examples
- Input: 6 CS, 4 DS; committee of 4 with at least one of each programme
- Output: total C(10,4)=210; all-CS C(6,4)=15; all-DS C(4,4)=1; valid 210-16 = 194
Solve for the worked instance first. Then ask what would change if one number, name, or condition were replaced by something stranger.
What to notice
- Complement again: 'at least one of each' = total minus 'single-programme only'.
- 'How many total, how many favourable' is the whole skeleton of probability.
- Complements turn hairy unions into one subtraction.
Discussion starter
After the solution is revealed, the class spends five minutes on this prompt: "When is enumeration a legitimate answer rather than a crutch?"
Constraints and assumptions
- Difficulty: Intermediate (loops and lists assumed).
- Topics: combinations, probability.
- Classroom-scale inputs unless the problem says otherwise.
- Time-box: about five minutes for the plan and trace; finishing the details is a bonus, defending the method is the target.
- Optional stretch (not required): describe an alternative approach and say when it beats the obvious one.
Hints and extension
- First nudge: identify the pattern the worked instance uses before computing anything.
- If stuck after three minutes, write the input/output line you expect and trace the smallest example by hand.
- After the reveal, attempt the extension below before the next lecture.
- Extension challenge: Re-derive the count with a different method and reconcile the answers.