Question: Apply the sorted edges algorithm to the graph above. Give your answer as a list of vertices, starting and ending at vertex $A$. Example: $ABCDEA$
Graph: top-left $C$ connected to $B$ with weight $3$, to $A$ with weight $2$, to $D$ with weight $15$, and to $E$ with weight $10$; top-right $B$ connected to $A$ with weight $1$, to $E$ with weight $11$, and to $D$ with weight $12$; center-right $A$ connected to $E$ with weight $7$ and to $D$ with weight $5$; bottom-left $D$ connected to $E$ with weight $8$.
1. **State the problem:**
We need to apply the sorted edges algorithm (also known as the greedy algorithm for the Traveling Salesman Problem) to find a Hamiltonian circuit starting and ending at vertex $A$.
2. **List all edges with weights and sort them in ascending order:**
- $BA = 1$
- $CA = 2$
- $CB = 3$
- $AD = 5$
- $AE = 7$
- $DE = 8$
- $CE = 10$
- $BE = 11$
- $BD = 12$
- $CD = 15$
3. **Apply the sorted edges algorithm:**
- Start with the smallest edge $BA = 1$, add edge $A-B$.
- Next edge $CA = 2$, add edge $A-C$.
- Next edge $CB = 3$, adding $B-C$ would create a cycle $A-B-C-A$ too early, so skip it.
- Next edge $AD = 5$, add edge $A-D$.
- Next edge $AE = 7$, adding $A-E$ would create a vertex $A$ with degree 3 (not allowed), so skip it.
- Next edge $DE = 8$, add edge $D-E$.
- Next edge $CE = 10$, adding $C-E$ would create a cycle $C-A-D-E-C$ too early, so skip it.
- Next edges $BE = 11$, $BD = 12$, and $CD = 15$ are skipped because they would create cycles or vertices with degree > 2.
4. **Check the path formed:**
Edges included: $A-B$, $A-C$, $A-D$, $D-E$.
Vertices $B$ and $C$ have degree 1, $A$ has degree 3 (which is invalid for a Hamiltonian circuit), so we must adjust.
5. **Adjust to form a valid Hamiltonian circuit:**
Since $A$ has degree 3, we must remove one edge connected to $A$ and add another edge to connect the graph properly.
Try removing $A-C$ and adding $C-B$:
- Remove $A-C$ (weight 2)
- Add $C-B$ (weight 3)
Edges now: $A-B$, $B-C$, $A-D$, $D-E$
Check degrees:
- $A$: degree 2 ($A-B$, $A-D$)
- $B$: degree 2 ($A-B$, $B-C$)
- $C$: degree 1 ($B-C$)
- $D$: degree 2 ($A-D$, $D-E$)
- $E$: degree 1 ($D-E$)
Still $C$ and $E$ have degree 1, so add edge $E-C$ (weight 10) to connect them:
Edges: $A-B$, $B-C$, $C-E$, $E-D$, $D-A$
6. **Form the circuit:**
Starting at $A$:
$A-B-C-E-D-A$
7. **Final answer:**
The Hamiltonian circuit using the sorted edges algorithm is $ABCDEA$ with the path $A-B-C-E-D-A$.
This path visits every vertex exactly once and returns to the start vertex $A$.