Unfinished learning resource · Units 1–8 available · Whole-course validation unfinished

Unit 6 separate explained answers

Unit 6 explained answers · unfinished learning resource · TMP-SCI-074. Attempt the Unit 6 tasks first. A model proof is one defensible route, not a demand for identical wording. Each construction must use original edges, retain the entire carrier and justify its invariant. Finite checks do not replace the general proofs. Formative points are not calibrated course grades or evidence of competence.

Readiness

R1. {ab,bc,ca} is a triangle plus isolated d: disconnected and cyclic. {ab,bc,cd} is a connected path and acyclic. Both have n=4,m=3; the count alone does not distinguish them. Acyclicity can be checked directly by noting no route can close without reusing an edge in the path.

R2. A path uses distinct vertices, hence at most |V| vertices and |V|−1 edges. A walk can revisit vertices/edges, so this bound does not apply to all walks. In a tree, repeated backtracking still gives long walks without a graph cycle.

R3. The sum of degrees is twice the number of edges, so six edges imply degree sum twelve. This implication does not itself prove that the graph is a tree or has six edges; those are premises to be checked separately.

R4. Each predecessor step lowers the nonnegative integer distance by one, so it cannot return to an earlier vertex at its former distance. It ends at the source. A BFS started in one component may omit other components; predecessor evidence for reached vertices cannot certify those outside it are reached.

Guided practice

G1. Unique T paths: d,b,a,c,f and d,b,e. Adding ef creates cycle e,b,a,c,f,e. Two simple d-to-f paths are d,b,a,c,f and d,b,e,f. The new graph is connected but no longer a tree. The cycle's edge ef was absent originally; repeating an already-present simple edge would not add a distinct edge under the convention.

G2. Remove e and be: carrier {a,b,c,d,f}, edges ab,ac,bd,cf. Existing remaining vertices keep their simple paths because leaf e was never an internal vertex. No cycle is introduced by deletion, so it is a tree. Counts change from six vertices/five edges to five/four. Removing b and its three incident edges instead leaves a,c,f connected by ac,cf but isolates d and e: three components on five remaining vertices. Arbitrary vertex deletion does not preserve the induction hypothesis.

G3. Deleting internal b disconnects the graph, so the remaining object is not a tree. It also removes three edges, not the one edge needed in the induction step. The correct proof selects a degree-one leaf, proves the remainder connected and acyclic, applies induction there and restores exactly one edge. A general graph can sometimes be analyzed componentwise, but that would require a different stated argument.

G4. One trace: remove bc using current cycle a,b,c,a. Remaining edges ab,ac,bd,cd still contain cycle a,b,d,c,a; remove cd. Final edges ab,ac,bd form a connected acyclic spanning tree. Removing ab and ac merely from their membership in the original triangle is unsafe: after both removals the remaining edges bc,bd,cd form a triangle on b,c,d and a is isolated. After ab is removed, ac is no longer a cycle edge in the current graph. The current witness, not historical membership, licenses each deletion.

G5. Start S={a}; select ab, giving {a,b}; select ac, giving {a,b,c}; select bd, giving all four vertices. At each step choose the alphabetically first inside/outside pair. Final tree is {ab,ac,bd}. Its a-to-d distance is two through b, equal to original distance two (there is no ad edge). But original b-to-c distance is one while the selected tree uses b,a,c of length two. A coinciding source example is not a general preservation theorem.

G6. Adding ef creates cycle e,b,a,c,f,e. Deleting ac gives edges ab,bd,be,cf,ef, still connected and acyclic. For example a reaches c through b,e,f. Deleting bd instead isolates d, since bd was d's only incident edge and is not on the cycle. The original cycle remains. Both changed graphs have five edges on six vertices, but only the first is a tree; connectedness cannot be omitted.

Independent practice

I1. Singleton: tree, n=1,m=0,c=1, and 0=1−1. Two isolated vertices: non-tree forest, n=2,m=0,c=2. Four-vertex path: tree, n=4,m=3,c=1. Triangle plus isolated vertex: cyclic, n=4,m=3,c=2; the forest formula is inapplicable and indeed 3≠4−2. Do not infer a component count from n−m when acyclicity has not been established.

I2. In a connected tree with n≥2, no vertex is isolated; every nonleaf therefore has degree at least two. If L is the number of degree-one vertices, the degree sum is at least L+2(n−L)=2n−L. The tree edge theorem gives total 2n−2. Therefore 2n−2≥2n−L, so L≥2. The proof uses the already-established edge theorem, whose earlier proof used longest paths; it is an alternative consequence, not the original noncircular justification. The singleton has L=0 and is excluded.

I3. Let D be the number of degree-two vertices and H the set with degree at least three. Since n≥2 and the tree is connected, these plus the L leaves exhaust vertices. Write n=L+D+|H| and 2n−2=L+2D+Σ_H deg(v). Substitution/cancellation gives L=2+Σ_H(deg(v)−2). For two degree-three vertices and one degree-four vertex, L=2+1+1+2=6, regardless of the number of degree-two vertices. The formula does not describe rooted childless leaves when the root is itself a graph leaf.

I4. Growth: start a; add b via ab, c via ac, d via bd, e via de. Each step attaches a new vertex by one edge, giving tree {ab,ac,bd,de}. Different deletion result: remove ab using triangle a,b,c,a; then remove bc using the still-present triangle b,c,d,b. Remaining edges ac,bd,cd,de connect all five vertices, with four edges, so form a tree. The deletion proof ensures connectedness throughout. Both are spanning because neither construction removes a vertex or uses an edge outside the original list.

I5. c=n−m=11−7=4. Isolated vertices are permitted. For example components of sizes 1,2,3,5, each built as a path or singleton, contribute 0+1+2+4=7 edges. The arithmetic does not identify a unique component-size pattern; it only fixes the component count for a forest.

I6. The unique new cycle is p,q,r,s,p. Delete any one of pq,qr,rs,ps to get the four possible spanning trees contained in this four-cycle, each a path on all four vertices. Deleting no edge leaves the cycle and four edges on four vertices, so it is not a tree. Here every spanning tree omits exactly one cycle edge; this conclusion is specific to the supplied graph, not a count for arbitrary graphs.

I7. Root p: parents q←p,r←q,s←r; depths p0,q1,r2,s3; rooted leaves {s}; graph leaves {p,s}. Root q: parents p←q,r←q,s←r; depths q0,p1,r1,s2; rooted leaves {p,s}; graph leaves still {p,s}. Rerooting changes descriptions, not edges or graph degrees. Using the added cycle would invalidate the unique-parent-path definition.

I8. Triangle G={ab,ac,bc}; choose root a and tree {ab,bc}. It changes a-to-c distance from one to two, so an arbitrary spanning tree need not preserve root distances. A BFS tree from a is {ab,ac}; it preserves the root distances a0,b1,c1, but changes b-to-c distance from one to two. The second failure is all-pairs preservation, not failure of BFS's actual source-distance guarantee.

Homework

H1. By the cycle-deletion existence proof, a finite nonempty connected graph G has a spanning tree T, constructed without any edge-count characterization. By leaf-removal induction, T has n−1 edges. If G also has n−1, then E(T)⊆E(G) and their finite cardinalities are equal, so E(T)=E(G). Their vertex sets are already equal by spanning. Thus G=T and is a tree. The spanning construction never assumed connected+n−1 implies tree; it maintained connectedness while deleting cycle edges until acyclic.

H2. The missing hypothesis is that the result is a forest, supplied when the original graph is a tree and one edge is deleted. For a counterexample, take five vertices with a triangle abc and disjoint edge de. It has n−1=4 edges but is not a tree. Delete de; the result has n−2=3 edges and three components (triangle, d, e), not two. For a tree, deletion preserves acyclicity, so m=n−c applies and c=n−(n−2)=2. The conclusion follows from acyclicity plus count, not count alone.

H3. If a nonempty proper S has no edge to its complement in a complete specification, every walk starting in S stays there. The graph is disconnected, and selecting fewer edges cannot connect it; no spanning tree of all V exists. A partial observation cannot certify the absence of crossing edges: an unobserved edge might join the sets. Keep “not supplied/unknown” distinct from “known absent.” The bounded construction can report the missing information rather than fabricate a connection.

Quiz key and formative anchors

Each item has four points. Different sound arguments are acceptable. No external grading reliability or pass threshold is implied.

Q1. Yes: connected plus n−1 edges is a tree characterization for finite nonempty simple undirected graphs. A spanning tree subset has seven edges, so it exhausts the graph's seven edges. Count alone is insufficient, as a triangle plus a path on five other vertices gives eight vertices and 3+4=7 edges but is disconnected/cyclic. Points: conclusion/hypotheses1; valid justification2; count-alone distinction1.

Q2. m=n−c=10−3=7. Each component contributes nᵢ−1; a singleton contributes zero exactly as required. Points: formula1; arithmetic1; component argument1; singleton handling1.

Q3. L=2+(4−2)=4. All other nonleaf vertices have degree two and contribute zero to the formula. n≥2 and connectedness rule out degree-zero vertices and justify the leaf/nonleaf partition. Points: value1; formula application2; hypothesis1.

Q4. Unique path a,b,d,e. Adding ae creates cycle a,b,d,e,a. Deleting bc afterward isolates c and does not remove an edge of that cycle, so the result is not a spanning tree. Points: path1; cycle1; isolation/current-cycle reasoning2.

Q5. With root c, b's parent is c and its children are a,d. d has child e. Rooted leaves are a,e; c has graph degree one but is not a rooted leaf because its child is b. Points: parent/children2; rooted leaves1; distinction1. The root has no parent, not necessarily no children.

Q6. Two already-reached endpoints have a unique selected path while the selected graph is a tree; adding a new edge between them closes a cycle. An edge with both endpoints outside does not attach either endpoint to the selected connected subgraph; adding it creates a separate component. The safe rule is exactly one reached and one unreached endpoint. Points: cycle argument2; outside-disconnection1; correct rule1.

Project P1 explained construction and audit

(a) Selected backbone

A growth trace starts {A}, then adds B by AB, C by AC, D by BD, E by BE, F by CF and G by FG. Every addition uses an original edge and introduces exactly one new vertex. Connectedness and acyclicity persist, so the final T is a spanning tree. Independently, the listed paths from A reach every vertex and T has six edges on seven vertices; the proved connected+n−1 characterization confirms it.

Degrees A,B,C,D,E,F,G are 2,3,2,1,1,2,1. Sum12 equals twice six edges. Graph leaves are D,E,G. The leaf formula gives 2+(3−2)=3, because only B has degree at least three. This checks the explicit list; it does not replace proof that T is a tree.

(b) Added edges and current deletion witnesses

Add BC to T alone: unique cycle B,A,C,B. Add DE alone: unique cycle D,B,E,D. Add EF alone: unique cycle E,B,A,C,F,E. Each uses the unique old endpoint path plus its new edge. Adding all three at once creates a different graph with several cycles; the one-edge theorem does not say it has one cycle.

A legal deletion trace from original G to T removes BC using B,A,C,B; removes DE using D,B,E,D; removes EF using E,B,A,C,F,E. None of these cycles relies on the previously removed BC or DE, so the stated witnesses exist at each step. All seven vertices remain and connectivity is preserved. Final edges are exactly T. Other legal traces may exist; match each step to its current graph.

(c) A cut and a changed original graph

Deleting CF from T gives components {A,B,C,D,E} and {F,G}. Within the first, A–B–D, A–B–E and A–C supply connections; FG connects the second. No selected T edge crosses after CF is removed. The original G edges crossing this cut are exactly CF and EF. Replace CF with EF to obtain tree {AB,AC,BD,BE,EF,FG}. It joins the two tree components by one edge, so is connected and cannot introduce a cycle across that cut; the six-edge count gives another certificate.

If BOTH CF and EF are removed from original G, no crossing edge remains. The changed original graph has the same two components, so no spanning tree of all seven vertices exists. A spanning forest is {AB,AC,BD,BE,FG}, with five edges: four for the five-vertex component and one for the two-vertex component. Formula n−c=7−2=5 agrees. The changed graph itself still has cycles within its first component; the forest is a selected subgraph, not the entire changed edge set.

(d) Roots and distances

Root A: parents B←A,C←A,D←B,E←B,F←C,G←F. Depths A0,B1,C1,D2,E2,F2,G3. Rooted leaves D,E,G, matching graph leaves here because root A is not degree one.

Root D: parents B←D,A←B,E←B,C←A,F←C,G←F. Depths D0,B1,A2,E2,C3,F4,G5. Rooted leaves E,G; graph leaves remain D,E,G. D is now a degree-one root with a child, not a childless rooted leaf.

Original G has edge EF, so E-to-F distance is one. In T the unique route is E,B,A,C,F, length four. The spanning tree preserves all vertices and undirected reachability, but not all original route choices or shortest distances. This particular T also matches a BFS parent tree from A; preserving A-distances still does not promise E-to-F distance preservation.

(e) Claim audit

  1. “Six edges proves it is a tree” needs hypotheses. On seven vertices, a triangle plus a disjoint four-vertex path also has six edges but is disconnected and cyclic. T is a tree because connectedness is established in addition to the count, or because its growth invariant establishes both properties.
  2. “Every tree edge is a bridge in the original graph” confuses T with G. Every selected edge is a bridge of T. But CF is on the original cycle C,A,B,E,F,C and can be deleted from G without losing connectedness. FG, by contrast, is a bridge of G because G has degree one at vertex G. The relevant graph must always be named.
  3. “Any spanning tree is the best network” supplies no criterion or evidence. The unit's weighted triangle shows a valid spanning tree can cost more than another when weights are supplied. This packet supplies none. Moreover T lengthens E-to-F travel in hop count. A useful correction states the proved guarantee: a connected acyclic spanning subgraph with n−1 edges, not a universal optimum or real-world service recommendation.

(f) Honest ledger example

Claim checked: “Removing CF destroys all possible connections between F,G and the other vertices.” Evidence: original G also has EF, crossing the same cut. Repair: removing CF disconnects selected T, but original G remains connected via EF. Changed test: remove both CF and EF from G; now the complete edge list has no crossing edge, so disconnection is certified. Retained limit: these are statements about supplied fictional edges, not observed operational availability.

If the initial claim already named T correctly, record a justified retention and the contrasting G check rather than invent an error. Explain how the changed example tests the distinction between a selected subgraph and its original graph.

Project rubric anchors

Partial credit should track correct subarguments. A wrong carrier, invented crossing edge or circular proof requires explicit repair; unrelated arithmetic cannot establish the missing claim. No total certifies semester completion.

Delayed transfer

D1. The four non-Archive vertices form a cycle; Archive is isolated. No spanning tree of all five exists because there are two components. A spanning forest can select Draft–Check, Check–Review, Review–Release and leave Archive isolated: three edges, matching n−c=5−2.

Add Review–Archive. A spanning tree is Draft–Check, Check–Review, Review–Release, Review–Archive: four edges and all five vertices connected. Root Archive: Review's parent is Archive; Check and Release have parent Review; Draft has parent Check. Depths Archive0,Review1,Check2,Release2,Draft3. The labels do not turn undirected edges into permitted workflow directions. A formal tree certifies the mathematical model's connectivity and unique simple paths, not execution, approval authority or content correctness.