原題與已知條件
完整有限無向無loop簡單圖。操作=component-same-audit;資料={"n":7,"edges":[[0,2],[0,3],[0,4],[0,5],[1,2],[1,3],[1,4],[1,6],[2,3],[2,4],[2,5]],"left":1,"right":4}。請依 [left,right,left_component,same_component] 欄序回答。
G001 — 完整有限無向無loop簡單圖。操作=component-same-audit;資料={"n":7,"edges":[[0,2],[0,3],[0,4],[0,5],[1,2],[1,3],[1,4],[1,6],[2,3],[2,4],[2,5]],"left":1,"right":4}。請依 [left,right,left_component,same_component] 欄序回答。
逐步推導
S001 · implies
操作前
full carrier Fin(7);raw undirected edges=[[0, 2], [0, 3], [0, 4], [0, 5], [1, 2], [1, 3], [1, 4], [1, 6], [2, 3], [2, 4], [2, 5]]
操作後
canonical simple edges=[[0, 2], [0, 3], [0, 4], [0, 5], [1, 2], [1, 3], [1, 4], [1, 6], [2, 3], [2, 4], [2, 5]];full adjacency rows=[[2, 3, 4, 5], [2, 3, 4, 6], [0, 1, 3, 4, 5], [0, 1, 2], [0, 1, 2], [0, 2], [1]]
條件:無
用完整載體建立鄰接表,拒絕loop與重複無向邊;沒出現在邊中的頂點仍保留空鄰接列,不切換有向連通語義。
步驟識別與依賴
規則:component_full_undirected_graph_includes_isolates · 依賴:G001
S002 · implies
操作前
left vertex:start vertex=1;complete adjacency=[[2, 3, 4, 5], [2, 3, 4, 6], [0, 1, 3, 4, 5], [0, 1, 2], [0, 1, 2], [0, 2], [1]]
操作後
initial visited=[1];path to start=[1];edge length0
條件:無
起點以長度0路徑到自己,孤立點也必須納入,不能因沒有邊而漏掉。
步驟識別與依賴
規則:component_zero_length_reflexive_path · 依賴:G001, S001
S003 · implies
操作前
left vertex:layer=0;frontier=[1];all frontier neighbors=[2, 3, 4, 6]
操作後
previously seen=[1];new vertices=[2, 3, 4, 6]
條件:無
每層遍歷該層所有頂點的所有鄰居,去重後只加入未訪者;不提前停止於看起來足夠的子圖。
步驟識別與依賴
規則:component_complete_frontier_expansion · 依賴:G001, S002
S004 · implies
操作前
left vertex:new vertex=2;earliest frontier parent=1;parent path=[1]
操作後
append actual parent edge;reachable path=[1, 2]
條件:無
已有父路徑後,接上一條原圖邊得到新頂點路徑,故每個被加入的點真的可達。
步驟識別與依賴
規則:component_each_new_vertex_path_witness · 依賴:G001, S003
S005 · implies
操作前
left vertex:new vertex=3;earliest frontier parent=1;parent path=[1]
操作後
append actual parent edge;reachable path=[1, 3]
條件:無
已有父路徑後,接上一條原圖邊得到新頂點路徑,故每個被加入的點真的可達。
步驟識別與依賴
規則:component_each_new_vertex_path_witness · 依賴:G001, S004
S006 · implies
操作前
left vertex:new vertex=4;earliest frontier parent=1;parent path=[1]
操作後
append actual parent edge;reachable path=[1, 4]
條件:無
已有父路徑後,接上一條原圖邊得到新頂點路徑,故每個被加入的點真的可達。
步驟識別與依賴
規則:component_each_new_vertex_path_witness · 依賴:G001, S005
S007 · implies
操作前
left vertex:new vertex=6;earliest frontier parent=1;parent path=[1]
操作後
append actual parent edge;reachable path=[1, 6]
條件:無
已有父路徑後,接上一條原圖邊得到新頂點路徑,故每個被加入的點真的可達。
步驟識別與依賴
規則:component_each_new_vertex_path_witness · 依賴:G001, S006
S008 · implies
操作前
left vertex:layer=1;frontier=[2, 3, 4, 6];all frontier neighbors=[0, 1, 2, 3, 4, 5]
操作後
previously seen=[1, 2, 3, 4, 6];new vertices=[0, 5]
條件:無
每層遍歷該層所有頂點的所有鄰居,去重後只加入未訪者;不提前停止於看起來足夠的子圖。
步驟識別與依賴
規則:component_complete_frontier_expansion · 依賴:G001, S007
S009 · implies
操作前
left vertex:new vertex=0;earliest frontier parent=2;parent path=[1, 2]
操作後
append actual parent edge;reachable path=[1, 2, 0]
條件:無
已有父路徑後,接上一條原圖邊得到新頂點路徑,故每個被加入的點真的可達。
步驟識別與依賴
規則:component_each_new_vertex_path_witness · 依賴:G001, S008
S010 · implies
操作前
left vertex:new vertex=5;earliest frontier parent=2;parent path=[1, 2]
操作後
append actual parent edge;reachable path=[1, 2, 5]
條件:無
已有父路徑後,接上一條原圖邊得到新頂點路徑,故每個被加入的點真的可達。
步驟識別與依賴
規則:component_each_new_vertex_path_witness · 依賴:G001, S009
S011 · implies
操作前
left vertex:layer=2;frontier=[0, 5];all frontier neighbors=[0, 2, 3, 4, 5]
操作後
previously seen=[0, 1, 2, 3, 4, 5, 6];new vertices=[]
條件:無
每層遍歷該層所有頂點的所有鄰居,去重後只加入未訪者;不提前停止於看起來足夠的子圖。
步驟識別與依賴
規則:component_complete_frontier_expansion · 依賴:G001, S010
S012 · implies
操作前
left vertex:final visited=[0, 1, 2, 3, 4, 5, 6];all [vertex,neighbors,outside neighbors] rows=[[0, [2, 3, 4, 5], []], [1, [2, 3, 4, 6], []], [2, [0, 1, 3, 4, 5], []], [3, [0, 1, 2], []], [4, [0, 1, 2], []], [5, [0, 2], []], [6, [1], []]]
操作後
no edge leaves visited;every visited vertex has a path;visited equals full reachable set
條件:無
路徑見證給已訪⊆可達;搜尋完後無邊離開已訪集合,任一路徑若到外面必有第一條離開邊,矛盾,因此可達⊆已訪。兩方向才是完整分量,不是遍歷順序。
步驟識別與依賴
規則:component_reachable_and_closed_set_completeness · 依賴:G001, S011
S013 · implies
操作前
left=1;right=4;whole left component=[0, 1, 2, 3, 4, 5, 6]
操作後
same component=是
條件:無
完整求左端分量後才測右端成員;相同端點即使孤立也由零長度路徑相連。
步驟識別與依賴
規則:component_membership_after_complete_reachability · 依賴:G001, S012