{"algorithm":"connected-components","about":["Two vertices are in the same connected component when some path joins them. The components are the separate pieces of a graph: no edge runs between two of them, so nothing in one piece can reach anything in another.","gograph searches breadth-first from the first vertex and gives every vertex it reaches the same component. When that search runs out, it starts the next one at the first vertex no search has reached, and so on, so the components come out in the order of their first vertex. Every vertex and edge is looked at once, so it costs O(V+E).","On a directed graph, gograph ignores the edge directions and returns the weakly connected components. It joins the two ends of each edge with union-find instead of searching, since a vertex doesn't keep a list of the edges that end at it. To find the groups that can reach each other along the edge directions, use Tarjan, Kosaraju or Gabow. Use connected components to find the islands of a network after an outage, or to handle each piece of a graph on its own."],"template":{"id":"campus-outage","name":"Campus outage","description":"The campus network while the core switches A1 and A2 are down for maintenance. Each building keeps its own switches, and the two pairs of buildings with a direct link still reach each other, but nothing else does.","family":"undirected","directed":false,"weighted":false,"acyclic":false,"vertices":[{"id":"A3","x":472,"y":470},{"id":"A4","x":566,"y":503},{"id":"A5","x":459,"y":548},{"id":"A6","x":515,"y":431},{"id":"A7","x":556,"y":566},{"id":"A8","x":424,"y":488},{"id":"A9","x":585,"y":455},{"id":"A10","x":483,"y":596},{"id":"A11","x":462,"y":414},{"id":"A12","x":607,"y":540},{"id":"A13","x":406,"y":545},{"id":"A14","x":557,"y":400},{"id":"A15","x":543,"y":616},{"id":"A16","x":402,"y":442},{"id":"B1","x":289,"y":814},{"id":"B2","x":278,"y":869},{"id":"B3","x":240,"y":797},{"id":"B4","x":334,"y":833},{"id":"B5","x":225,"y":874},{"id":"B6","x":284,"y":759},{"id":"B7","x":322,"y":895},{"id":"B8","x":192,"y":814},{"id":"B9","x":354,"y":785},{"id":"B10","x":248,"y":923},{"id":"B11","x":232,"y":740},{"id":"B12","x":373,"y":870},{"id":"B13","x":173,"y":870},{"id":"B14","x":327,"y":729},{"id":"C1","x":133,"y":571},{"id":"C2","x":105,"y":620},{"id":"C3","x":91,"y":540},{"id":"C4","x":169,"y":602},{"id":"C5","x":54,"y":609},{"id":"C6","x":144,"y":517},{"id":"C7","x":139,"y":658},{"id":"C8","x":40,"y":541},{"id":"D1","x":166,"y":321},{"id":"D2","x":131,"y":277},{"id":"D3","x":211,"y":294},{"id":"D4","x":123,"y":343},{"id":"D5","x":160,"y":234},{"id":"D6","x":212,"y":352},{"id":"D7","x":82,"y":294},{"id":"D8","x":228,"y":246},{"id":"D9","x":148,"y":389},{"id":"D10","x":108,"y":220},{"id":"D11","x":259,"y":324},{"id":"D12","x":69,"y":350},{"id":"E1","x":415,"y":105},{"id":"E2","x":387,"y":154},{"id":"E3","x":373,"y":74},{"id":"E4","x":451,"y":137},{"id":"E5","x":336,"y":143},{"id":"E6","x":427,"y":51},{"id":"E7","x":421,"y":193},{"id":"E8","x":322,"y":75},{"id":"E9","x":485,"y":97},{"id":"E10","x":342,"y":196},{"id":"F1","x":672,"y":160},{"id":"F2","x":677,"y":104},{"id":"F3","x":723,"y":172},{"id":"F4","x":626,"y":147},{"id":"F5","x":728,"y":93},{"id":"F6","x":684,"y":215},{"id":"F7","x":630,"y":83},{"id":"F8","x":769,"y":149},{"id":"F9","x":612,"y":197},{"id":"F10","x":700,"y":47},{"id":"G1","x":856,"y":351},{"id":"G2","x":892,"y":307},{"id":"G3","x":892,"y":389},{"id":"G4","x":826,"y":314},{"id":"G5","x":941,"y":327},{"id":"G6","x":836,"y":403},{"id":"G7","x":865,"y":264},{"id":"G8","x":943,"y":396},{"id":"H1","x":873,"y":621},{"id":"H2","x":914,"y":582},{"id":"H3","x":904,"y":663},{"id":"H4","x":848,"y":580},{"id":"H5","x":960,"y":608},{"id":"H6","x":846,"y":669},{"id":"H7","x":893,"y":536},{"id":"H8","x":953,"y":677},{"id":"H9","x":804,"y":608},{"id":"I1","x":754,"y":816},{"id":"I2","x":739,"y":871},{"id":"I3","x":706,"y":796},{"id":"I4","x":797,"y":838},{"id":"I5","x":686,"y":872},{"id":"I6","x":752,"y":761},{"id":"I7","x":781,"y":900},{"id":"J1","x":564,"y":877},{"id":"J2","x":569,"y":925},{"id":"J3","x":530,"y":953},{"id":"J4","x":486,"y":933},{"id":"J5","x":481,"y":885},{"id":"J6","x":520,"y":857}],"edges":[{"from":"A3","to":"A5"},{"from":"A3","to":"A6"},{"from":"A3","to":"A7"},{"from":"A3","to":"A8"},{"from":"A3","to":"A9"},{"from":"A3","to":"A10"},{"from":"A4","to":"A11"},{"from":"A4","to":"A12"},{"from":"A4","to":"A13"},{"from":"A4","to":"A14"},{"from":"A4","to":"A15"},{"from":"A4","to":"A16"},{"from":"C1","to":"D1"},{"from":"H1","to":"I1"},{"from":"B1","to":"B2"},{"from":"B1","to":"B3"},{"from":"B2","to":"B3"},{"from":"B2","to":"B4"},{"from":"B2","to":"B5"},{"from":"B2","to":"B6"},{"from":"B2","to":"B7"},{"from":"B2","to":"B8"},{"from":"B3","to":"B9"},{"from":"B3","to":"B10"},{"from":"B3","to":"B11"},{"from":"B3","to":"B12"},{"from":"B3","to":"B13"},{"from":"B3","to":"B14"},{"from":"C1","to":"C2"},{"from":"C1","to":"C3"},{"from":"C1","to":"C4"},{"from":"C1","to":"C5"},{"from":"C1","to":"C6"},{"from":"C1","to":"C7"},{"from":"C1","to":"C8"},{"from":"D1","to":"D2"},{"from":"D1","to":"D3"},{"from":"D2","to":"D3"},{"from":"D2","to":"D4"},{"from":"D2","to":"D5"},{"from":"D2","to":"D6"},{"from":"D2","to":"D7"},{"from":"D3","to":"D8"},{"from":"D3","to":"D9"},{"from":"D3","to":"D10"},{"from":"D3","to":"D11"},{"from":"D3","to":"D12"},{"from":"E1","to":"E2"},{"from":"E1","to":"E3"},{"from":"E1","to":"E4"},{"from":"E1","to":"E5"},{"from":"E2","to":"E6"},{"from":"E2","to":"E7"},{"from":"E2","to":"E8"},{"from":"E2","to":"E9"},{"from":"E2","to":"E10"},{"from":"F1","to":"F2"},{"from":"F1","to":"F3"},{"from":"F1","to":"F4"},{"from":"F1","to":"F5"},{"from":"F2","to":"F6"},{"from":"F2","to":"F7"},{"from":"F2","to":"F8"},{"from":"F2","to":"F9"},{"from":"F2","to":"F10"},{"from":"G1","to":"G2"},{"from":"G1","to":"G3"},{"from":"G1","to":"G4"},{"from":"G1","to":"G5"},{"from":"G1","to":"G6"},{"from":"G1","to":"G7"},{"from":"G1","to":"G8"},{"from":"H1","to":"H2"},{"from":"H1","to":"H3"},{"from":"H1","to":"H4"},{"from":"H1","to":"H5"},{"from":"H2","to":"H6"},{"from":"H2","to":"H7"},{"from":"H2","to":"H8"},{"from":"H2","to":"H9"},{"from":"I1","to":"I2"},{"from":"I1","to":"I3"},{"from":"I1","to":"I4"},{"from":"I1","to":"I5"},{"from":"I1","to":"I6"},{"from":"I1","to":"I7"},{"from":"J1","to":"J2"},{"from":"J1","to":"J3"},{"from":"J1","to":"J4"},{"from":"J1","to":"J5"},{"from":"J1","to":"J6"}],"details":{"vertices":98,"edges":91,"directed":false,"weighted":false,"acyclic":false,"negativeWeights":false,"density":0.01914580265095729,"degree":{"min":1,"avg":1.8571428571428572,"max":8},"selfLoops":0,"components":9}},"problem":"While both core switches are down, which buildings can still talk to each other?","params":{},"result":{"kind":"groups","groups":[["A3","A5","A6","A7","A8","A9","A10"],["A4","A11","A12","A13","A14","A15","A16"],["B1","B2","B3","B4","B5","B6","B7","B8","B9","B10","B11","B12","B13","B14"],["C1","C2","C3","C4","C5","C6","C7","C8","D1","D2","D3","D4","D5","D6","D7","D8","D9","D10","D11","D12"],["E1","E2","E3","E4","E5","E6","E7","E8","E9","E10"],["F1","F2","F3","F4","F5","F6","F7","F8","F9","F10"],["G1","G2","G3","G4","G5","G6","G7","G8"],["H1","H2","H3","H4","H5","H6","H7","H8","H9","I1","I2","I3","I4","I5","I6","I7"],["J1","J2","J3","J4","J5","J6"]]},"answer":"The graph falls into 9 connected components, with 7, 7, 14, 20, 10, 10, 8, 16 and 6 vertices. No edge joins two of them, so each vertex can reach only the vertices in its own component.","legend":{"vertex":[{"id":"idle","label":"Not reached","color":"#64748B","shape":"hollow"},{"id":"waiting","label":"In queue","color":"#E69F00","shape":"dashed-square"},{"id":"current","label":"Being checked","color":"#56B4E9","shape":"ring"},{"id":"done","label":"In a component","color":"#009E73","shape":"filled"},{"id":"component-1","label":"Component 1, 7 vertices","color":"#56B4E9","shape":"filled"},{"id":"component-2","label":"Component 2, 7 vertices","color":"#CC79A7","shape":"dashed-square"},{"id":"component-3","label":"Component 3, 14 vertices","color":"#E69F00","shape":"filled"},{"id":"component-4","label":"Component 4, 20 vertices","color":"#F0E442","shape":"dashed-square"},{"id":"component-5","label":"Component 5, 10 vertices","color":"#D55E00","shape":"filled"},{"id":"component-6","label":"Component 6, 10 vertices","color":"#56B4E9","shape":"dashed-square"},{"id":"component-7","label":"Component 7, 8 vertices","color":"#CC79A7","shape":"filled"},{"id":"component-8","label":"Component 8, 16 vertices","color":"#009E73","shape":"dashed-square"},{"id":"component-9","label":"Component 9, 6 vertices","color":"#56B4E9","shape":"filled"}],"edge":[{"id":"idle","label":"Edge","color":"#475569","shape":"line"},{"id":"tree","label":"Reached a new vertex","color":"#009E73","shape":"thick"}],"panels":[{"id":"queue","title":"Queue","kind":"list"},{"id":"components","title":"Components found","kind":"groups"}]},"steps":[{"say":"ConnectedComponents searches breadth-first from each vertex no earlier search has reached, in the graph's vertex order. Every vertex a search reaches is in the same component as the vertex it started from. When the queue runs out, the component is complete."},{"say":"Start component 1 at A3, the first vertex. Put it in the queue.","ops":[{"v":"A3","state":"waiting"},{"panel":"queue","list":[{"key":"A3"}]}]},{"say":"Take A3 from the front of the queue. Its neighbors A5, A6, A7, A8, A9 and A10 are new, so they join the back of the queue.","ops":[{"v":"A3","state":"current"},{"v":"A5","state":"waiting"},{"e":["A3","A5"],"state":"tree"},{"v":"A6","state":"waiting"},{"e":["A3","A6"],"state":"tree"},{"v":"A7","state":"waiting"},{"e":["A3","A7"],"state":"tree"},{"v":"A8","state":"waiting"},{"e":["A3","A8"],"state":"tree"},{"v":"A9","state":"waiting"},{"e":["A3","A9"],"state":"tree"},{"v":"A10","state":"waiting"},{"e":["A3","A10"],"state":"tree"},{"panel":"queue","list":[{"key":"A5"},{"key":"A6"},{"key":"A7"},{"key":"A8"},{"key":"A9"},{"key":"A10"}]}]},{"say":"Take A5 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"A5","state":"current"},{"v":"A3","state":"done"},{"panel":"queue","list":[{"key":"A6"},{"key":"A7"},{"key":"A8"},{"key":"A9"},{"key":"A10"}]}]},{"say":"Take A6 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"A6","state":"current"},{"v":"A5","state":"done"},{"panel":"queue","list":[{"key":"A7"},{"key":"A8"},{"key":"A9"},{"key":"A10"}]}]},{"say":"Take A7 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"A7","state":"current"},{"v":"A6","state":"done"},{"panel":"queue","list":[{"key":"A8"},{"key":"A9"},{"key":"A10"}]}]},{"say":"Take A8 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"A8","state":"current"},{"v":"A7","state":"done"},{"panel":"queue","list":[{"key":"A9"},{"key":"A10"}]}]},{"say":"Take A9 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"A9","state":"current"},{"v":"A8","state":"done"},{"panel":"queue","list":[{"key":"A10"}]}]},{"say":"Take A10 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"A10","state":"current"},{"v":"A9","state":"done"},{"panel":"queue","list":[]}]},{"say":"The queue is empty, so component 1 is complete with 7 vertices.","ops":[{"v":"A3","state":"done"},{"v":"A5","state":"done"},{"v":"A6","state":"done"},{"v":"A7","state":"done"},{"v":"A8","state":"done"},{"v":"A9","state":"done"},{"v":"A10","state":"done"},{"panel":"components","groups":[["A3","A5","A6","A7","A8","A9","A10"]]}]},{"say":"Start component 2 at A4, the next vertex no search has reached. Put it in the queue.","ops":[{"v":"A4","state":"waiting"},{"panel":"queue","list":[{"key":"A4"}]}]},{"say":"Take A4 from the front of the queue. Its neighbors A11, A12, A13, A14, A15 and A16 are new, so they join the back of the queue.","ops":[{"v":"A4","state":"current"},{"v":"A11","state":"waiting"},{"e":["A4","A11"],"state":"tree"},{"v":"A12","state":"waiting"},{"e":["A4","A12"],"state":"tree"},{"v":"A13","state":"waiting"},{"e":["A4","A13"],"state":"tree"},{"v":"A14","state":"waiting"},{"e":["A4","A14"],"state":"tree"},{"v":"A15","state":"waiting"},{"e":["A4","A15"],"state":"tree"},{"v":"A16","state":"waiting"},{"e":["A4","A16"],"state":"tree"},{"panel":"queue","list":[{"key":"A11"},{"key":"A12"},{"key":"A13"},{"key":"A14"},{"key":"A15"},{"key":"A16"}]}]},{"say":"Take A11 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"A11","state":"current"},{"v":"A4","state":"done"},{"panel":"queue","list":[{"key":"A12"},{"key":"A13"},{"key":"A14"},{"key":"A15"},{"key":"A16"}]}]},{"say":"Take A12 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"A12","state":"current"},{"v":"A11","state":"done"},{"panel":"queue","list":[{"key":"A13"},{"key":"A14"},{"key":"A15"},{"key":"A16"}]}]},{"say":"Take A13 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"A13","state":"current"},{"v":"A12","state":"done"},{"panel":"queue","list":[{"key":"A14"},{"key":"A15"},{"key":"A16"}]}]},{"say":"Take A14 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"A14","state":"current"},{"v":"A13","state":"done"},{"panel":"queue","list":[{"key":"A15"},{"key":"A16"}]}]},{"say":"Take A15 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"A15","state":"current"},{"v":"A14","state":"done"},{"panel":"queue","list":[{"key":"A16"}]}]},{"say":"Take A16 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"A16","state":"current"},{"v":"A15","state":"done"},{"panel":"queue","list":[]}]},{"say":"The queue is empty, so component 2 is complete with 7 vertices.","ops":[{"v":"A4","state":"done"},{"v":"A11","state":"done"},{"v":"A12","state":"done"},{"v":"A13","state":"done"},{"v":"A14","state":"done"},{"v":"A15","state":"done"},{"v":"A16","state":"done"},{"panel":"components","groups":[["A3","A5","A6","A7","A8","A9","A10"],["A4","A11","A12","A13","A14","A15","A16"]]}]},{"say":"Start component 3 at B1, the next vertex no search has reached. Put it in the queue.","ops":[{"v":"B1","state":"waiting"},{"panel":"queue","list":[{"key":"B1"}]}]},{"say":"Take B1 from the front of the queue. Its neighbors B2 and B3 are new, so they join the back of the queue.","ops":[{"v":"B1","state":"current"},{"v":"B2","state":"waiting"},{"e":["B1","B2"],"state":"tree"},{"v":"B3","state":"waiting"},{"e":["B1","B3"],"state":"tree"},{"panel":"queue","list":[{"key":"B2"},{"key":"B3"}]}]},{"say":"Take B2 from the front of the queue. Its neighbors B4, B5, B6, B7 and B8 are new, so they join the back of the queue.","ops":[{"v":"B2","state":"current"},{"v":"B1","state":"done"},{"v":"B4","state":"waiting"},{"e":["B2","B4"],"state":"tree"},{"v":"B5","state":"waiting"},{"e":["B2","B5"],"state":"tree"},{"v":"B6","state":"waiting"},{"e":["B2","B6"],"state":"tree"},{"v":"B7","state":"waiting"},{"e":["B2","B7"],"state":"tree"},{"v":"B8","state":"waiting"},{"e":["B2","B8"],"state":"tree"},{"panel":"queue","list":[{"key":"B3"},{"key":"B4"},{"key":"B5"},{"key":"B6"},{"key":"B7"},{"key":"B8"}]}]},{"say":"Take B3 from the front of the queue. Its neighbors B9, B10, B11, B12, B13 and B14 are new, so they join the back of the queue.","ops":[{"v":"B3","state":"current"},{"v":"B2","state":"done"},{"v":"B9","state":"waiting"},{"e":["B3","B9"],"state":"tree"},{"v":"B10","state":"waiting"},{"e":["B3","B10"],"state":"tree"},{"v":"B11","state":"waiting"},{"e":["B3","B11"],"state":"tree"},{"v":"B12","state":"waiting"},{"e":["B3","B12"],"state":"tree"},{"v":"B13","state":"waiting"},{"e":["B3","B13"],"state":"tree"},{"v":"B14","state":"waiting"},{"e":["B3","B14"],"state":"tree"},{"panel":"queue","list":[{"key":"B4"},{"key":"B5"},{"key":"B6"},{"key":"B7"},{"key":"B8"},{"key":"B9"},{"key":"B10"},{"key":"B11"},{"key":"B12"},{"key":"B13"},{"key":"B14"}]}]},{"say":"Take B4 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"B4","state":"current"},{"v":"B3","state":"done"},{"panel":"queue","list":[{"key":"B5"},{"key":"B6"},{"key":"B7"},{"key":"B8"},{"key":"B9"},{"key":"B10"},{"key":"B11"},{"key":"B12"},{"key":"B13"},{"key":"B14"}]}]},{"say":"Take B5 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"B5","state":"current"},{"v":"B4","state":"done"},{"panel":"queue","list":[{"key":"B6"},{"key":"B7"},{"key":"B8"},{"key":"B9"},{"key":"B10"},{"key":"B11"},{"key":"B12"},{"key":"B13"},{"key":"B14"}]}]},{"say":"Take B6 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"B6","state":"current"},{"v":"B5","state":"done"},{"panel":"queue","list":[{"key":"B7"},{"key":"B8"},{"key":"B9"},{"key":"B10"},{"key":"B11"},{"key":"B12"},{"key":"B13"},{"key":"B14"}]}]},{"say":"Take B7 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"B7","state":"current"},{"v":"B6","state":"done"},{"panel":"queue","list":[{"key":"B8"},{"key":"B9"},{"key":"B10"},{"key":"B11"},{"key":"B12"},{"key":"B13"},{"key":"B14"}]}]},{"say":"Take B8 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"B8","state":"current"},{"v":"B7","state":"done"},{"panel":"queue","list":[{"key":"B9"},{"key":"B10"},{"key":"B11"},{"key":"B12"},{"key":"B13"},{"key":"B14"}]}]},{"say":"Take B9 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"B9","state":"current"},{"v":"B8","state":"done"},{"panel":"queue","list":[{"key":"B10"},{"key":"B11"},{"key":"B12"},{"key":"B13"},{"key":"B14"}]}]},{"say":"Take B10 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"B10","state":"current"},{"v":"B9","state":"done"},{"panel":"queue","list":[{"key":"B11"},{"key":"B12"},{"key":"B13"},{"key":"B14"}]}]},{"say":"Take B11 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"B11","state":"current"},{"v":"B10","state":"done"},{"panel":"queue","list":[{"key":"B12"},{"key":"B13"},{"key":"B14"}]}]},{"say":"Take B12 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"B12","state":"current"},{"v":"B11","state":"done"},{"panel":"queue","list":[{"key":"B13"},{"key":"B14"}]}]},{"say":"Take B13 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"B13","state":"current"},{"v":"B12","state":"done"},{"panel":"queue","list":[{"key":"B14"}]}]},{"say":"Take B14 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"B14","state":"current"},{"v":"B13","state":"done"},{"panel":"queue","list":[]}]},{"say":"The queue is empty, so component 3 is complete with 14 vertices.","ops":[{"v":"B1","state":"done"},{"v":"B2","state":"done"},{"v":"B3","state":"done"},{"v":"B4","state":"done"},{"v":"B5","state":"done"},{"v":"B6","state":"done"},{"v":"B7","state":"done"},{"v":"B8","state":"done"},{"v":"B9","state":"done"},{"v":"B10","state":"done"},{"v":"B11","state":"done"},{"v":"B12","state":"done"},{"v":"B13","state":"done"},{"v":"B14","state":"done"},{"panel":"components","groups":[["A3","A5","A6","A7","A8","A9","A10"],["A4","A11","A12","A13","A14","A15","A16"],["B1","B2","B3","B4","B5","B6","B7","B8","B9","B10","B11","B12","B13","B14"]]}]},{"say":"Start component 4 at C1, the next vertex no search has reached. Put it in the queue.","ops":[{"v":"C1","state":"waiting"},{"panel":"queue","list":[{"key":"C1"}]}]},{"say":"Take C1 from the front of the queue. Its neighbors D1, C2, C3, C4, C5, C6, C7 and C8 are new, so they join the back of the queue.","ops":[{"v":"C1","state":"current"},{"v":"D1","state":"waiting"},{"e":["C1","D1"],"state":"tree"},{"v":"C2","state":"waiting"},{"e":["C1","C2"],"state":"tree"},{"v":"C3","state":"waiting"},{"e":["C1","C3"],"state":"tree"},{"v":"C4","state":"waiting"},{"e":["C1","C4"],"state":"tree"},{"v":"C5","state":"waiting"},{"e":["C1","C5"],"state":"tree"},{"v":"C6","state":"waiting"},{"e":["C1","C6"],"state":"tree"},{"v":"C7","state":"waiting"},{"e":["C1","C7"],"state":"tree"},{"v":"C8","state":"waiting"},{"e":["C1","C8"],"state":"tree"},{"panel":"queue","list":[{"key":"D1"},{"key":"C2"},{"key":"C3"},{"key":"C4"},{"key":"C5"},{"key":"C6"},{"key":"C7"},{"key":"C8"}]}]},{"say":"Take D1 from the front of the queue. Its neighbors D2 and D3 are new, so they join the back of the queue.","ops":[{"v":"D1","state":"current"},{"v":"C1","state":"done"},{"v":"D2","state":"waiting"},{"e":["D1","D2"],"state":"tree"},{"v":"D3","state":"waiting"},{"e":["D1","D3"],"state":"tree"},{"panel":"queue","list":[{"key":"C2"},{"key":"C3"},{"key":"C4"},{"key":"C5"},{"key":"C6"},{"key":"C7"},{"key":"C8"},{"key":"D2"},{"key":"D3"}]}]},{"say":"Take C2 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"C2","state":"current"},{"v":"D1","state":"done"},{"panel":"queue","list":[{"key":"C3"},{"key":"C4"},{"key":"C5"},{"key":"C6"},{"key":"C7"},{"key":"C8"},{"key":"D2"},{"key":"D3"}]}]},{"say":"Take C3 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"C3","state":"current"},{"v":"C2","state":"done"},{"panel":"queue","list":[{"key":"C4"},{"key":"C5"},{"key":"C6"},{"key":"C7"},{"key":"C8"},{"key":"D2"},{"key":"D3"}]}]},{"say":"Take C4 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"C4","state":"current"},{"v":"C3","state":"done"},{"panel":"queue","list":[{"key":"C5"},{"key":"C6"},{"key":"C7"},{"key":"C8"},{"key":"D2"},{"key":"D3"}]}]},{"say":"Take C5 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"C5","state":"current"},{"v":"C4","state":"done"},{"panel":"queue","list":[{"key":"C6"},{"key":"C7"},{"key":"C8"},{"key":"D2"},{"key":"D3"}]}]},{"say":"Take C6 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"C6","state":"current"},{"v":"C5","state":"done"},{"panel":"queue","list":[{"key":"C7"},{"key":"C8"},{"key":"D2"},{"key":"D3"}]}]},{"say":"Take C7 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"C7","state":"current"},{"v":"C6","state":"done"},{"panel":"queue","list":[{"key":"C8"},{"key":"D2"},{"key":"D3"}]}]},{"say":"Take C8 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"C8","state":"current"},{"v":"C7","state":"done"},{"panel":"queue","list":[{"key":"D2"},{"key":"D3"}]}]},{"say":"Take D2 from the front of the queue. Its neighbors D4, D5, D6 and D7 are new, so they join the back of the queue.","ops":[{"v":"D2","state":"current"},{"v":"C8","state":"done"},{"v":"D4","state":"waiting"},{"e":["D2","D4"],"state":"tree"},{"v":"D5","state":"waiting"},{"e":["D2","D5"],"state":"tree"},{"v":"D6","state":"waiting"},{"e":["D2","D6"],"state":"tree"},{"v":"D7","state":"waiting"},{"e":["D2","D7"],"state":"tree"},{"panel":"queue","list":[{"key":"D3"},{"key":"D4"},{"key":"D5"},{"key":"D6"},{"key":"D7"}]}]},{"say":"Take D3 from the front of the queue. Its neighbors D8, D9, D10, D11 and D12 are new, so they join the back of the queue.","ops":[{"v":"D3","state":"current"},{"v":"D2","state":"done"},{"v":"D8","state":"waiting"},{"e":["D3","D8"],"state":"tree"},{"v":"D9","state":"waiting"},{"e":["D3","D9"],"state":"tree"},{"v":"D10","state":"waiting"},{"e":["D3","D10"],"state":"tree"},{"v":"D11","state":"waiting"},{"e":["D3","D11"],"state":"tree"},{"v":"D12","state":"waiting"},{"e":["D3","D12"],"state":"tree"},{"panel":"queue","list":[{"key":"D4"},{"key":"D5"},{"key":"D6"},{"key":"D7"},{"key":"D8"},{"key":"D9"},{"key":"D10"},{"key":"D11"},{"key":"D12"}]}]},{"say":"Take D4 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"D4","state":"current"},{"v":"D3","state":"done"},{"panel":"queue","list":[{"key":"D5"},{"key":"D6"},{"key":"D7"},{"key":"D8"},{"key":"D9"},{"key":"D10"},{"key":"D11"},{"key":"D12"}]}]},{"say":"Take D5 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"D5","state":"current"},{"v":"D4","state":"done"},{"panel":"queue","list":[{"key":"D6"},{"key":"D7"},{"key":"D8"},{"key":"D9"},{"key":"D10"},{"key":"D11"},{"key":"D12"}]}]},{"say":"Take D6 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"D6","state":"current"},{"v":"D5","state":"done"},{"panel":"queue","list":[{"key":"D7"},{"key":"D8"},{"key":"D9"},{"key":"D10"},{"key":"D11"},{"key":"D12"}]}]},{"say":"Take D7 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"D7","state":"current"},{"v":"D6","state":"done"},{"panel":"queue","list":[{"key":"D8"},{"key":"D9"},{"key":"D10"},{"key":"D11"},{"key":"D12"}]}]},{"say":"Take D8 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"D8","state":"current"},{"v":"D7","state":"done"},{"panel":"queue","list":[{"key":"D9"},{"key":"D10"},{"key":"D11"},{"key":"D12"}]}]},{"say":"Take D9 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"D9","state":"current"},{"v":"D8","state":"done"},{"panel":"queue","list":[{"key":"D10"},{"key":"D11"},{"key":"D12"}]}]},{"say":"Take D10 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"D10","state":"current"},{"v":"D9","state":"done"},{"panel":"queue","list":[{"key":"D11"},{"key":"D12"}]}]},{"say":"Take D11 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"D11","state":"current"},{"v":"D10","state":"done"},{"panel":"queue","list":[{"key":"D12"}]}]},{"say":"Take D12 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"D12","state":"current"},{"v":"D11","state":"done"},{"panel":"queue","list":[]}]},{"say":"The queue is empty, so component 4 is complete with 20 vertices.","ops":[{"v":"C1","state":"done"},{"v":"D1","state":"done"},{"v":"C2","state":"done"},{"v":"C3","state":"done"},{"v":"C4","state":"done"},{"v":"C5","state":"done"},{"v":"C6","state":"done"},{"v":"C7","state":"done"},{"v":"C8","state":"done"},{"v":"D2","state":"done"},{"v":"D3","state":"done"},{"v":"D4","state":"done"},{"v":"D5","state":"done"},{"v":"D6","state":"done"},{"v":"D7","state":"done"},{"v":"D8","state":"done"},{"v":"D9","state":"done"},{"v":"D10","state":"done"},{"v":"D11","state":"done"},{"v":"D12","state":"done"},{"panel":"components","groups":[["A3","A5","A6","A7","A8","A9","A10"],["A4","A11","A12","A13","A14","A15","A16"],["B1","B2","B3","B4","B5","B6","B7","B8","B9","B10","B11","B12","B13","B14"],["C1","D1","C2","C3","C4","C5","C6","C7","C8","D2","D3","D4","D5","D6","D7","D8","D9","D10","D11","D12"]]}]},{"say":"Start component 5 at E1, the next vertex no search has reached. Put it in the queue.","ops":[{"v":"E1","state":"waiting"},{"panel":"queue","list":[{"key":"E1"}]}]},{"say":"Take E1 from the front of the queue. Its neighbors E2, E3, E4 and E5 are new, so they join the back of the queue.","ops":[{"v":"E1","state":"current"},{"v":"E2","state":"waiting"},{"e":["E1","E2"],"state":"tree"},{"v":"E3","state":"waiting"},{"e":["E1","E3"],"state":"tree"},{"v":"E4","state":"waiting"},{"e":["E1","E4"],"state":"tree"},{"v":"E5","state":"waiting"},{"e":["E1","E5"],"state":"tree"},{"panel":"queue","list":[{"key":"E2"},{"key":"E3"},{"key":"E4"},{"key":"E5"}]}]},{"say":"Take E2 from the front of the queue. Its neighbors E6, E7, E8, E9 and E10 are new, so they join the back of the queue.","ops":[{"v":"E2","state":"current"},{"v":"E1","state":"done"},{"v":"E6","state":"waiting"},{"e":["E2","E6"],"state":"tree"},{"v":"E7","state":"waiting"},{"e":["E2","E7"],"state":"tree"},{"v":"E8","state":"waiting"},{"e":["E2","E8"],"state":"tree"},{"v":"E9","state":"waiting"},{"e":["E2","E9"],"state":"tree"},{"v":"E10","state":"waiting"},{"e":["E2","E10"],"state":"tree"},{"panel":"queue","list":[{"key":"E3"},{"key":"E4"},{"key":"E5"},{"key":"E6"},{"key":"E7"},{"key":"E8"},{"key":"E9"},{"key":"E10"}]}]},{"say":"Take E3 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"E3","state":"current"},{"v":"E2","state":"done"},{"panel":"queue","list":[{"key":"E4"},{"key":"E5"},{"key":"E6"},{"key":"E7"},{"key":"E8"},{"key":"E9"},{"key":"E10"}]}]},{"say":"Take E4 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"E4","state":"current"},{"v":"E3","state":"done"},{"panel":"queue","list":[{"key":"E5"},{"key":"E6"},{"key":"E7"},{"key":"E8"},{"key":"E9"},{"key":"E10"}]}]},{"say":"Take E5 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"E5","state":"current"},{"v":"E4","state":"done"},{"panel":"queue","list":[{"key":"E6"},{"key":"E7"},{"key":"E8"},{"key":"E9"},{"key":"E10"}]}]},{"say":"Take E6 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"E6","state":"current"},{"v":"E5","state":"done"},{"panel":"queue","list":[{"key":"E7"},{"key":"E8"},{"key":"E9"},{"key":"E10"}]}]},{"say":"Take E7 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"E7","state":"current"},{"v":"E6","state":"done"},{"panel":"queue","list":[{"key":"E8"},{"key":"E9"},{"key":"E10"}]}]},{"say":"Take E8 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"E8","state":"current"},{"v":"E7","state":"done"},{"panel":"queue","list":[{"key":"E9"},{"key":"E10"}]}]},{"say":"Take E9 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"E9","state":"current"},{"v":"E8","state":"done"},{"panel":"queue","list":[{"key":"E10"}]}]},{"say":"Take E10 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"E10","state":"current"},{"v":"E9","state":"done"},{"panel":"queue","list":[]}]},{"say":"The queue is empty, so component 5 is complete with 10 vertices.","ops":[{"v":"E1","state":"done"},{"v":"E2","state":"done"},{"v":"E3","state":"done"},{"v":"E4","state":"done"},{"v":"E5","state":"done"},{"v":"E6","state":"done"},{"v":"E7","state":"done"},{"v":"E8","state":"done"},{"v":"E9","state":"done"},{"v":"E10","state":"done"},{"panel":"components","groups":[["A3","A5","A6","A7","A8","A9","A10"],["A4","A11","A12","A13","A14","A15","A16"],["B1","B2","B3","B4","B5","B6","B7","B8","B9","B10","B11","B12","B13","B14"],["C1","D1","C2","C3","C4","C5","C6","C7","C8","D2","D3","D4","D5","D6","D7","D8","D9","D10","D11","D12"],["E1","E2","E3","E4","E5","E6","E7","E8","E9","E10"]]}]},{"say":"Start component 6 at F1, the next vertex no search has reached. Put it in the queue.","ops":[{"v":"F1","state":"waiting"},{"panel":"queue","list":[{"key":"F1"}]}]},{"say":"Take F1 from the front of the queue. Its neighbors F2, F3, F4 and F5 are new, so they join the back of the queue.","ops":[{"v":"F1","state":"current"},{"v":"F2","state":"waiting"},{"e":["F1","F2"],"state":"tree"},{"v":"F3","state":"waiting"},{"e":["F1","F3"],"state":"tree"},{"v":"F4","state":"waiting"},{"e":["F1","F4"],"state":"tree"},{"v":"F5","state":"waiting"},{"e":["F1","F5"],"state":"tree"},{"panel":"queue","list":[{"key":"F2"},{"key":"F3"},{"key":"F4"},{"key":"F5"}]}]},{"say":"Take F2 from the front of the queue. Its neighbors F6, F7, F8, F9 and F10 are new, so they join the back of the queue.","ops":[{"v":"F2","state":"current"},{"v":"F1","state":"done"},{"v":"F6","state":"waiting"},{"e":["F2","F6"],"state":"tree"},{"v":"F7","state":"waiting"},{"e":["F2","F7"],"state":"tree"},{"v":"F8","state":"waiting"},{"e":["F2","F8"],"state":"tree"},{"v":"F9","state":"waiting"},{"e":["F2","F9"],"state":"tree"},{"v":"F10","state":"waiting"},{"e":["F2","F10"],"state":"tree"},{"panel":"queue","list":[{"key":"F3"},{"key":"F4"},{"key":"F5"},{"key":"F6"},{"key":"F7"},{"key":"F8"},{"key":"F9"},{"key":"F10"}]}]},{"say":"Take F3 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"F3","state":"current"},{"v":"F2","state":"done"},{"panel":"queue","list":[{"key":"F4"},{"key":"F5"},{"key":"F6"},{"key":"F7"},{"key":"F8"},{"key":"F9"},{"key":"F10"}]}]},{"say":"Take F4 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"F4","state":"current"},{"v":"F3","state":"done"},{"panel":"queue","list":[{"key":"F5"},{"key":"F6"},{"key":"F7"},{"key":"F8"},{"key":"F9"},{"key":"F10"}]}]},{"say":"Take F5 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"F5","state":"current"},{"v":"F4","state":"done"},{"panel":"queue","list":[{"key":"F6"},{"key":"F7"},{"key":"F8"},{"key":"F9"},{"key":"F10"}]}]},{"say":"Take F6 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"F6","state":"current"},{"v":"F5","state":"done"},{"panel":"queue","list":[{"key":"F7"},{"key":"F8"},{"key":"F9"},{"key":"F10"}]}]},{"say":"Take F7 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"F7","state":"current"},{"v":"F6","state":"done"},{"panel":"queue","list":[{"key":"F8"},{"key":"F9"},{"key":"F10"}]}]},{"say":"Take F8 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"F8","state":"current"},{"v":"F7","state":"done"},{"panel":"queue","list":[{"key":"F9"},{"key":"F10"}]}]},{"say":"Take F9 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"F9","state":"current"},{"v":"F8","state":"done"},{"panel":"queue","list":[{"key":"F10"}]}]},{"say":"Take F10 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"F10","state":"current"},{"v":"F9","state":"done"},{"panel":"queue","list":[]}]},{"say":"The queue is empty, so component 6 is complete with 10 vertices.","ops":[{"v":"F1","state":"done"},{"v":"F2","state":"done"},{"v":"F3","state":"done"},{"v":"F4","state":"done"},{"v":"F5","state":"done"},{"v":"F6","state":"done"},{"v":"F7","state":"done"},{"v":"F8","state":"done"},{"v":"F9","state":"done"},{"v":"F10","state":"done"},{"panel":"components","groups":[["A3","A5","A6","A7","A8","A9","A10"],["A4","A11","A12","A13","A14","A15","A16"],["B1","B2","B3","B4","B5","B6","B7","B8","B9","B10","B11","B12","B13","B14"],["C1","D1","C2","C3","C4","C5","C6","C7","C8","D2","D3","D4","D5","D6","D7","D8","D9","D10","D11","D12"],["E1","E2","E3","E4","E5","E6","E7","E8","E9","E10"],["F1","F2","F3","F4","F5","F6","F7","F8","F9","F10"]]}]},{"say":"Start component 7 at G1, the next vertex no search has reached. Put it in the queue.","ops":[{"v":"G1","state":"waiting"},{"panel":"queue","list":[{"key":"G1"}]}]},{"say":"Take G1 from the front of the queue. Its neighbors G2, G3, G4, G5, G6, G7 and G8 are new, so they join the back of the queue.","ops":[{"v":"G1","state":"current"},{"v":"G2","state":"waiting"},{"e":["G1","G2"],"state":"tree"},{"v":"G3","state":"waiting"},{"e":["G1","G3"],"state":"tree"},{"v":"G4","state":"waiting"},{"e":["G1","G4"],"state":"tree"},{"v":"G5","state":"waiting"},{"e":["G1","G5"],"state":"tree"},{"v":"G6","state":"waiting"},{"e":["G1","G6"],"state":"tree"},{"v":"G7","state":"waiting"},{"e":["G1","G7"],"state":"tree"},{"v":"G8","state":"waiting"},{"e":["G1","G8"],"state":"tree"},{"panel":"queue","list":[{"key":"G2"},{"key":"G3"},{"key":"G4"},{"key":"G5"},{"key":"G6"},{"key":"G7"},{"key":"G8"}]}]},{"say":"Take G2 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"G2","state":"current"},{"v":"G1","state":"done"},{"panel":"queue","list":[{"key":"G3"},{"key":"G4"},{"key":"G5"},{"key":"G6"},{"key":"G7"},{"key":"G8"}]}]},{"say":"Take G3 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"G3","state":"current"},{"v":"G2","state":"done"},{"panel":"queue","list":[{"key":"G4"},{"key":"G5"},{"key":"G6"},{"key":"G7"},{"key":"G8"}]}]},{"say":"Take G4 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"G4","state":"current"},{"v":"G3","state":"done"},{"panel":"queue","list":[{"key":"G5"},{"key":"G6"},{"key":"G7"},{"key":"G8"}]}]},{"say":"Take G5 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"G5","state":"current"},{"v":"G4","state":"done"},{"panel":"queue","list":[{"key":"G6"},{"key":"G7"},{"key":"G8"}]}]},{"say":"Take G6 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"G6","state":"current"},{"v":"G5","state":"done"},{"panel":"queue","list":[{"key":"G7"},{"key":"G8"}]}]},{"say":"Take G7 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"G7","state":"current"},{"v":"G6","state":"done"},{"panel":"queue","list":[{"key":"G8"}]}]},{"say":"Take G8 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"G8","state":"current"},{"v":"G7","state":"done"},{"panel":"queue","list":[]}]},{"say":"The queue is empty, so component 7 is complete with 8 vertices.","ops":[{"v":"G1","state":"done"},{"v":"G2","state":"done"},{"v":"G3","state":"done"},{"v":"G4","state":"done"},{"v":"G5","state":"done"},{"v":"G6","state":"done"},{"v":"G7","state":"done"},{"v":"G8","state":"done"},{"panel":"components","groups":[["A3","A5","A6","A7","A8","A9","A10"],["A4","A11","A12","A13","A14","A15","A16"],["B1","B2","B3","B4","B5","B6","B7","B8","B9","B10","B11","B12","B13","B14"],["C1","D1","C2","C3","C4","C5","C6","C7","C8","D2","D3","D4","D5","D6","D7","D8","D9","D10","D11","D12"],["E1","E2","E3","E4","E5","E6","E7","E8","E9","E10"],["F1","F2","F3","F4","F5","F6","F7","F8","F9","F10"],["G1","G2","G3","G4","G5","G6","G7","G8"]]}]},{"say":"Start component 8 at H1, the next vertex no search has reached. Put it in the queue.","ops":[{"v":"H1","state":"waiting"},{"panel":"queue","list":[{"key":"H1"}]}]},{"say":"Take H1 from the front of the queue. Its neighbors I1, H2, H3, H4 and H5 are new, so they join the back of the queue.","ops":[{"v":"H1","state":"current"},{"v":"I1","state":"waiting"},{"e":["H1","I1"],"state":"tree"},{"v":"H2","state":"waiting"},{"e":["H1","H2"],"state":"tree"},{"v":"H3","state":"waiting"},{"e":["H1","H3"],"state":"tree"},{"v":"H4","state":"waiting"},{"e":["H1","H4"],"state":"tree"},{"v":"H5","state":"waiting"},{"e":["H1","H5"],"state":"tree"},{"panel":"queue","list":[{"key":"I1"},{"key":"H2"},{"key":"H3"},{"key":"H4"},{"key":"H5"}]}]},{"say":"Take I1 from the front of the queue. Its neighbors I2, I3, I4, I5, I6 and I7 are new, so they join the back of the queue.","ops":[{"v":"I1","state":"current"},{"v":"H1","state":"done"},{"v":"I2","state":"waiting"},{"e":["I1","I2"],"state":"tree"},{"v":"I3","state":"waiting"},{"e":["I1","I3"],"state":"tree"},{"v":"I4","state":"waiting"},{"e":["I1","I4"],"state":"tree"},{"v":"I5","state":"waiting"},{"e":["I1","I5"],"state":"tree"},{"v":"I6","state":"waiting"},{"e":["I1","I6"],"state":"tree"},{"v":"I7","state":"waiting"},{"e":["I1","I7"],"state":"tree"},{"panel":"queue","list":[{"key":"H2"},{"key":"H3"},{"key":"H4"},{"key":"H5"},{"key":"I2"},{"key":"I3"},{"key":"I4"},{"key":"I5"},{"key":"I6"},{"key":"I7"}]}]},{"say":"Take H2 from the front of the queue. Its neighbors H6, H7, H8 and H9 are new, so they join the back of the queue.","ops":[{"v":"H2","state":"current"},{"v":"I1","state":"done"},{"v":"H6","state":"waiting"},{"e":["H2","H6"],"state":"tree"},{"v":"H7","state":"waiting"},{"e":["H2","H7"],"state":"tree"},{"v":"H8","state":"waiting"},{"e":["H2","H8"],"state":"tree"},{"v":"H9","state":"waiting"},{"e":["H2","H9"],"state":"tree"},{"panel":"queue","list":[{"key":"H3"},{"key":"H4"},{"key":"H5"},{"key":"I2"},{"key":"I3"},{"key":"I4"},{"key":"I5"},{"key":"I6"},{"key":"I7"},{"key":"H6"},{"key":"H7"},{"key":"H8"},{"key":"H9"}]}]},{"say":"Take H3 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"H3","state":"current"},{"v":"H2","state":"done"},{"panel":"queue","list":[{"key":"H4"},{"key":"H5"},{"key":"I2"},{"key":"I3"},{"key":"I4"},{"key":"I5"},{"key":"I6"},{"key":"I7"},{"key":"H6"},{"key":"H7"},{"key":"H8"},{"key":"H9"}]}]},{"say":"Take H4 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"H4","state":"current"},{"v":"H3","state":"done"},{"panel":"queue","list":[{"key":"H5"},{"key":"I2"},{"key":"I3"},{"key":"I4"},{"key":"I5"},{"key":"I6"},{"key":"I7"},{"key":"H6"},{"key":"H7"},{"key":"H8"},{"key":"H9"}]}]},{"say":"Take H5 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"H5","state":"current"},{"v":"H4","state":"done"},{"panel":"queue","list":[{"key":"I2"},{"key":"I3"},{"key":"I4"},{"key":"I5"},{"key":"I6"},{"key":"I7"},{"key":"H6"},{"key":"H7"},{"key":"H8"},{"key":"H9"}]}]},{"say":"Take I2 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"I2","state":"current"},{"v":"H5","state":"done"},{"panel":"queue","list":[{"key":"I3"},{"key":"I4"},{"key":"I5"},{"key":"I6"},{"key":"I7"},{"key":"H6"},{"key":"H7"},{"key":"H8"},{"key":"H9"}]}]},{"say":"Take I3 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"I3","state":"current"},{"v":"I2","state":"done"},{"panel":"queue","list":[{"key":"I4"},{"key":"I5"},{"key":"I6"},{"key":"I7"},{"key":"H6"},{"key":"H7"},{"key":"H8"},{"key":"H9"}]}]},{"say":"Take I4 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"I4","state":"current"},{"v":"I3","state":"done"},{"panel":"queue","list":[{"key":"I5"},{"key":"I6"},{"key":"I7"},{"key":"H6"},{"key":"H7"},{"key":"H8"},{"key":"H9"}]}]},{"say":"Take I5 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"I5","state":"current"},{"v":"I4","state":"done"},{"panel":"queue","list":[{"key":"I6"},{"key":"I7"},{"key":"H6"},{"key":"H7"},{"key":"H8"},{"key":"H9"}]}]},{"say":"Take I6 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"I6","state":"current"},{"v":"I5","state":"done"},{"panel":"queue","list":[{"key":"I7"},{"key":"H6"},{"key":"H7"},{"key":"H8"},{"key":"H9"}]}]},{"say":"Take I7 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"I7","state":"current"},{"v":"I6","state":"done"},{"panel":"queue","list":[{"key":"H6"},{"key":"H7"},{"key":"H8"},{"key":"H9"}]}]},{"say":"Take H6 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"H6","state":"current"},{"v":"I7","state":"done"},{"panel":"queue","list":[{"key":"H7"},{"key":"H8"},{"key":"H9"}]}]},{"say":"Take H7 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"H7","state":"current"},{"v":"H6","state":"done"},{"panel":"queue","list":[{"key":"H8"},{"key":"H9"}]}]},{"say":"Take H8 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"H8","state":"current"},{"v":"H7","state":"done"},{"panel":"queue","list":[{"key":"H9"}]}]},{"say":"Take H9 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"H9","state":"current"},{"v":"H8","state":"done"},{"panel":"queue","list":[]}]},{"say":"The queue is empty, so component 8 is complete with 16 vertices.","ops":[{"v":"H1","state":"done"},{"v":"I1","state":"done"},{"v":"H2","state":"done"},{"v":"H3","state":"done"},{"v":"H4","state":"done"},{"v":"H5","state":"done"},{"v":"I2","state":"done"},{"v":"I3","state":"done"},{"v":"I4","state":"done"},{"v":"I5","state":"done"},{"v":"I6","state":"done"},{"v":"I7","state":"done"},{"v":"H6","state":"done"},{"v":"H7","state":"done"},{"v":"H8","state":"done"},{"v":"H9","state":"done"},{"panel":"components","groups":[["A3","A5","A6","A7","A8","A9","A10"],["A4","A11","A12","A13","A14","A15","A16"],["B1","B2","B3","B4","B5","B6","B7","B8","B9","B10","B11","B12","B13","B14"],["C1","D1","C2","C3","C4","C5","C6","C7","C8","D2","D3","D4","D5","D6","D7","D8","D9","D10","D11","D12"],["E1","E2","E3","E4","E5","E6","E7","E8","E9","E10"],["F1","F2","F3","F4","F5","F6","F7","F8","F9","F10"],["G1","G2","G3","G4","G5","G6","G7","G8"],["H1","I1","H2","H3","H4","H5","I2","I3","I4","I5","I6","I7","H6","H7","H8","H9"]]}]},{"say":"Start component 9 at J1, the next vertex no search has reached. Put it in the queue.","ops":[{"v":"J1","state":"waiting"},{"panel":"queue","list":[{"key":"J1"}]}]},{"say":"Take J1 from the front of the queue. Its neighbors J2, J3, J4, J5 and J6 are new, so they join the back of the queue.","ops":[{"v":"J1","state":"current"},{"v":"J2","state":"waiting"},{"e":["J1","J2"],"state":"tree"},{"v":"J3","state":"waiting"},{"e":["J1","J3"],"state":"tree"},{"v":"J4","state":"waiting"},{"e":["J1","J4"],"state":"tree"},{"v":"J5","state":"waiting"},{"e":["J1","J5"],"state":"tree"},{"v":"J6","state":"waiting"},{"e":["J1","J6"],"state":"tree"},{"panel":"queue","list":[{"key":"J2"},{"key":"J3"},{"key":"J4"},{"key":"J5"},{"key":"J6"}]}]},{"say":"Take J2 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"J2","state":"current"},{"v":"J1","state":"done"},{"panel":"queue","list":[{"key":"J3"},{"key":"J4"},{"key":"J5"},{"key":"J6"}]}]},{"say":"Take J3 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"J3","state":"current"},{"v":"J2","state":"done"},{"panel":"queue","list":[{"key":"J4"},{"key":"J5"},{"key":"J6"}]}]},{"say":"Take J4 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"J4","state":"current"},{"v":"J3","state":"done"},{"panel":"queue","list":[{"key":"J5"},{"key":"J6"}]}]},{"say":"Take J5 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"J5","state":"current"},{"v":"J4","state":"done"},{"panel":"queue","list":[{"key":"J6"}]}]},{"say":"Take J6 from the front of the queue. Every neighbor it has is already in the component.","ops":[{"v":"J6","state":"current"},{"v":"J5","state":"done"},{"panel":"queue","list":[]}]},{"say":"The queue is empty, so component 9 is complete with 6 vertices.","ops":[{"v":"J1","state":"done"},{"v":"J2","state":"done"},{"v":"J3","state":"done"},{"v":"J4","state":"done"},{"v":"J5","state":"done"},{"v":"J6","state":"done"},{"panel":"components","groups":[["A3","A5","A6","A7","A8","A9","A10"],["A4","A11","A12","A13","A14","A15","A16"],["B1","B2","B3","B4","B5","B6","B7","B8","B9","B10","B11","B12","B13","B14"],["C1","D1","C2","C3","C4","C5","C6","C7","C8","D2","D3","D4","D5","D6","D7","D8","D9","D10","D11","D12"],["E1","E2","E3","E4","E5","E6","E7","E8","E9","E10"],["F1","F2","F3","F4","F5","F6","F7","F8","F9","F10"],["G1","G2","G3","G4","G5","G6","G7","G8"],["H1","I1","H2","H3","H4","H5","I2","I3","I4","I5","I6","I7","H6","H7","H8","H9"],["J1","J2","J3","J4","J5","J6"]]}]},{"say":"Done. ConnectedComponents found 9 components. They come out in the order of their first vertex. Every vertex now shows the component it belongs to.","ops":[{"v":"A3","state":"component-1"},{"v":"A5","state":"component-1"},{"v":"A6","state":"component-1"},{"v":"A7","state":"component-1"},{"v":"A8","state":"component-1"},{"v":"A9","state":"component-1"},{"v":"A10","state":"component-1"},{"v":"A4","state":"component-2"},{"v":"A11","state":"component-2"},{"v":"A12","state":"component-2"},{"v":"A13","state":"component-2"},{"v":"A14","state":"component-2"},{"v":"A15","state":"component-2"},{"v":"A16","state":"component-2"},{"v":"B1","state":"component-3"},{"v":"B2","state":"component-3"},{"v":"B3","state":"component-3"},{"v":"B4","state":"component-3"},{"v":"B5","state":"component-3"},{"v":"B6","state":"component-3"},{"v":"B7","state":"component-3"},{"v":"B8","state":"component-3"},{"v":"B9","state":"component-3"},{"v":"B10","state":"component-3"},{"v":"B11","state":"component-3"},{"v":"B12","state":"component-3"},{"v":"B13","state":"component-3"},{"v":"B14","state":"component-3"},{"v":"C1","state":"component-4"},{"v":"D1","state":"component-4"},{"v":"C2","state":"component-4"},{"v":"C3","state":"component-4"},{"v":"C4","state":"component-4"},{"v":"C5","state":"component-4"},{"v":"C6","state":"component-4"},{"v":"C7","state":"component-4"},{"v":"C8","state":"component-4"},{"v":"D2","state":"component-4"},{"v":"D3","state":"component-4"},{"v":"D4","state":"component-4"},{"v":"D5","state":"component-4"},{"v":"D6","state":"component-4"},{"v":"D7","state":"component-4"},{"v":"D8","state":"component-4"},{"v":"D9","state":"component-4"},{"v":"D10","state":"component-4"},{"v":"D11","state":"component-4"},{"v":"D12","state":"component-4"},{"v":"E1","state":"component-5"},{"v":"E2","state":"component-5"},{"v":"E3","state":"component-5"},{"v":"E4","state":"component-5"},{"v":"E5","state":"component-5"},{"v":"E6","state":"component-5"},{"v":"E7","state":"component-5"},{"v":"E8","state":"component-5"},{"v":"E9","state":"component-5"},{"v":"E10","state":"component-5"},{"v":"F1","state":"component-6"},{"v":"F2","state":"component-6"},{"v":"F3","state":"component-6"},{"v":"F4","state":"component-6"},{"v":"F5","state":"component-6"},{"v":"F6","state":"component-6"},{"v":"F7","state":"component-6"},{"v":"F8","state":"component-6"},{"v":"F9","state":"component-6"},{"v":"F10","state":"component-6"},{"v":"G1","state":"component-7"},{"v":"G2","state":"component-7"},{"v":"G3","state":"component-7"},{"v":"G4","state":"component-7"},{"v":"G5","state":"component-7"},{"v":"G6","state":"component-7"},{"v":"G7","state":"component-7"},{"v":"G8","state":"component-7"},{"v":"H1","state":"component-8"},{"v":"I1","state":"component-8"},{"v":"H2","state":"component-8"},{"v":"H3","state":"component-8"},{"v":"H4","state":"component-8"},{"v":"H5","state":"component-8"},{"v":"I2","state":"component-8"},{"v":"I3","state":"component-8"},{"v":"I4","state":"component-8"},{"v":"I5","state":"component-8"},{"v":"I6","state":"component-8"},{"v":"I7","state":"component-8"},{"v":"H6","state":"component-8"},{"v":"H7","state":"component-8"},{"v":"H8","state":"component-8"},{"v":"H9","state":"component-8"},{"v":"J1","state":"component-9"},{"v":"J2","state":"component-9"},{"v":"J3","state":"component-9"},{"v":"J4","state":"component-9"},{"v":"J5","state":"component-9"},{"v":"J6","state":"component-9"}]}],"traceNote":"","verification":"The steps come from a step-by-step copy of the algorithm. Its result is checked against gograph's on every start.","snippet":"for _, component := range gograph.ConnectedComponents(g) {\n\tvar names []string\n\tfor _, v := range component {\n\t\tnames = append(names, v.Label())\n\t}\n\tfmt.Println(strings.Join(names, \", \"))\n}"}
