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

Unit 5 separate explained answers

Unit 5 explained answers · unfinished learning resource · TMP-SCI-074. Attempt the Unit 5 tasks first. These explanations support correction and changed-case practice; they are not externally calibrated grades. A correct route must use actual edges/arcs, and a claimed shortest route needs a lower-bound argument as well as a route witness. Different valid predecessor choices are acceptable unless a tie order was specified. No search output certifies a real-world route or approval.

Readiness

R1. The unordered pairs are {a,b},{a,c},{b,c}. Swapping entries does not change an unordered pair, but (a,b) and (b,a) differ as ordered pairs. An undirected edge ab must not be counted again as ba.

R2. Coverage ensures every carrier element belongs somewhere; disjointness ensures it does not belong to two distinct blocks. For example {{1,3},{2,4}} is a partition. Overlapping reachability groups could not be separate equivalence classes.

R3. The negation is “Some vertex cannot be reached from s.” On a complete finite specification, exhibit a set containing s and closed under neighbors, together with a vertex outside it. Every walk starting inside stays inside, so the outside vertex is unreachable. Merely failing to find a route is not yet proof of absence.

R4. Each incidence belongs to one edge, and each edge contributes exactly two incidences, so incidences partition into six groups of two. The explicit two-endpoint convention justifies this count. It does not permit dividing an arbitrary list of neighbor mentions if some are missing or duplicated.

Guided practice

G1. In a,b,c,d,e,f order, matrix rows are 011000, 101000, 110100, 001010, 000100, 000000. Their 1-counts are 2,2,3,2,1,0, totaling ten. Each edge contributes the two symmetric entries for its endpoints, so there are five edges. The zero row/column for f preserves the isolated vertex.

G2. The first proposed degree sum is nine, odd, contradicting the handshaking identity. The second sum is ten, so that test passes, but three degree-3 vertices on a four-vertex carrier must each join the last vertex. Its degree would then be three, not one. Use the carrier size and required adjacencies, not only parity.

G3. Original odd vertices are c (degree three) and e (degree one). Adding ef changes e from one to two and f from zero to one, leaving c and f odd. All other degrees stay fixed. The graph becomes connected because ef joins the isolated f to the other component; parity alone is not that proof. Disjoint triangles in I2 show evenness of the odd-vertex count with disconnection.

G4. a,b,c,a is a length-three walk, trail, closed walk and cycle, but not a path under the no-repeated-vertex convention. a,c,a,b is a length-three walk, not trail/path/cycle: ac repeats, and endpoints differ. a,c,d,e is a length-three path and trail, not closed or a cycle. f alone is a length-zero path/trail/walk and is closed because its endpoints coincide, but is not a cycle. No edge is required to remain at the starting vertex. “Closed walk” is broader than “cycle.”

G5. L₀={d}, L₁={c,e}, L₂={a,b}. Distances d:0,c:1,e:1,a:2,b:2; f is unreachable. Choose c←d,e←d,a←c,b←c. The discovered set {a,b,c,d,e} has all listed neighbors inside it; f is outside and isolated. This complete adjacency check certifies the negative result.

G6. Edge ac joins proposed levels zero and two, violating the at-most-one difference condition. Correct levels are a:0,b:1,c:1,d:2,e:3; f remains outside the component. The walk a,b,c,d,e has length four, but the edge ac allows a,c,d,e of length three. A route gives an upper bound on distance, not proof that no shorter route exists.

Independent practice

I1. V={p,q,r,s}; E={pq,pr,qr}. Degrees 2,2,2,0; components {p,q,r} and {s}. Matrix rows are 0110,1010,1100,0000. Omitting s would leave a connected triangle, changing the carrier and the answer rather than simplifying a harmless drawing.

I2. Six-cycle edges: 12,23,34,45,56,61. Two-triangle edges: 12,23,31,45,56,64. Both have degree two at all six vertices and six edges. In the first, following the cycle reaches every vertex; in the second, {1,2,3} and {4,5,6} are separately neighbor-closed and internally reachable. Thus the component counts are one and two. Equal degree lists do not determine connectedness.

I3. a,b,c,a,d,e,a is a closed walk and trail of length six; every displayed edge occurs once. It is not a path, and it is not a cycle because a repeats internally before the final return. a,b,c is a length-two path/trail/walk. b,d is not a walk because bd is absent. The edge lists, not an imagined connection through a, determine consecutive-step validity.

I4. Layers are {s}, {a,b}, {c}, {d}, {t}; z is unreachable. With alphabetical scans, parents a←s,b←s,c←a,d←c,t←d. A shortest path is s,a,c,d,t of length four. The other is s,b,c,d,t. There are exactly two: every t-arrival uses dt; reaching d uses cd without a needless repetition; the only length-two ways from s to c are via a and via b. Closure of {s,a,b,c,d,t} under the complete neighbor lists, with z outside, certifies unreachability.

I5. An even total degree sum cannot contain exactly one odd summand alongside only even summands. Therefore the odd-degree count is even. This is necessary, not sufficient: the list 3,3,3,1 has four odd entries and even sum but is impossible on four simple vertices for the reason in G2. Distinguish a theorem's conclusion from its converse.

I6. Connectedness gives a walk, which can be shortened to a path by deleting repetitions. A path uses at most |V| distinct vertices and therefore at most |V|−1 edges. When the two endpoints coincide, the length-zero path satisfies the bound for nonempty V. No spanning tree or shortest-path algorithm is needed for this proof.

I7. The whole carrier is one weak component: forgetting direction gives p—q—r—s. Strong classes are {p,q} and {r,s}. p↔︎q and r↔︎s give mutual routes within each. There is an arc q→r but no arc or route back from {r,s} to {p,q}, so the classes do not merge. Distances from p are p:0,q:1,r:2,s:3. From s they are s:0,r:1 and p,q unreachable. Outdegrees p,q,r,s are 1,2,1,1; indegrees are 1,1,2,1. Both totals are five, the arc count. Counts of distinct endpoints are not arc totals.

I8. Use levels s:0,a:1,b:1,c:2,d:3,t:4 and parents from I4. Each parent is adjacent and one level lower; every edge spans adjacent levels. The outside vertex z has no boundary edge to the discovered set. These facts prove shortest distances and unreachability. If c is relabelled three while a,b stay one, edges ac and bc violate the level-edge bound, and c's parent is no longer one level lower. Name a failed condition rather than merely saying the number looks wrong.

Homework

H1. Reflexivity: the length-zero walk at x. Symmetry: reverse a walk, valid because undirected edges can be traversed both ways. Transitivity: concatenate an x-to-y walk with a y-to-z walk, joining at y. The result is a walk, even if vertices repeat. If one insists on a path result, invoke the earlier deletion proof to shorten the concatenation; concatenated paths need not themselves be paths. Equivalence classes are therefore well-defined connected components, not overlapping ad hoc groups.

H2. The predecessor route proves distance at most four. It does not exclude distance three or less. In K, a,b,c,d,e is length four but a,c,d,e is length three. A valid BFS-layer argument establishes that e first appears at layer three and all shorter reachability has already been exhausted. Alternatively use levels 0,1,1,2,3: parent paths give upper bounds, edge-level differences ≤1 give lower bounds along every walk. Both directions are required to claim equality with distance.

H3. Edges ab and bc guarantee mutual reachability among a,b,c in the undirected model. They do not establish d is unreachable because unspecified additional edges may connect it. Completion E={ab,bc} gives two components; E={ab,bc,cd} gives one. Both satisfy “at least” the given edges. A negative boundary certificate requires knowing there are no additional edges crossing the proposed boundary. Do not replace missing information with a zero.

Quiz answers and anchors

Four points per item, maximum 24. These are formative reasoning anchors, not a validated pass policy.

Q1. Impossible: the degree sum is 17, odd. Alternatively four degree-4 vertices on five vertices force the fifth to join all four, contradicting degree one. Points: decisive theorem/condition 1, exact numerical or adjacency contradiction 2, clear rejection 1. Either complete argument suffices; do not require both.

Q2. 3·2+4+2d=2·7 gives d=2. Arithmetic alone supplies necessary conditions, not a realization. A separate realization can be built: a degree-four vertex u adjacent to a,b,c,d, plus ea,eb,cd, on six vertices u,a,b,c,d,e. Every other vertex then has degree two and there are seven edges. That construction, not the equation alone, establishes existence for this list. Points: equation 1, d 1, necessary/sufficient distinction 2; the construction is optional enrichment.

Q3. Layers {a}, {b,c}, {d}; e unreachable. Two shortest routes, a,b,d and a,c,d, both length two. Points: layers 2, unreachable 1, routes/count 1. The edge list is complete, so the isolated e is known rather than guessed.

Q4. a,b,d,c,a is a cycle/closed trail/walk of length four, not a path under this unit's convention. a,b,a is a closed walk of length two, not a trail/path/cycle because it repeats the same undirected edge and a vertex. e is a length-zero path/trail/closed walk, not a cycle. Points: first classification 1; second 1; zero-length case 1; correct lengths 1.

Q5. Strong components {a,b,c} and {d}. The directed triangle supplies mutual routes among a,b,c; d has no outgoing arc, so cannot return. The underlying undirected graph is connected, so the graph is weakly connected but not strongly connected. Points: strong classes with witnesses 2, weak answer 1, strong answer/reason 1.

Q6. The result minimizes edge count: one edge instead of two. It does not minimize total weight; nine exceeds two plus three, which is five. Points: criterion 1, calculation 1, distinction 2. Calling it “wrong” without specifying the objective misses the issue. Weighted optimization has not been taught here.

Project P1 explained audit

(a) Original undirected packet

Adjacency lists: A:B,C; B:A,C,D; C:A,B,E; D:B,E,F; E:C,D,F; F:D,E; G:H; H:G.

Degrees A through H are 2,3,3,3,3,2,1,1. Sum18 gives nine edges, agreeing with the unique edge list. Odd-degree vertices are B,C,D,E,G,H, six in total. Components are {A,B,C,D,E,F} and {G,H}. Routes A–B, A–C, A–B–D, A–C–E and A–B–D–F reach every vertex in the first. GH connects the second. All specified edges have endpoints within one of these two sets, proving no route crosses between them. No vertex is isolated, yet the graph is disconnected.

(b) Search and certificate

Layers from A: {A}, {B,C}, {D,E}, {F}; G,H unreachable. Alphabetical FIFO parent trace: B←A,C←A,D←B,E←C,F←D. When E later encounters F, the first discovery remains unchanged. Distances are A0,B1,C1,D2,E2,F3.

The shortest A-to-F paths are exactly A,B,D,F and A,C,E,F. A length-three path must reach D or E at length two because those are F's only neighbors; the only length-two route from A to D is through B and to E through C. The DE edge cannot yield another length-three route, because it adds a step between layer-two vertices.

For the certificate, every selected parent is one level lower. AB,AC,BD,CE,DF,EF connect consecutive levels; BC and DE lie within a level. Therefore all edge-level differences are ≤1. No edge leaves {A,…,F}; G,H are outside it. Parent chains prove route existence of the indicated length, the level constraint proves no shorter walk, and closure proves unreachable status.

(c) Add FG to the undirected packet

F's degree rises from two to three, G's from one to two. The total degree becomes20 and there are ten edges. Odd vertices are now B,C,D,E,F,H: again six, but connectedness follows from FG joining the former components, not that parity check.

Layers become {A},{B,C},{D,E},{F},{G},{H}. The old distances stay unchanged; G has distance four and H five. One shortest route is A,B,D,F,G,H; the route through C,E is another. Any A-to-H path must traverse FG and GH because these are the only ways into G,H from the original first component. This supplies the lower-bound explanation. No time, fare or accessibility conclusion is supplied by hop count.

(d) Directed models

For the ORIGINAL nine arcs, outdegrees A through H are 2,2,1,2,1,0,1,0. Indegrees are 0,1,2,1,2,2,0,1. Both total nine. The weak components remain {A,B,C,D,E,F} and {G,H}. Every arc goes forward in the alphabetical ordering, so no directed cycle can return to a distinct earlier vertex. Strong components are all eight singleton sets.

A can reach A,B,C,D,E,F; its shortest distances are 0,1,1,2,2,3 in that order. It cannot reach G,H. F reaches only itself: it has no outgoing arc. Forgetting directions would falsely suggest F could return to A.

Now add F→B to this directed model only. The strong classes become {A}, {B,C,D,E,F}, {G}, {H}. To prove the large class, use B as a hub: B reaches C directly, D directly, E through C or D, and F through D. Each of C,D,E,F reaches B via F (C→E→F→B; D→F→B; E→F→B; F→B). Concatenation gives mutual routes between any two members. No vertex in this class can reach A because A has no incoming arc. G,H are in a separate weak component and H cannot return to G. Hence no larger strong class is possible. The added arc raises F outdegree and B indegree by one, making both totals ten.

(e) Claim audit

  1. “No isolated vertices means connected” fails in the original packet: all degrees are positive, but {G,H} has no edge to the other six. Correct statement: each vertex has a neighbor; connectedness requires a route between every two vertices.
  2. “The predecessor route is the only shortest route” fails for original A-to-F: A,B,D,F and A,C,E,F both have length three. The trace stores one witness, not all shortest routes. A different tie policy may select a different witness without changing distances.
  3. “Weak connectivity proves a one-way return journey” fails within the original directed weak component {A,…,F}: A reaches F but F reaches no distinct vertex. Correct statement: weak connectivity permits a path only after ignoring direction; a directed return needs outgoing-arc reachability evidence.

(f) Honest ledger example

Claim checked: “FG makes the original graph strongly connected.” Issue: the original model is undirected, while strong connectivity was introduced for directed models. Evidence: its declared edge convention and the separate one-way experiment. Repair: FG makes the original undirected graph connected. Retain the separate directed result that adding F→B creates the strong class B–F but does not include A. Changed test: a single arc x→y is weakly connected and lacks a return route. Remaining limit: a formal model says nothing about whether a real connection is available or authorized.

A learner who never made that error can instead record a justified retained claim and independently check it. Do not invent a mistaken first draft. Correctly separating the three models is part of the mathematical result, not just formatting.

Project rubric anchors

Award correct subarguments their relevant points while identifying missing premises. An invalid edge sequence, wrong direction or incomplete negative certificate requires correction; other arithmetic does not repair that inference. No grade is stored and no total demonstrates course completion.

Delayed transfer

D1. Initial strong classes are {Draft}, {Check,Revise}, {Release}, {Archive}. Check↔︎Revise gives their mutual route; no route returns from Release or reaches Draft from another vertex. Weak components are {Draft,Check,Revise,Release} and {Archive}. Distances from Draft: Draft0,Check1,Revise2,Release2; Archive unreachable. Draft→Check→Release is a shortest-hop route.

Adding Release→Archive joins the two weak components, and Archive becomes reachable from Draft in three hops through Release. Existing distances stay the same. Strong classes do not change because Archive has no outgoing arc and creates no return route. A listed transition is a model possibility, not evidence that anyone executed it, possessed approval authority or checked factual correctness. Distinguish an available sequence from an observed approved process.