A-I 305 · Exam 2

Wed Nov 4 · 8–10 pm · 103 ECoRE · closed book, no notes, no calculator, no cheat sheet

What's on it (official guidance, Nov 4)

20 points: 7 problems worth 15 points together, and 10 MCQs worth 5. Six problems come from DPV ch 4, 5 and 6 (the HW3/HW4 topics), one from ch 3. Of the MCQs, 5 are Poole–Mackworth ch 4–5 and 5 are DPV. The Nov 4 lecture is a review with more ch 3–6 exercises: go, because Exam 1 reused a lecture exercise.

PartCountPriorityLesson
Ch 4 · shortest paths2 problemstop2 · Shortest paths
Ch 5 · greedy2 problemstop3 · Greedy
Ch 6 · dynamic programming2 problemstop4 · DP
Ch 3 · DFS1 problemmedium1 · DFS / SCC
MCQs (5 PM ch 4–5, 5 DPV)10 · 5 ptslowerProfessor's deck questions · 5 · MCQ concepts
HW3 + HW4in scopetop (repeats likely)HW solutions

Ch 4, 5 and 6 are 6 of the 7 problems. Spend most of your time there. Ch 3 is one problem. It can be a hand trace (like Exam 1's DPV 3.3) or a modeling question (like the practice exam's 3.7 and 3.8).

What Exam 1 taught us

The real Exam 1 didn't look like the posted practice exam. The practice exam was mostly prove/disprove questions. The real one was:

So for Exam 2, the best targets are, in order: (1) HW3/HW4 problems, (2) DPV Ch 3–6 hand traces with alphabetical tie-breaks (3.4, 4.1, 4.2, 5.1, 5.2, 5.13/5.14), (3) exercises the professor solved in class (4.3, 4.8, 4.15, 4.18, Quiz 6, knapsack table, edit distance, weighted intervals), (4) MCQs from the professor's review decks and the Poole–Mackworth ch 4–5 slides.

Most likely problems, ranked

SlotMost likelyAlso prepare
Ch 3 (1)DPV 3.4 SCC trace (DFS on GR, SCC order, source/sink SCCs, edges to add) or a modeling question like practice 3.7 and 3.8: vertex = state, edge = move, run DFS/BFS.DPV 3.2 edge classification (tree/forward/back/cross), 3.1; HW3 P1, P3, P4
Ch 4 (2)A Dijkstra table (DPV 4.1, solved in Lecture 18) + a "modify Dijkstra" design (4.15 usp, 4.18 best, count shortest paths)Bellman–Ford table (4.2), Quiz 6 (3-vertex graph where Dijkstra fails), 4.8 (adding a constant fails), 4.3 squares, HW3 P6 (time-dependent), HW3 P7 (currency, −log r)
Ch 5 (2)An MST trace (DPV 5.1: cost, # MSTs, Kruskal order + cuts; or 5.2: Prim table) + Huffman or a greedy proofHW4 P2 (is e in the MST?), P3 (D&C MST counterexample), P4 (greedy party counterexample), P5 (40% ⇒ 1-bit code); 5.9 true/false; fractional knapsack exchange argument; Horn formulas
Ch 6 (2)Fill a DP table (0/1 knapsack as in Lecture 28, or edit distance/LCS) + design a DP (subproblem, recurrence, order, runtime)HW4 P6 (rod cutting with cut cost), HW4 P7 (hotels = DPV 6.2), 6.1 max contiguous sum, 6.3 Yuckdonald's, weighted interval scheduling, LIS
10 MCQsPoole–Mackworth ch 4 (CSPs, arc consistency) and ch 5 (propositions, bottom-up/top-down proofs)Heaps, hash tables, union-find, greedy vs DP facts, DFS/BFS/Dijkstra facts

Plan for today, in order (about 4½ hours)

Check items off as you go (saved in this browser). Try each card before you open the answer. Skip anything you already get right.

Exam technique

Sources: Canvas lecture notes, review decks, HW3/HW4, Exam 1 and its solutions, DPV ch 3–6. Trace answers were computed by a script, not by hand.