One easily shows that that Oτ (P, 1) ⊆ NW(P) ∩ IR(P). Hence, by Lemma A.7 there
exist a set of students CI = {i1, . . . , ip} and a set of schools CS = {s1, . . . , sp} such that
for each ir ∈ CI, sr Pir sr+1 = τ (Q)(ir). This proves (a). Obviously,
∣As(Q)∣ = ∣τ(Q)(s)∣ for any Q ∈ QI. (8)
Hence, by Lemma A.7, for each school s ∈ CS, ∣As(Q)∣ = ∣τ(Q)(s)∣ = qs. Hence, (b)
follows. Since a student is part of exactly 1 cycle, (c) follows. □
For any student ir ∈ CI define Qr := (sr, Q-ir). By Step 1, τ (Q)(ir) = Qir = sr+1
(modulo p). Since Qirr = sr Pir sr+1 and Q ∈ Eτ (P, 1), τ(Qr)(ir) = ir.
Step 2 Let r ∈ {1, . . . , p}. For each s ∈ S\sr+1, ∣As(Qr)∣ = ∣As(Q)∣, and ∣Asr+1(Qr)∣ =
∣Asr+1(Q)∣ - 1.
In view of (8) and ir ∈ τ (Q)(Sr+1), we are done if we prove that for each s ∈ S\sr+1,
τ(Qr)(s) = τ (Q)(s), and τ (Qr)(sr+1) = τ (Q)(sr+1)\ir.
For each school s = sr, sr+1, only the qs (see Step 1(b)) students in τ (Q)(s) list school
s in Qr. Note also that only the qsr+1 - 1 (see Step 1(b)) students in τ (Q)(sr+1)\ir list
school sr+1 in Qr. Since Qr ∈ QI (1) and τ(Qr) ∈ NW (Qr), τ (Qr)(s) = τ (Q)(s) for each
school s = sr. Finally, note that only the qsr + 1 students in τ (Q)(sr) ∪ ir list school sr
in Qr. Since Qrr = sr, τ(Qr)(ir) = ir, and τ(Qr) ∈ NW(Qr), τ(Qr)(sr) = τ(Q)(sr). □
Step 3 For any r ∈ {1, . . . ,p}, Asr(Qr) = Asr(Q).
We are done if we show the following claim.
Claim: For each integer l, we have
[ sr ∈ V(Q, l) if and only if sr ∈ V(Qr, l) ], 1
[ if sr is in a cycle C of G(Q, l) then C is also a cycle of G(Qr, l)], and (9)
[ if sr is in a cycle C of G(Qr, l) then C is also a cycle of G(Q, l)].
Proof of Claim: We distinguish among six cases.
Case 1: l < min{σ(Q, ir), σ(Qr, ir)}. Then, (9) follows from Lemma B.3(a).
Case 2: σ(Q,ir) ≤ l < σ(Qr,ir). Since Qirr = sr and τ(Qr)(ir) = ir, sr ∈ P(Qr,l,ir).
Since σ(Qr, sr) = σ(Qr, ir) - 1, sr ∈ V(Qr, l). By Lemma B.7, sr ∈ V(Q, l) and
F (Q, l, sr) = F (Qr, l, sr) (as directed paths). So, (9) holds.
Case 3: σ(Q, ir) < l = σ(Qr, ir). Since σ(Qr, ir) = σ(Qr, sr) + 1, F(Qr, l - 1, sr) is the
last cycle of sr under TT C(Qr). By Case 2, this is a cycle of sr under TT C(Q). In fact,
41