Day 70 — Gate VI
Day 70 — Gate VI
Stage VI · gate day
Goal: Demonstrate graph literacy: definitions, handshaking, connectivity, trees, BFS/DFS, DAGs/topo, Dijkstra sketch, bipartite/matching lite, Euler/Hamilton awareness, coloring/planarity culture, and CS modeling. Required: model + handshaking + tree check + BFS levels + DAG topo + one bipartite/matching + shortest path numbers on a tiny weighted graph.
Why this matters
Capstone work needs one solid graph model of a CS-ish situation. This gate certifies you can build and analyze such models under mild time pressure—definitions, structure, algorithms, and modeling together.
How to take this gate
- Timebox ~100–130 minutes optional.
- Closed notes first pass.
- Every modeling item needs the Day 69 writeup template.
- Score with rubric; remediate below-threshold sections within 48h.
No coding labs. Hand-simulate algorithms with tables. Proofs short and complete.
Rubric
| Section | Points | Pass bar |
|---|---|---|
| A Definitions | 15 | ≥ 11 |
| B Structure (degree, paths, trees) | 20 | ≥ 14 |
| C Algorithms (BFS/DFS/topo/Dijkstra) | 25 | ≥ 18 |
| D Advanced awareness | 15 | ≥ 10 |
| E Modeling portfolio | 25 | ≥ 18 |
| Total | 100 | ≥ 75, no section < 50% |
Theory — rapid self-check
Reproduce from memory:
- Simple undirected graph; directed graph.
- Handshaking lemma + odd-degree corollary.
- Walk / trail / path / cycle.
- Connected component; distance; diameter.
- Tree TFAE (at least 3 characterizations).
- BFS shortest hops; DFS disc/fin idea.
- DAG ⇔ topological order exists.
- Dijkstra needs nonnegative weights.
- Bipartite ⇔ no odd cycle; matching; Hall statement.
- Euler circuit iff all even degrees; Hamilton hard.
- \(\chi\ge\omega\); planar ⇒ \(\chi\le 4\).
- Modeling checklist.
Gate exam (closed book)
Section A — Definitions (15)
Write precise definitions (≈2 pts each):
- Simple undirected graph \(G=(V,E)\).
- Degree; handshaking lemma.
- Path vs cycle.
- Connected component.
- Tree (two equivalent definitions).
- DAG and topological order.
- (Bonus) Proper vertex coloring; \(\chi(G)\).
Section B — Structure (20)
- Degrees \(3,3,2,2,2,2\): number of edges? Possible simple? Number of odd-degree vertices?
- Prove number of odd-degree vertices is even.
- Connected graph on 9 vertices with 9 edges: must it contain a cycle? Why?
- Forest: 15 vertices, 4 components: edges?
- Distance and diameter of \(C_6\).
- Unique path property: state and use to show a given small graph is/is not a tree.
- Directed: in- and out-degree sums equal \(|E|\)—prove in one line.
Section C — Algorithms (25)
Use this undirected graph unless stated:
Vertices \(S,A,B,C,T\). Edges: \(S{-}A,S{-}B,A{-}B,A{-}C,B{-}C,B{-}T,C{-}T\).
Neighbor order: alphabetical.
- BFS from \(S\): discovery order, dist, parents; list levels.
- DFS from \(S\) (alphabetical): discovery order, parents (disc/fin optional but good).
- Is the graph bipartite? Justify (odd cycle?).
- Directed version: orient every edge toward the alphabetically later endpoint; compute a topological order or show a cycle.
- Weights: \(SA=2,SB=5,AB=1,AC=4,BC=1,BT=3,CT=1\). Dijkstra from \(S\) to \(T\): final dist and path.
- Kahn: on DAG with arcs \(A\to C,B\to C,C\to D,A\to D\)—full in-degree trace and one topo order.
Section D — Advanced awareness (15)
- Euler: does \(K_4\) have an Eulerian circuit? Eulerian trail?
- Hamilton: does \(K_{2,3}\) have a Hamiltonian cycle? Path?
- State Dirac’s sufficient condition (no proof).
- \(\chi(C_5)\) and \(\chi(K_4)\); why planar \(K_4\) needs 4 colors.
- Hall: give bipartite example with no matching saturating left side.
- Four color theorem: one-sentence statement.
- Planarity: why \(e\le 3v-6\) kills \(K_5\).
Section E — Modeling portfolio (25)
E1 (12 pts). Model one of the following fully (template + analysis):
- Package dependencies among 6 packages with at least one diamond dependency and a question about install order / cycle.
- Package dependencies among 6 packages with at least one diamond dependency and a question about install order / cycle.
- Exam scheduling for 5 courses with a given conflict list; find \(\chi\) or bound it.
- Exam scheduling for 5 courses with a given conflict list; find \(\chi\) or bound it.
- Job–machine bipartite assignment with Hall check.
E2 (8 pts). Shortest-path or MST modeling in one paragraph + tiny numeric instance you invent (≤5 vertices).
E3 (5 pts). In one short paragraph: contrast Euler vs Hamilton on a street-vs-city tour for a municipal robot.
Answer key (self-mark)
8. Sum 14 ⇒ 7 edges; two odds; yes graphic (e.g. nearly regular).
9. Handshaking ⇒ sum even ⇒ even # odds.
10. Yes: tree would need 8 edges; 9 edges ⇒ cycle.
11. \(|E|=n-c=11\).
12. diam \(C_6=3\).
13. Tree ⇔ unique path between any pair.
14. Each arc contributes 1 to exactly one in and one out sum.
15. Order \(S,A,B,C,T\); \(d\): S0 A1 B1 C2 T2; parents \(A,B\leftarrow S\), \(C\leftarrow A\), \(T\leftarrow B\) (alpha). Levels: {S},{A,B},{C,T}.
16. Depends on alpha DFS—e.g. \(S,A,B,C,T\) tree edges along deep path—accept consistent tables.
17. Has triangles \(SAB\), \(ABC\)—odd cycles—not bipartite.
18. Orient \(S\to A,S\to B,A\to B,A\to C,B\to C,B\to T,C\to T\): DAG; topo e.g. \(S,A,B,C,T\).
19. \(d(T)=5\); path \(S{-}A{-}B{-}C{-}T\).
20. Start in-deg A0 B0 C2 D2; emit A,B then C then D; orders \(A,B,C,D\) or \(B,A,C,D\).
21. \(K_4\) all deg 3: no Euler circuit; 4 odds: no Euler trail.
22. No Hamilton cycle (unequal parts); yes Hamilton path.
23. \(n\ge 3\), \(\deg\ge n/2\) all \(v\) ⇒ Hamilton cycle.
24. \(\chi(C_5)=3\); \(\chi(K_4)=4\); clique of size 4.
25. e.g. three left vertices only into two right vertices.
26. Every planar graph is 4-colorable.
27. \(K_5\): \(n=5,m=10>9=3\cdot5-6\).
E1–E3. Grade by template completeness and correctness of analysis.
Remediation map
| Weak | Rework |
|---|---|
| A defs | Days 59–60 |
| B structure | 59–61 |
| C algorithms | 62–64 |
| D advanced | 65–67 |
| E modeling | 68–69 |
Required skills checklist (Gate VI mandate)
- At least one full model (E1)
- Handshaking used correctly (B)
- Tree edge-count / cycle check (B10–11 or 13)
- BFS levels table (C15)
- DAG topo or Kahn (C18 or C20)
- Bipartite and/or matching (C17 or D25 or E1-iii)
- Dijkstra numbers on tiny weighted graph (C19)
Portfolio reflection (after scoring)
Write 5–10 lines:
- Strongest graph skill?
- Weakest?
- Modeling mistake you nearly made?
- Ready for number theory / crypto stage?
Checkpoint
- Full exam closed book
- Score ≥ 75 with no section < 50%
- All mandate checklist boxes ticked
- Misses redone cold within 48h
- Three model writeups saved from Day 69 + Gate
- Reflection written
Two personal takeaways:
- …
- …
Deepening notes
Closed-book sketch sheet (write blank)
- Handshaking; tree \(|E|=n-1\)
- BFS dist table; Dijkstra table
- Kahn in-degrees
- Hall one line; Euler degrees; Dirac one line
- \(\chi\ge\omega\); four color; \(m\le 3n-6\)
- Modeling template headers
Full BFS answer (G1) reference
Discovery: \(S,A,B,C,T\).
\(d(S)=0,d(A)=d(B)=1,d(C)=d(T)=2\).
Parents: \(A\leftarrow S,B\leftarrow S,C\leftarrow A,T\leftarrow B\) (alpha).
Levels: \(L_0=\{S\},L_1=\{A,B\},L_2=\{C,T\}\).
Full Dijkstra reference
After processing \(S,A,B,C,T\): \(d=(0,2,3,4,5)\); path \(S{-}A{-}B{-}C{-}T\).
Extra gate items for rematch
R1. Havel–Hakimi \((3,3,2,2,2)\).
R2. Spanning trees of \(C_5\).
R3. Hall fail with \(|L|=4\).
R4. Critical path 5 tasks.
R5. \(\chi\) of conflict \(C_5\).
R6. Euler trail construction two odds.
R7. Model git merge DAG topo.
R8. Negative Dijkstra counterexample table.
48h remediation
| Score band | Action |
|---|---|
| ≥75 | Light review Stage VII prep |
| 60–74 | Redo weak section + 5 drills |
| <60 | Rework Days 59–69 summaries |
Stage VI exit criteria
- Gate ≥75, no section <50%
- Mandate checklist complete
- Model template fluent
- Dijkstra + BFS tables cold
- Euler vs Hamilton one-liner
- Tree characterizations listed
Extended practice battery (rematch)
Battery 1 — Structure
- Degrees \(5,3,3,3,2,2\): edges? Possible?
- Prove handshaking in two sentences.
- \(n=10\), connected, \(|E|=10\): cycle?
- Forest \(n=14\), \(|E|=10\): components?
- Diameter of \(P_7\) and \(K_{1,6}\).
Battery 2 — Algorithms
- BFS table on a path of 6 vertices from an end.
- DFS disc/fin on a binary tree shape (3 levels).
- Kahn on \(W\to X,W\to Y,X\to Z,Y\to Z\).
- Dijkstra: triangle \(s,a,t\) weights \(sa=4,st=9,at=3\)—dist \(s\) to \(t\).
- Negative counterexample: one-paragraph table.
Battery 3 — Advanced + modeling
- Euler status of \(K_{3,3}\).
- Hamilton path in \(K_{2,4}\)?
- Hall: \(L\) size 3 all to same 2 in \(R\)—violating \(S\).
- \(\chi(C_6)\), \(\chi(K_5)\).
- Model: “install plugins with depends” template.
- Model: “min latency route with weights” template.
- Euler vs Hamilton for museum corridor robot.
- Tree check: unique path on a graph you draw.
- Spanning trees of \(C_7\).
- Four color statement + one planar \(\chi=4\) example.
Partial solutions
- Sum 18 ⇒ 9 edges; two odds—OK possible.
- Yes cycle (\(|E|\ge n\)).
- \(c=n-|E|=4\).
- \(6\); \(2\).
- Path \(s{-}a{-}t\) weight \(7\).
- Deg 3,3,3,3,3,3—all odd: six odds—no Euler trail.
- Yes (start in size 4).
- \(S=L\).
- \(2\); \(5\).
- \(7\).
Confidence map
| Topic | Color |
|---|---|
| Handshaking / degrees | |
| Paths / connectivity | |
| Trees / Cayley / MST idea | |
| BFS / DFS | |
| DAG / topo / critical path | |
| Dijkstra / BF | |
| Bipartite / matching / Hall | |
| Euler / Hamilton | |
| Color / planar | |
| CS modeling |
Final Stage VI portfolio contents
- Gate exam with scores
- Three model writeups (Day 69 + E1)
- One Dijkstra table
- One BFS table
- One Kahn trace
- One Hall success + fail
- Confidence map
Archive before Stage VII (number theory / crypto).
Remediation map (Stage VI)
| Weak area | Return to |
|---|---|
| Degrees / handshaking / HH | Day 59 |
| Walks / connectivity / bridges | Day 60 |
| Trees / Cayley / MST idea | Day 61 |
| BFS / DFS | Day 62 |
| DAG / topo / critical path | Day 63 |
| Dijkstra / BF | Day 64 |
| Bipartite / Hall / matching | Day 65 |
| Euler / Hamilton | Day 66 |
| Coloring / planar awareness | Day 67 |
| CS modeling catalog | Day 68 |
| Modeling writeups | Day 69 |
Gate VI self-score rubric
| Criterion | Weight |
|---|---|
| Correct graph model (\(V\), \(E\), directed/weight) | High |
| Correct algorithm/theorem named | High |
| Simulation table accuracy (BFS/Dijkstra/Kahn) | High |
| Proof sketch (handshaking, tree TFAE, Hall setup) | Medium |
| Complexity awareness (poly vs hard) | Medium |
Post-gate checklist
- Scored each problem
- Confidence map shaded
- Yellow/red topics: 2 reworked problems each
- Portfolio artifacts listed above complete
- One-page Stage VI formula/algorithm sheet from memory
Synthesis
Stage VI built graphs from degrees through paths, trees, search, DAGs, shortest paths, bipartite structure, Euler/Hamilton, coloring, and CS modeling. Gate VI tests definitions + simulations + model choice. Stage VII leaves graphs for number theory: divisibility, modular arithmetic, and crypto culture—counting and graphs remain tools, not the main track.
Tomorrow
Day 71 — Divisibility: primes, gcd culture shift into Stage VII number theory foundations.