Skip to main content

Polya Framework Workshop

Retrieval Prompts

  1. State Polya's four phases from memory, in order.
  2. What are the three questions of the understanding phase?
  3. What does a good plan include that "trying things" does not?
  4. What is a margin ledger and what does it catch?
  5. What four questions structure the looking-back phase?

Compare and Distinguish

Separate these pairs clearly:

  • understanding a problem versus reading it carefully
  • devising a plan versus writing the solution
  • verifying the answer versus verifying the argument
  • re-reading a solution versus looking back at it

Common Mistake Check

For each situation, identify which Polya phase was skipped or executed poorly:

  1. "I got the wrong answer, so I started the whole problem over."
  2. "The proof looks right but I cannot explain why step 4 follows from step 3."
  3. "I started writing code immediately because the problem looked like the last one."
  4. "My answer passes the sample input but fails on the hidden tests."
  5. "I solved it but I have no idea where this technique would apply next."

Mini Application: Full Polya Block

Pick any of these problems and produce a full Polya block in writing:

  1. prove that the sum of the first n positive odd integers is n^2
  2. show that in any sequence of n+1 distinct integers chosen from 1..2n, two of them are consecutive
  3. given an array of integers and a target sum, find any pair that sums to the target in O(n) time
  4. prove that every connected graph has a spanning tree
  5. show that there are infinitely many primes

For the chosen problem, write:

  • Understand: restatement, inputs, outputs, constraints, tiny example
  • Plan: related problem, heuristic, subgoal, success criterion
  • Execute: the solution with a margin ledger on every step
  • Look back: verification, argument audit, alternative, transfer note

Plan-vs-Execution Triage

For each failed attempt below, decide whether the failure was in the plan or the execution, and what the next step should be:

  1. you are trying to prove f(n) = O(n log n) by induction and the inductive step produces a k log k + log n term you cannot bound
  2. you are solving a DP and the table is filling up but the answer at table[n] is off by a constant
  3. you are proving "the graph is bipartite" but every small example you try contains an odd cycle
  4. your sorting algorithm works on the examples but exceeds the time limit on the hidden tests

Evidence Check

This page is complete only if you can produce a full four-phase block, in writing, on a fresh problem without prompting.

Integrated Problem-Solving Drill

Use a different heuristic for each problem below: bottom-up examples, top-down decomposition, analogy, stepwise refinement, divide-and-conquer intuition, and pattern spotting.

  1. Given a list of numbers, design a method to decide whether any two sum to 0.
  2. Explain how you would count valid schedules when two tasks cannot be adjacent.
  3. Find a strategy for debugging a function that fails only on empty input and one-element input.
  4. Break down a feature request: "let users reserve tables at a restaurant and receive confirmation."
  5. Spot the pattern in the sequence 1, 3, 6, 10, 15 and justify the next two terms with a diagram or story.
  6. Compare binary search to looking up a word in a dictionary; state where the analogy helps and where it breaks.

Evidence check: at least one answer must include a failed first approach and a revised plan. The goal is visible reasoning, not just the final solution.