cs-144 — Two Paths, One Post
| Field | Value |
|---|---|
| id | cs-144 |
| difficulty | Foundational |
| topics | communication, requirements, assumptions |
| lecture | lecture-03 |
| estimated time | 5-minute attempt + 10-minute discussion |
| prerequisites | none |
| objective | read two conflicting requirement claims, locate the decision each needs, and draw the flowchart that serves both |
| solution | held by the instructor; discussed after the attempt |
Problem
The careers office wants an automated reply for internship posts. Two staff members wrote requirement notes:
- Staff A: "If the applicant lists any programming language, send the technical info sheet."
- Staff B: "Anyone who lists only beginner tools (spreadsheets) must get the foundation sheet — my interns keep asking for basics."
The office holds exactly three info sheets: technical, foundation, general. The current draft flowchart sends technical for anyone who mentions anything at all, foundation never, and general only when the application is empty.
Your deliverables:
- The conflict between A and B stated in one sentence: which input makes them disagree, and what does each want?
- The one clarifying question that resolves it — phrased so either answer changes the flowchart.
- A corrected flowchart (boxes and arrows, on paper) for the three sheet types covering every input class: empty application, lists a programming language, lists only beginner tools.
- One input class your flowchart handles that neither staff note mentioned.
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: the two requirement notes, the three sheet types
- Output: the disagreement identified (applications listing a language and only-beginner-tools is impossible; the conflict is 'lists something non-language, non-tool'), one question, one flowchart, one extra input class
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
- Requirements written by two people almost always leave a gap class — an input neither note covers — and a flowchart must route every class, not just the named ones.
- "Lists any programming language" and "lists only beginner tools" are decision predicates; the flowchart needs them in a computable form (what exactly counts as a "language"?).
- The empty application is the simplest class and the most often forgotten — handle it explicitly.
Discussion starter
After the solution is revealed, the class spends five minutes on this prompt: "A third sheet arrives: portfolio for applicants listing a project link. Which box of your flowchart changes, and does any arrow reverse?"
Constraints and assumptions
- Difficulty: Foundational (requirements reading + flowchart drawing).
- Topics: communication, requirements, assumptions.
- Each application is classified by exactly one rule path; the sheets are fixed and known.
- Classroom-scale inputs unless the problem says otherwise.
- Time-box: about five minutes for a first attempt; partial answers with clear reasoning are worth more than silent struggling.
- Optional stretch (not required): describe an alternative approach and say when it beats the obvious one.
Hints and extension
- First nudge: enumerate the input classes first — the flowchart is easy once the classes are complete.
- 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: write the two predicates ("is a programming language", "is a beginner tool") as testable rules over a short list, and name the input string that breaks each rule.