cs-115 — The Exam Gambler
| Field | Value |
|---|---|
| id | cs-115 |
| difficulty | Intermediate |
| topics | simulation, strategy |
| lecture | lecture-29 |
| 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
MCQ exam: guess vs leave blank with negative marking. Simulate strategies over many papers; find the break-even knowledge level.
Your deliverable is the simulation result with trials and spread, the one-trial story, and the comparison with exact reasoning. 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: 40 questions, 4 options each; +1 correct, -0.25 wrong; guess-all vs leave-blank
- Output: guess-all EV = (1/4)(+1) + (3/4)(-0.25) = +0.0625 per question — the marking was calibrated so blind guessing is near-neutral; with partial knowledge (one option eliminated) EV = +0.1667 per question, so guessing wins once you can rule something out
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
- Compute EV per question for each strategy; the break-even is where elimination knowledge changes the sign.
- A simulation is only as good as the story of one trial.
- Error shrinks like 1/sqrt(trials) — quadruple the work, halve the error.
Discussion starter
After the solution is revealed, the class spends five minutes on this prompt: "How many trials would you demand before believing a 1-in-1000 event estimate?"
Constraints and assumptions
- Difficulty: Intermediate (loops and lists assumed).
- Topics: simulation, strategy.
- 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: Halve and double the trial count; report how the estimate wobbles.