01 · Opening Challenge: Same Campus, Two Missions
Last week the robot inspected every walkway once. Today it must visit every building once and may return to its starting building at the end. Will the old route answer the new question?
Predict: The Week 13 inspection trail L–H–C–G–L–S–H uses every walkway once, but it visits L and H again. It does not meet “visit every building once.” The new mission asks us to track vertices instead of edges.
Same five buildings
Edges or vertices?
Check that rule
Central question
What changes when a route must use each walkway once versus visit each building once? We will also use graphs to represent a separate scheduling problem.
02 · Learning Objectives and Three-Hour Guide
By the end of Week 14, you should be able to recognize a crossing-free drawing; count faces including the outside region and check V−E+F=2 for a simple connected planar drawing; assign time slots as a proper vertex coloring; recognize Hamiltonian paths and cycles on small graphs; and distinguish building-visit routes from walkway-inspection routes.
| Class time | Essential work |
|---|---|
| 35 min | Redraw a crossing graph and count faces |
| 60 min | Hands-on time-slot coloring game and peer explanation |
| 45 min | Hamiltonian paths/cycles on small drawings |
| 40 min | Major Case Study 4 conclusion and route comparison |
Classroom essentials Sections 01–11 and Practice 1–6. Optional self-study The short Python checker and Practice 7. Draw and reason by hand before using a checker.
03 · A Crossing Can Be a Drawing Choice
A graph is planar if it can be drawn so edges meet only at their shared endpoints, with no unintended crossings. A crossing in one sketch does not prove the graph is nonplanar: the same vertices and edges may be redrawn.
The four-cycle has edges AB, BC, CD, DA. The left sketch below crosses two edges; the right sketch keeps exactly the same edge list but has no crossing. The intersection in the first sketch is not a vertex: there is no dot and the edge list contains no junction there.
04 · Count Regions in a Connected Planar Drawing
In a crossing-free drawing, a face is a region bounded by the drawing. Count the unbounded outside region as one face. For a simple connected planar graph, Euler's formula states:
The four-cycle has V=4 vertices and E=4 edges. Its crossing-free square has one inside face and one outside face, so F=2, and 4−4+2=2.
The Week 13 campus drawing
Its five buildings and six walkways form a connected graph drawn without crossings. The drawing has two bounded faces: the triangle L–H–S–L and the remaining region L–S–H–C–G–L. Include the outside face to get F=3. Thus V−E+F=5−6+3=2.
Use this equation as a check after you have a valid simple connected crossing-free drawing. The formula does not make a crossing disappear and does not apply in this stated form to an arbitrary disconnected sketch.
05 · A Time Slot Is a Color
Suppose two examinations share students and therefore cannot run at the same time. Represent each exam by a vertex and each stated conflict by an edge. Give every vertex a time slot, shown as a color. A proper vertex coloring assigns different colors to the two endpoints of every edge.
Vertex
Edge
Color
Nonadjacent exams may share a slot under the stated conflict data. A coloring checks conflicts encoded by edges; if a real conflict was omitted, the schedule could be unsuitable despite being mathematically proper for the incomplete graph.
06 · Five Exams, Six Stated Conflicts
Let exams A, B, C, D and E be distinct tasks. The assumed conflict pairs are AB, AC, BC, CD, DE, EA. Only these six pairs are recorded as conflicts for this exercise. The graph is separate from the campus walkway graph, even though both have five vertices and six edges.
| Exam | Conflicting neighbors | Number of conflicts |
|---|---|---|
| A | B, C, E | 3 |
| B | A, C | 2 |
| C | A, B, D | 3 |
| D | C, E | 2 |
| E | D, A | 2 |
07 · Predict the Minimum, Then Construct a Schedule
Exams A, B and C are pairwise adjacent, so none of them may share a slot with either of the other two. At least three slots are necessary. This is a lower bound: it rules out two slots, but we must still construct a valid three-slot assignment.
| Exam | A | B | C | D | E |
|---|---|---|---|---|---|
| Slot | 1 | 2 | 3 | 1 | 2 |
Now check every edge: AB has 1/2; AC 1/3; BC 2/3; CD 3/1; DE 1/2; EA 2/1. Each conflict has different slots. Three slots suffice. Because two are impossible and three work, the minimum for this graph is exactly 3.
08 · Schedule Studio
Predict → Test → Explain First predict whether two or three slots are necessary. Then assign slots to all five exams. The checker tests each listed conflict and explains any collision. Work with a partner: one proposes a schedule and the other audits every edge.
Part 1 · How many slots at minimum?
Look at triangle A–B–C before selecting.
Part 2 · Build a schedule with slots 1, 2 and 3
Use the conflict list AB, AC, BC, CD, DE, EA. The node colors in the small diagram respond to your choices.
Assign a slot to every exam, then check.
Edge audit appears here after checking.
Printable Schedule Studio
Predict: Can two slots work? _____ Why? __________________________________
Assign Slot 1, 2 or 3 to each exam in the graph with edges AB, AC, BC, CD, DE, EA.
| Exam | A | B | C | D | E |
|---|---|---|---|---|---|
| Your slot | ___ | ___ | ___ | ___ | ___ |
Edge audit: AB ____; AC ____; BC ____; CD ____; DE ____; EA ____. Circle any pair placed in the same slot and revise.
Explain: Why are three slots both necessary and sufficient? ____________________________
09 · Visit Every Vertex Exactly Once
A Hamiltonian path visits every vertex exactly once, with no requirement to use every edge. A Hamiltonian cycle visits every vertex exactly once before returning to its starting vertex. The start appears again only to close the cycle. These ideas ask about vertices; Euler routes ask about edges.
| Route goal | What must appear once? | May other object repeat or remain unused? |
|---|---|---|
| Euler trail | Every edge | Vertices may repeat; no edge remains unused. |
| Hamiltonian path | Every vertex | Some edges may remain unused. |
| Hamiltonian cycle | Every vertex before return | Returns to start; some edges may remain unused. |
There is no direct analogue here of the simple Euler odd-degree test that decides Hamiltonian paths in general. On our small graph, we justify a Hamiltonian route by writing it and checking every consecutive edge and every vertex.
10 · Major Case Study 4 Concludes: Campus Inspection and Delivery Robot
Scenario → Understand → Represent → Reason → Test → Interpret. Continue with the same Week 13 campus graph. Buildings are L,H,C,G,S; walkways are LH, HC, CG, GL, LS, SH. All are two-way and open. The drawing below has no unintended crossings.
Mission A · Inspect every walkway
Degrees are 3,3,2,2,2 at L,H,C,G,S. The connected graph has exactly two odd vertices L and H. An open Euler trail is L–H–C–G–L–S–H; it uses all six edges once. It revisits buildings, and it cannot be a closed Euler circuit.
Mission B · Visit every building
A Hamiltonian path is L–S–H–C–G. It visits L,S,H,C,G exactly once through walkways LS, SH, HC, CG. A Hamiltonian cycle is L–S–H–C–G–L; it uses LS, SH, HC, CG, GL and returns to L. The walkway LH is unused in both building-visit routes, which is allowed for this mission.
Interpret the robot's decision
The robot can satisfy each task on its own, but the written routes certify different requirements. An inspection trail may revisit a building; a building-visit cycle may leave a walkway uninspected. Travel times, directions, closures and battery constraints have not been modelled. We have exhibited routes for this specific small graph, not a universal Hamiltonian test.
11 · One Graph, Two Precise Decisions
| Question | Valid route | Verification |
|---|---|---|
| Inspect each walkway once? | L–H–C–G–L–S–H | Six different edges used; L and H are odd endpoints. |
| Visit each building once? | L–S–H–C–G | Five distinct buildings visited; four walkways used. |
| Visit each building, then return? | L–S–H–C–G–L | Five distinct buildings before return; LH unused. |
The Euler degree test supports the first question for connected graphs. It does not decide the second or third question. For the campus case we verify the Hamiltonian routes directly from the named edge list.
12 · Optional Colab: Check a Proposed Schedule
Self-study · mathematics first Construct and audit a three-slot coloring on paper. Then use a short checker for the six stated conflict edges. This cell reuses Week 13's dictionary of keys and values and an already familiar for loop.
conflicts = [("A", "B"), ("A", "C"), ("B", "C"),
("C", "D"), ("D", "E"), ("E", "A")]
slot = {"A": 1, "B": 2, "C": 3, "D": 1, "E": 2}
for left, right in conflicts:
print(left, right, slot[left] != slot[right])
Each pair in conflicts is one edge. slot[left] looks up that exam's assigned slot. != asks whether two conflicting exams have different slots. Predict six True results. Change slot["D"] to 3 and predict which edge prints False before running again.
This code checks the supplied assignment against the listed conflicts. It does not find an optimal schedule or detect conflicts absent from the input.
13 · Practice and Case Submission
Justify answers with the relevant graph and state which object is being counted or visited.
- Redraw the four-cycle with edges AB, BC, CD, DA without crossings. Count V, E and F including the outside region; check Euler's formula.
- On the campus graph, list its two bounded faces and the outside face. Verify V−E+F=2.
- For conflicts AB, AC, BC, CD, DE, EA, explain why two slots are impossible. Give and check a three-slot assignment.
- A proposed schedule is A=1, B=2, C=3, D=3, E=2. Identify every conflicting pair sharing a slot and repair the schedule by changing D alone, if possible.
- For the campus graph, write a Hamiltonian path and a Hamiltonian cycle. State one edge each route leaves unused.
- Explain why L–H–C–G–L–S–H meets the Week 13 inspection requirement but is not a Hamiltonian path.
- A connected graph has two odd-degree vertices. A classmate concludes it cannot have a Hamiltonian cycle. Explain why the inference is invalid; use the campus graph as a counterexample.
Major Case Study 4 submission
Using the same L,H,C,G,S graph from Weeks 13–14, submit the two route questions, the edge list, degree reasoning for the inspection task, explicit verified routes for both tasks, the face check, and one paragraph explaining which unmodelled conditions could affect a real robot. State that the Euler degree test applies only to the edge task.
14 · Common Mistakes
| Tempting move | Repair |
|---|---|
| Declare a graph nonplanar because one sketch has crossings. | Try a different drawing while preserving the same vertices and edges. |
| Count only bounded regions in Euler's formula. | Include the unbounded outside face. |
| Use V−E+F=2 on any disconnected sketch. | This week's form assumes a simple connected planar drawing. |
| Give conflicting exams the same slot. | Check every edge's endpoints, not only the triangle. |
| Call a proper three-slot assignment “minimum” without a reason. | The triangle proves at least three; the assignment proves at most three. |
| Use the Euler odd-degree test to decide Hamiltonian routes. | The degree test concerns every edge; inspect vertex visits separately. |
15 · Summary
- A graph is planar if some drawing has no unintended edge crossings. A crossed sketch can sometimes be redrawn.
- For a simple connected planar drawing, count the outside face and check V−E+F=2.
- A proper vertex coloring gives adjacent vertices different colors. In the exam model, adjacent exams cannot share a time slot.
- A Hamiltonian path visits every vertex once; a Hamiltonian cycle returns to its start after visiting every vertex once. Edges may remain unused.
- The campus graph has an open Euler inspection trail and a Hamiltonian building-visit cycle. Each route answers its own precise question.
16 · Visual Concept Map
17 · Looking Ahead
Week 15 studies rooted trees and the order in which their vertices can be visited. A tree is a special graph, but its traversal task will ask for a specified visit order rather than an Euler or Hamiltonian route.
Selected Solutions
Schedule Studio
Two slots fail because A, B and C conflict pairwise. One valid coloring is A=1, B=2, C=3, D=1, E=2. Audit AB: 1/2, AC: 1/3, BC: 2/3, CD: 3/1, DE: 1/2, EA: 2/1. All six conflicting pairs have different slots. Therefore exactly three slots are required.
1 · Redrawing a cycle
Draw A–B–C–D–A as a square. It has V=4,E=4,F=2 (one inside, one outside); 4−4+2=2.
2 · Campus faces
The bounded triangle L–H–S–L, the bounded region L–S–H–C–G–L, and the outside give F=3. With V=5,E=6, 5−6+3=2.
3–4 · Time slots
The A–B–C triangle forces three distinct slots; the assignment in Schedule Studio proves three suffice. In A=1,B=2,C=3,D=3,E=2, CD is the sole conflict (C and D both in Slot 3). Changing D to Slot 1 repairs it: CD becomes 3/1 and DE becomes 1/2.
5 · Building visits
L–S–H–C–G is a Hamiltonian path and leaves LH and GL unused. L–S–H–C–G–L is a Hamiltonian cycle and leaves LH unused.
6 · Inspection versus visit
L–H–C–G–L–S–H uses LH, HC, CG, GL, LS, SH exactly once. It repeats L and H, so it is not a Hamiltonian path.
7 · Invalid inference
The campus graph has odd-degree vertices L and H, so it has no Euler circuit. Yet L–S–H–C–G–L is a Hamiltonian cycle. The Euler degree test cannot rule it out.