Definition 1.1.1. Vertex.
A vertex (also called a node) is a fundamental unit of a graph representing an object or entity. In this book, vertices will be labeled using letters.
| Vertex | Capital city |
| A | Dublin |
| B | Lisbon |
| C | Madrid |
| D | Paris |
| E | Brussels |
| F | Amsterdam |
| G | Berlin |
| H | Copenhagen |
| I | Stockholm |
| J | Warsaw |
| K | Prague |
| L | Vienna |
| M | Budapest |
| N | Rome |
| O | Athens |
| Vertex in \(G\) | Image in \(H\) |
|---|---|
| \(A\) | \(T\) |
| \(B\) | \(P\) |
| \(C\) | \(V\) |
| \(D\) | \(Q\) |
| \(E\) | \(U\) |
| \(F\) | \(R\) |
| \(G\) | \(S\) |



| From | To | Cost |
|---|---|---|
| Kansas City | Denver | $272 |
| Kansas City | Minneapolis | $194 |
| Kansas City | Chicago | $249 |
| Kansas City | Nashville | $466 |
| Denver | Minneapolis | $247 |
| Denver | Chicago | $250 |
| Denver | Nashville | $462 |
| Minneapolis | Chicago | $137 |
| Minneapolis | Nashville | $410 |
| Chicago | Nashville | $345 |
| Edge | Cost | Action | Reason |
|---|---|---|---|
| M–C | $137 | Add | Cheapest available |
| K–M | $194 | Add | Cheapest available |
| D–M | $247 | Skip | Would give M degree 3 |
| K–C | $249 | Skip | Would create early circuit K–M–C–K |
| D–C | $250 | Add | Connects D to component |
| K–D | $272 | Skip | Would create early circuit K–M–C–D–K |
| C–N | $345 | Skip | Would give C degree 3 |
| M–N | $410 | Skip | Would give M degree 3 |
| D–N | $462 | Add | Connects final vertex N |
| K–N | $466 | Add | Closes the circuit |
| K | C | M | D | N | O | A | |
|---|---|---|---|---|---|---|---|
| K | — | 249 | 194 | 272 | 466 | 576 | 127 |
| C | 249 | — | 137 | 250 | 345 | 312 | 130 |
| M | 194 | 137 | — | 247 | 410 | 430 | 147 |
| D | 272 | 250 | 247 | — | 462 | 451 | 125 |
| N | 466 | 345 | 410 | 462 | — | 552 | 284 |
| O | 576 | 312 | 430 | 451 | 552 | — | 423 |
| A | 127 | 130 | 147 | 125 | 284 | 423 | — |
| Step | Current | Move to | Cost |
|---|---|---|---|
| 1 | K | A | $127 |
| 2 | A | D | $125 |
| 3 | D | M | $247 |
| 4 | M | C | $137 |
| 5 | C | O | $312 |
| 6 | O | N | $552 |
| 7 | N | K | $466 |
| Edge | Cost | Action | Reason |
|---|---|---|---|
| A–D | $125 | Add | Cheapest available |
| K–A | $127 | Add | Cheapest available |
| C–A | $130 | Skip | Would give A degree 3 |
| M–C | $137 | Add | Cheapest available |
| M–A | $147 | Skip | Would give A degree 3 |
| K–M | $194 | Add | Joins two chains |
| D–M | $247 | Skip | Would give M degree 3 |
| D–C | $250 | Skip | Would create early circuit |
| K–D | $272 | Skip | Would give K degree 3 |
| N–A | $284 | Skip | Would give A degree 3 |
| C–O | $312 | Skip | Would give C degree 3 |
| C–N | $345 | Add | Extends chain to N |
| D–O | $451 | Add | Connects O to chain |
| O–N | $552 | Add | Closes the circuit |
| Store A | Store B | Store C | Store D | Store E | |
|---|---|---|---|---|---|
| Store A | — | 25 | 15 | 45 | 10 |
| Store B | 25 | — | 20 | 30 | 20 |
| Store C | 15 | 20 | — | 25 | 30 |
| Store D | 45 | 30 | 25 | — | 35 |
| Store E | 10 | 20 | 30 | 35 | — |
| Island A | Island B | Island C | Island D | Island E | |
|---|---|---|---|---|---|
| Island A | — | 2 | 4 | 3 | 5 |
| Island B | 2 | — | 1 | 4 | 6 |
| Island C | 4 | 1 | — | 2 | 3 |
| Island D | 3 | 4 | 2 | — | 7 |
| Island E | 5 | 6 | 3 | 7 | — |
| Edge | Cost | Action | Vertices Connected |
|---|---|---|---|
| B–C | 1 | Add | {B, C} |
| C–D | 2 | Add | {B, C, D} |
| A–B | 2 | Add | {A, B, C, D} |
| C–E | 3 | Add | {A, B, C, D, E} — Done! |
| Plant | Town A | Town B | Town C | Town D | Town E | |
|---|---|---|---|---|---|---|
| Plant | — | 15 | 20 | 18 | 22 | 25 |
| Town A | 15 | — | 10 | 12 | 14 | 30 |
| Town B | 20 | 10 | — | 16 | 13 | 17 |
| Town C | 18 | 12 | 16 | — | 11 | 19 |
| Town D | 22 | 14 | 13 | 11 | — | 9 |
| Town E | 25 | 30 | 17 | 19 | 9 | — |
| Edge | Cost | Action | Reason |
|---|---|---|---|
| D–E | 9 | Add | Cheapest available |
| A–B | 10 | Add | Cheapest available |
| C–D | 11 | Add | Cheapest available |
| A–C | 12 | Add | Joins A–B chain to C–D–E chain |
| B–D | 13 | Skip | Would create circuit A–B–D–C–A |
| A–D | 14 | Skip | Would create circuit A–C–D–A |
| Plant–A | 15 | Add | Connects Plant — spanning tree complete |
