# 第 8054 題：切換一條邊的有號度差

[返回所在分頁 41](https://ocme.evemisslab.com/zh-Hant/questions/page/41/)

[← 逐題詳解目錄](https://ocme.evemisslab.com/zh-Hant/questions/) · [原題批次](https://ocme.evemisslab.com/zh-Hant/practice/batch-20261012-advance-20261017-r05-graph-foundations/#q-20261012-advance-20261017-r05-graph-0054)

本頁是已完成第二對話 AI 數理與中英語義覆核的教學詳解，只支持本題明示的模型與前提。沒有人工審查或新 Lean 證明，也不提升原題或 MKO 的 Canonical 真值狀態。

R0015-08054 · q-20261012-advance-20261017-r05-graph-0054



## 原題與已知條件

簡單無向圖，Fin頂點從0起。V=Fin(3)=[0, 1, 2]，無向邊列項=[[0, 1], [0, 2]]；各邊兩端皆合法且相異。候選邊=[0, 1]。已存在則移除，未存在則新增。答 (原邊集, 排序候選邊, 新增或移除, 新邊集, 原度數, 新度數, 有號度數差, 度差總和)。


- G001 — 簡單無向圖，Fin頂點從0起。V=Fin(3)=[0, 1, 2]，無向邊列項=[[0, 1], [0, 2]]；各邊兩端皆合法且相異。候選邊=[0, 1]。已存在則移除，未存在則新增。答 (原邊集, 排序候選邊, 新增或移除, 新邊集, 原度數, 新度數, 有號度數差, 度差總和)。





## 定義與適用範圍

沿用原題明示的論域、假設與來源 MKO 定義。本題已完成第二對話數理與中英語義覆核，並由原始參數逐題獨立重算模型、答案與每個算術步驟；原題仍為 candidate。


- [mko-graph](https://ocme.evemisslab.com/zh-Hant/mko/mko-graph/)





## 逐步推導

S001 · implies操作前

n=3;raw edges=[[0, 1], [0, 2]]

操作後

canonical edges=[[0, 1], [0, 2]]

條件：無

整張簡單無向圖先查端點合型且無自環；邊兩端排序、反向與重複邊只算一次，不以畫法猜相鄰。

步驟識別與依賴規則：simple_graph_edge_normalization · 依賴：G001





S002 · implies操作前

phase=original;vertex=0;all edges=[[0, 1], [0, 2]]

操作後

neighbors=[1, 2];degree=2

條件：無

掃描所有正規邊，只有以本頂點為端點的邊才給一個不同鄰居；原頂點標籤保留。

步驟識別與依賴規則：complete_graph_neighbor_inventory · 依賴：G001, S001





S003 · implies操作前

phase=original;vertex=1;all edges=[[0, 1], [0, 2]]

操作後

neighbors=[0];degree=1

條件：無

掃描所有正規邊，只有以本頂點為端點的邊才給一個不同鄰居；原頂點標籤保留。

步驟識別與依賴規則：complete_graph_neighbor_inventory · 依賴：G001, S002





S004 · implies操作前

phase=original;vertex=2;all edges=[[0, 1], [0, 2]]

操作後

neighbors=[0];degree=1

條件：無

掃描所有正規邊，只有以本頂點為端點的邊才給一個不同鄰居；原頂點標籤保留。

步驟識別與依賴規則：complete_graph_neighbor_inventory · 依賴：G001, S003





S005 · implies操作前

typed candidate=[0, 1];old edges=[[0, 1], [0, 2]]

操作後

action=移除;new edges=[[0, 2]]

條件：無

反向候選先正規化，再由原邊集決定新增或移除，恰改一條無向邊。

步驟識別與依賴規則：toggle_one_undirected_nonloop_edge · 依賴：G001, S004





S006 · implies操作前

phase=toggled;vertex=0;all edges=[[0, 2]]

操作後

neighbors=[2];degree=1

條件：無

掃描所有正規邊，只有以本頂點為端點的邊才給一個不同鄰居；原頂點標籤保留。

步驟識別與依賴規則：complete_graph_neighbor_inventory · 依賴：G001, S005





S007 · implies操作前

phase=toggled;vertex=1;all edges=[[0, 2]]

操作後

neighbors=[];degree=0

條件：無

掃描所有正規邊，只有以本頂點為端點的邊才給一個不同鄰居；原頂點標籤保留。

步驟識別與依賴規則：complete_graph_neighbor_inventory · 依賴：G001, S006





S008 · implies操作前

phase=toggled;vertex=2;all edges=[[0, 2]]

操作後

neighbors=[0];degree=1

條件：無

掃描所有正規邊，只有以本頂點為端點的邊才給一個不同鄰居；原頂點標籤保留。

步驟識別與依賴規則：complete_graph_neighbor_inventory · 依賴：G001, S007





S009 · calculation操作前

degree delta0 := sub(1, 2)

操作後

degree delta0 = -1

條件：無

按本步指定順序精確代入原數據，分母非零才允許除法。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S008





S010 · calculation操作前

degree delta1 := sub(0, 1)

操作後

degree delta1 = -1

條件：無

按本步指定順序精確代入原數據，分母非零才允許除法。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S009





S011 · calculation操作前

degree delta2 := sub(1, 1)

操作後

degree delta2 = 0

條件：無

按本步指定順序精確代入原數據，分母非零才允許除法。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S010





S012 · calculation操作前

degree delta sum := sum(-1, -1, 0)

操作後

degree delta sum = -2

條件：無

按本步指定順序精確代入原數據，分母非零才允許除法。

步驟識別與依賴規則：exact_rational_arithmetic · 依賴：G001, S011









## 逐步反向核對


- S012 · premise_and_result_audit — 以精確有理數重算 degree delta sum，不以小數近似替代。
- S011 · premise_and_result_audit — 以精確有理數重算 degree delta2，不以小數近似替代。
- S010 · premise_and_result_audit — 以精確有理數重算 degree delta1，不以小數近似替代。
- S009 · premise_and_result_audit — 以精確有理數重算 degree delta0，不以小數近似替代。
- S008 · premise_and_result_audit — 回到原始資料與本步條件核對，不把單向推論誤稱等價。
- S007 · premise_and_result_audit — 回到原始資料與本步條件核對，不把單向推論誤稱等價。
- S006 · premise_and_result_audit — 回到原始資料與本步條件核對，不把單向推論誤稱等價。
- S005 · premise_and_result_audit — 回到原始資料與本步條件核對，不把單向推論誤稱等價。
- S004 · premise_and_result_audit — 回到原始資料與本步條件核對，不把單向推論誤稱等價。
- S003 · premise_and_result_audit — 回到原始資料與本步條件核對，不把單向推論誤稱等價。
- S002 · premise_and_result_audit — 回到原始資料與本步條件核對，不把單向推論誤稱等價。
- S001 · premise_and_result_audit — 回到原始資料與本步條件核對，不把單向推論誤稱等價。





## 結論

([[0, 1], [0, 2]], [0, 1], 移除, [[0, 2]], [2, 1, 1], [1, 0, 1], [-1, -1, 0], -2)

依上列完整代值及條件核對得到原題答案；原題編號、格式與狀態保持不變。





## 本題覆核與來源綁定

覆核日期：2026-10-26

原題、答案、步驟表達式、數值 AST 與既有歷史保持原樣；原來的候選狀態屬於來源歷史，不覆寫為形式化證明。

來源雜湊與覆核憑證
- input commit: 0f7be61e2c22317a4075561dc822c87d881a50db
- original question SHA-256: 63a234e53d797313329dafee8af5c07cbf78e7ad938838e1939cdc5ef7e050bf
- candidate record SHA-256: 4b3d18ec0626719840efc0af8a188bf7d54687bcfe97b95dc37b5f16905c542b
- semantic review receipt SHA-256: 6ecad9d909199221a07e923f87425e80b3bdec3eed46fe5910d04fca694cae18
- question-first witness SHA-256: e8f00458977a09493b5f9f05ab9e6feec72debaf4c7d1c609d1fc95900a35a1b
- Lean: NOT_RUN · human review: NOT_PERFORMED

[同源完整 JSON](https://ocme.evemisslab.com/data/question-derivations/questions/q-20261012-advance-20261017-r05-graph-0054.json)




