{"algorithm":"levels","about":["The levels of a directed graph without cycles are waves of work. The first level holds the vertices with no incoming edges. Each later level holds the vertices whose incoming edges all come from earlier levels, so the vertices of one level have no edges between them and can all run at once.","dag.Levels works like Kahn's topological sort. It counts the incoming edges of each vertex, and each time it removes the edges out of a vertex, a vertex left with none gets the level after the deepest vertex that pointed to it. The level of a vertex is the length of the longest path to it, levels[0] holds the vertices with no incoming edges, and the vertices of each level keep the graph's vertex order. It costs O(V+E).","The number of levels is the fewest rounds the work can take, and the widest level is the most workers a round can use. A round waits for its slowest task, though. To start each task as soon as its own dependencies finish, use the ready-set tracker. Levels returns ErrDAGHasCycle for a graph with a cycle and ErrNotDirected for an undirected one."],"template":{"id":"monorepo-build","name":"Monorepo build","description":"One hundred build targets, T1 to T100, in the repository of an online shop. T1 to T32 are shared libraries, T33 to T41 the code generator and API definitions, T42 to T58 services, T59 to T63 batch jobs, T64 to T71 the API client and UI packages, T72 to T76 apps, T77 to T95 container images, and T96 to T100 the deploys and the contract and end-to-end tests. A target takes 1 to 20 minutes to build. Each edge points from a target to a target that builds on it.","family":"dag","directed":true,"weighted":false,"acyclic":true,"vertices":[{"id":"T1","x":44,"y":294},{"id":"T2","x":127,"y":199},{"id":"T3","x":210,"y":285},{"id":"T4","x":127,"y":313},{"id":"T5","x":127,"y":256},{"id":"T6","x":210,"y":228},{"id":"T7","x":293,"y":229},{"id":"T8","x":210,"y":171},{"id":"T9","x":293,"y":58},{"id":"T10","x":210,"y":114},{"id":"T11","x":210,"y":449},{"id":"T12","x":210,"y":392},{"id":"T13","x":293,"y":514},{"id":"T14","x":376,"y":553},{"id":"T15","x":127,"y":427},{"id":"T16","x":127,"y":142},{"id":"T17","x":293,"y":457},{"id":"T18","x":293,"y":172},{"id":"T19","x":376,"y":211},{"id":"T20","x":293,"y":343},{"id":"T21","x":376,"y":268},{"id":"T22","x":376,"y":325},{"id":"T23","x":376,"y":439},{"id":"T24","x":459,"y":211},{"id":"T25","x":376,"y":496},{"id":"T26","x":293,"y":115},{"id":"T27","x":293,"y":286},{"id":"T28","x":293,"y":400},{"id":"T29","x":459,"y":154},{"id":"T30","x":459,"y":97},{"id":"T31","x":376,"y":97},{"id":"T32","x":459,"y":40},{"id":"T33","x":44,"y":602},{"id":"T34","x":127,"y":602},{"id":"T35","x":293,"y":742},{"id":"T36","x":210,"y":610},{"id":"T37","x":293,"y":685},{"id":"T38","x":293,"y":628},{"id":"T39","x":293,"y":571},{"id":"T40","x":376,"y":610},{"id":"T41","x":210,"y":533},{"id":"T42","x":542,"y":439},{"id":"T43","x":459,"y":496},{"id":"T44","x":459,"y":268},{"id":"T45","x":459,"y":610},{"id":"T46","x":459,"y":781},{"id":"T47","x":459,"y":553},{"id":"T48","x":542,"y":268},{"id":"T49","x":459,"y":439},{"id":"T50","x":459,"y":325},{"id":"T51","x":542,"y":382},{"id":"T52","x":459,"y":667},{"id":"T53","x":459,"y":838},{"id":"T54","x":542,"y":211},{"id":"T55","x":459,"y":724},{"id":"T56","x":542,"y":97},{"id":"T57","x":542,"y":40},{"id":"T58","x":542,"y":553},{"id":"T59","x":542,"y":154},{"id":"T60","x":376,"y":154},{"id":"T61","x":542,"y":325},{"id":"T62","x":376,"y":382},{"id":"T63","x":376,"y":40},{"id":"T64","x":376,"y":765},{"id":"T65","x":44,"y":926},{"id":"T66","x":44,"y":812},{"id":"T67","x":44,"y":869},{"id":"T68","x":127,"y":847},{"id":"T69","x":210,"y":837},{"id":"T70","x":127,"y":932},{"id":"T71","x":210,"y":894},{"id":"T72","x":459,"y":895},{"id":"T73","x":459,"y":952},{"id":"T74","x":708,"y":804},{"id":"T75","x":293,"y":873},{"id":"T76","x":708,"y":747},{"id":"T77","x":459,"y":382},{"id":"T78","x":625,"y":403},{"id":"T79","x":625,"y":574},{"id":"T80","x":625,"y":346},{"id":"T81","x":542,"y":610},{"id":"T82","x":625,"y":688},{"id":"T83","x":625,"y":631},{"id":"T84","x":625,"y":289},{"id":"T85","x":542,"y":496},{"id":"T86","x":625,"y":517},{"id":"T87","x":625,"y":460},{"id":"T88","x":542,"y":667},{"id":"T89","x":542,"y":781},{"id":"T90","x":625,"y":232},{"id":"T91","x":542,"y":724},{"id":"T92","x":625,"y":175},{"id":"T93","x":625,"y":118},{"id":"T94","x":625,"y":745},{"id":"T95","x":625,"y":61},{"id":"T96","x":708,"y":438},{"id":"T97","x":791,"y":459},{"id":"T98","x":708,"y":495},{"id":"T99","x":874,"y":469},{"id":"T100","x":957,"y":454}],"edges":[{"from":"T1","to":"T4"},{"from":"T1","to":"T5"},{"from":"T5","to":"T6"},{"from":"T5","to":"T7"},{"from":"T6","to":"T7"},{"from":"T2","to":"T8"},{"from":"T1","to":"T8"},{"from":"T2","to":"T9"},{"from":"T6","to":"T9"},{"from":"T1","to":"T10"},{"from":"T1","to":"T11"},{"from":"T4","to":"T12"},{"from":"T1","to":"T13"},{"from":"T12","to":"T13"},{"from":"T1","to":"T14"},{"from":"T1","to":"T15"},{"from":"T1","to":"T16"},{"from":"T12","to":"T17"},{"from":"T11","to":"T17"},{"from":"T4","to":"T18"},{"from":"T5","to":"T18"},{"from":"T6","to":"T18"},{"from":"T8","to":"T18"},{"from":"T3","to":"T18"},{"from":"T18","to":"T19"},{"from":"T4","to":"T20"},{"from":"T6","to":"T20"},{"from":"T8","to":"T20"},{"from":"T4","to":"T21"},{"from":"T7","to":"T21"},{"from":"T8","to":"T21"},{"from":"T3","to":"T21"},{"from":"T4","to":"T22"},{"from":"T7","to":"T22"},{"from":"T9","to":"T22"},{"from":"T13","to":"T22"},{"from":"T4","to":"T23"},{"from":"T7","to":"T23"},{"from":"T34","to":"T23"},{"from":"T10","to":"T24"},{"from":"T20","to":"T24"},{"from":"T22","to":"T24"},{"from":"T23","to":"T24"},{"from":"T4","to":"T25"},{"from":"T20","to":"T25"},{"from":"T4","to":"T26"},{"from":"T8","to":"T26"},{"from":"T6","to":"T26"},{"from":"T4","to":"T27"},{"from":"T8","to":"T27"},{"from":"T12","to":"T27"},{"from":"T4","to":"T28"},{"from":"T8","to":"T28"},{"from":"T12","to":"T28"},{"from":"T22","to":"T29"},{"from":"T8","to":"T29"},{"from":"T14","to":"T29"},{"from":"T22","to":"T30"},{"from":"T11","to":"T30"},{"from":"T10","to":"T30"},{"from":"T26","to":"T31"},{"from":"T18","to":"T32"},{"from":"T20","to":"T32"},{"from":"T21","to":"T32"},{"from":"T22","to":"T32"},{"from":"T33","to":"T34"},{"from":"T34","to":"T35"},{"from":"T34","to":"T36"},{"from":"T34","to":"T37"},{"from":"T36","to":"T37"},{"from":"T34","to":"T38"},{"from":"T34","to":"T39"},{"from":"T36","to":"T39"},{"from":"T34","to":"T40"},{"from":"T37","to":"T40"},{"from":"T34","to":"T41"},{"from":"T18","to":"T42"},{"from":"T23","to":"T42"},{"from":"T24","to":"T42"},{"from":"T13","to":"T42"},{"from":"T35","to":"T42"},{"from":"T18","to":"T43"},{"from":"T23","to":"T43"},{"from":"T20","to":"T43"},{"from":"T14","to":"T43"},{"from":"T36","to":"T43"},{"from":"T18","to":"T44"},{"from":"T23","to":"T44"},{"from":"T21","to":"T44"},{"from":"T39","to":"T44"},{"from":"T23","to":"T45"},{"from":"T20","to":"T45"},{"from":"T11","to":"T45"},{"from":"T25","to":"T45"},{"from":"T36","to":"T45"},{"from":"T23","to":"T46"},{"from":"T20","to":"T46"},{"from":"T11","to":"T46"},{"from":"T37","to":"T46"},{"from":"T18","to":"T47"},{"from":"T23","to":"T47"},{"from":"T21","to":"T47"},{"from":"T11","to":"T47"},{"from":"T37","to":"T47"},{"from":"T38","to":"T47"},{"from":"T18","to":"T48"},{"from":"T23","to":"T48"},{"from":"T21","to":"T48"},{"from":"T30","to":"T48"},{"from":"T38","to":"T48"},{"from":"T18","to":"T49"},{"from":"T23","to":"T49"},{"from":"T21","to":"T49"},{"from":"T15","to":"T49"},{"from":"T40","to":"T49"},{"from":"T23","to":"T50"},{"from":"T21","to":"T50"},{"from":"T27","to":"T50"},{"from":"T28","to":"T50"},{"from":"T41","to":"T50"},{"from":"T23","to":"T51"},{"from":"T21","to":"T51"},{"from":"T29","to":"T51"},{"from":"T36","to":"T51"},{"from":"T18","to":"T52"},{"from":"T23","to":"T52"},{"from":"T13","to":"T52"},{"from":"T14","to":"T52"},{"from":"T36","to":"T52"},{"from":"T23","to":"T53"},{"from":"T20","to":"T53"},{"from":"T36","to":"T53"},{"from":"T35","to":"T53"},{"from":"T22","to":"T54"},{"from":"T24","to":"T54"},{"from":"T31","to":"T54"},{"from":"T23","to":"T55"},{"from":"T25","to":"T55"},{"from":"T38","to":"T55"},{"from":"T18","to":"T56"},{"from":"T21","to":"T56"},{"from":"T26","to":"T56"},{"from":"T18","to":"T57"},{"from":"T21","to":"T57"},{"from":"T2","to":"T57"},{"from":"T22","to":"T58"},{"from":"T24","to":"T58"},{"from":"T9","to":"T58"},{"from":"T25","to":"T58"},{"from":"T35","to":"T58"},{"from":"T36","to":"T58"},{"from":"T37","to":"T58"},{"from":"T19","to":"T59"},{"from":"T18","to":"T60"},{"from":"T26","to":"T60"},{"from":"T16","to":"T60"},{"from":"T17","to":"T60"},{"from":"T18","to":"T61"},{"from":"T29","to":"T61"},{"from":"T36","to":"T61"},{"from":"T18","to":"T62"},{"from":"T27","to":"T62"},{"from":"T17","to":"T62"},{"from":"T38","to":"T62"},{"from":"T18","to":"T63"},{"from":"T26","to":"T63"},{"from":"T2","to":"T63"},{"from":"T35","to":"T64"},{"from":"T36","to":"T64"},{"from":"T37","to":"T64"},{"from":"T38","to":"T64"},{"from":"T65","to":"T68"},{"from":"T66","to":"T68"},{"from":"T68","to":"T69"},{"from":"T67","to":"T69"},{"from":"T65","to":"T70"},{"from":"T68","to":"T71"},{"from":"T67","to":"T71"},{"from":"T68","to":"T72"},{"from":"T69","to":"T72"},{"from":"T67","to":"T72"},{"from":"T64","to":"T72"},{"from":"T68","to":"T73"},{"from":"T69","to":"T73"},{"from":"T70","to":"T73"},{"from":"T71","to":"T73"},{"from":"T64","to":"T73"},{"from":"T65","to":"T74"},{"from":"T67","to":"T74"},{"from":"T64","to":"T74"},{"from":"T68","to":"T75"},{"from":"T69","to":"T75"},{"from":"T70","to":"T75"},{"from":"T71","to":"T75"},{"from":"T68","to":"T76"},{"from":"T64","to":"T76"},{"from":"T77","to":"T78"},{"from":"T42","to":"T78"},{"from":"T77","to":"T79"},{"from":"T43","to":"T79"},{"from":"T77","to":"T80"},{"from":"T44","to":"T80"},{"from":"T77","to":"T81"},{"from":"T45","to":"T81"},{"from":"T77","to":"T82"},{"from":"T46","to":"T82"},{"from":"T77","to":"T83"},{"from":"T47","to":"T83"},{"from":"T77","to":"T84"},{"from":"T48","to":"T84"},{"from":"T77","to":"T85"},{"from":"T49","to":"T85"},{"from":"T77","to":"T86"},{"from":"T50","to":"T86"},{"from":"T77","to":"T87"},{"from":"T51","to":"T87"},{"from":"T77","to":"T88"},{"from":"T52","to":"T88"},{"from":"T77","to":"T89"},{"from":"T53","to":"T89"},{"from":"T77","to":"T90"},{"from":"T54","to":"T90"},{"from":"T77","to":"T91"},{"from":"T55","to":"T91"},{"from":"T77","to":"T92"},{"from":"T56","to":"T92"},{"from":"T77","to":"T93"},{"from":"T57","to":"T93"},{"from":"T77","to":"T94"},{"from":"T58","to":"T94"},{"from":"T72","to":"T94"},{"from":"T73","to":"T94"},{"from":"T77","to":"T95"},{"from":"T59","to":"T95"},{"from":"T60","to":"T95"},{"from":"T61","to":"T95"},{"from":"T62","to":"T95"},{"from":"T63","to":"T95"},{"from":"T78","to":"T96"},{"from":"T79","to":"T96"},{"from":"T80","to":"T96"},{"from":"T81","to":"T96"},{"from":"T82","to":"T96"},{"from":"T83","to":"T96"},{"from":"T84","to":"T96"},{"from":"T85","to":"T96"},{"from":"T86","to":"T96"},{"from":"T87","to":"T96"},{"from":"T88","to":"T96"},{"from":"T89","to":"T96"},{"from":"T90","to":"T96"},{"from":"T91","to":"T96"},{"from":"T92","to":"T96"},{"from":"T93","to":"T96"},{"from":"T94","to":"T96"},{"from":"T95","to":"T96"},{"from":"T96","to":"T97"},{"from":"T32","to":"T98"},{"from":"T35","to":"T98"},{"from":"T36","to":"T98"},{"from":"T37","to":"T98"},{"from":"T38","to":"T98"},{"from":"T97","to":"T99"},{"from":"T98","to":"T99"},{"from":"T96","to":"T100"},{"from":"T99","to":"T100"}],"durations":{"T1":2,"T10":2,"T100":4,"T11":2,"T12":2,"T13":2,"T14":2,"T15":2,"T16":2,"T17":2,"T18":4,"T19":2,"T2":2,"T20":2,"T21":2,"T22":4,"T23":4,"T24":3,"T25":2,"T26":2,"T27":2,"T28":2,"T29":2,"T3":2,"T30":2,"T31":2,"T32":5,"T33":3,"T34":1,"T35":1,"T36":1,"T37":1,"T38":1,"T39":1,"T4":2,"T40":1,"T41":1,"T42":6,"T43":6,"T44":6,"T45":6,"T46":6,"T47":6,"T48":6,"T49":6,"T5":2,"T50":6,"T51":6,"T52":6,"T53":6,"T54":6,"T55":6,"T56":6,"T57":6,"T58":6,"T59":3,"T6":2,"T60":3,"T61":3,"T62":3,"T63":3,"T64":2,"T65":2,"T66":2,"T67":2,"T68":2,"T69":2,"T7":2,"T70":2,"T71":2,"T72":8,"T73":8,"T74":8,"T75":8,"T76":8,"T77":4,"T78":2,"T79":2,"T8":2,"T80":2,"T81":2,"T82":2,"T83":2,"T84":2,"T85":2,"T86":2,"T87":2,"T88":2,"T89":2,"T9":2,"T90":2,"T91":2,"T92":2,"T93":2,"T94":2,"T95":2,"T96":1,"T97":4,"T98":10,"T99":20},"durationUnit":"minutes","details":{"vertices":100,"edges":266,"directed":true,"weighted":false,"acyclic":true,"negativeWeights":false,"density":0.026868686868686868,"inDegree":{"min":0,"avg":2.66,"max":18},"outDegree":{"min":0,"avg":2.66,"max":18},"selfLoops":0,"components":1}},"problem":"Which targets can build at the same time, and how many rounds does the whole build take?","params":{},"result":{"kind":"groups","groups":[["T1","T2","T3","T33","T65","T66","T67","T77"],["T4","T5","T8","T10","T11","T14","T15","T16","T34","T68","T70"],["T6","T12","T35","T36","T38","T41","T69","T71"],["T7","T9","T13","T17","T18","T20","T26","T27","T28","T37","T39","T75"],["T19","T21","T22","T23","T25","T31","T40","T60","T62","T63","T64"],["T24","T29","T30","T32","T43","T44","T45","T46","T47","T49","T50","T52","T53","T55","T56","T57","T59","T72","T73","T74","T76"],["T42","T48","T51","T54","T58","T61","T79","T80","T81","T82","T83","T85","T86","T88","T89","T91","T92","T93","T98"],["T78","T84","T87","T90","T94","T95"],["T96"],["T97"],["T99"],["T100"]]},"answer":"The 100 vertices fall into 12 levels, so the work takes at least 12 rounds. The widest is level 6, with 21 vertices that can run at the same time: T24, T29, T30, T32, T43, T44, T45, T46, T47, T49 and 11 more.","legend":{"vertex":[{"id":"idle","label":"Has incoming edges left","color":"#64748B","shape":"hollow"},{"id":"waiting","label":"No incoming edges left, next level","color":"#E69F00","shape":"dashed-square"},{"id":"component-1","label":"Level 1, 8 vertices","color":"#56B4E9","shape":"filled"},{"id":"component-2","label":"Level 2, 11 vertices","color":"#CC79A7","shape":"dashed-square"},{"id":"component-3","label":"Level 3, 8 vertices","color":"#E69F00","shape":"filled"},{"id":"component-4","label":"Level 4, 12 vertices","color":"#F0E442","shape":"dashed-square"},{"id":"component-5","label":"Level 5, 11 vertices","color":"#D55E00","shape":"filled"},{"id":"component-6","label":"Level 6, 21 vertices","color":"#56B4E9","shape":"dashed-square"},{"id":"component-7","label":"Level 7, 19 vertices","color":"#CC79A7","shape":"filled"},{"id":"component-8","label":"Level 8, 6 vertices","color":"#009E73","shape":"dashed-square"},{"id":"single","label":"A level of one vertex","color":"#CBD5E1","shape":"hollow"}],"edge":[{"id":"idle","label":"Edge","color":"#475569","shape":"line"},{"id":"removed","label":"Removed, its start has a level","color":"#CC79A7","shape":"dashed"}],"panels":[{"id":"indegree","title":"In-degree left","kind":"table"},{"id":"levels","title":"Levels","kind":"groups"}]},"steps":[{"say":"Count the incoming edges of each vertex. A vertex with none waits for nothing, so it can go in the first level.","ops":[{"panel":"indegree","set":{"T1":"0"}},{"panel":"indegree","set":{"T2":"0"}},{"panel":"indegree","set":{"T3":"0"}},{"panel":"indegree","set":{"T4":"1"}},{"panel":"indegree","set":{"T5":"1"}},{"panel":"indegree","set":{"T6":"1"}},{"panel":"indegree","set":{"T7":"2"}},{"panel":"indegree","set":{"T8":"2"}},{"panel":"indegree","set":{"T9":"2"}},{"panel":"indegree","set":{"T10":"1"}},{"panel":"indegree","set":{"T11":"1"}},{"panel":"indegree","set":{"T12":"1"}},{"panel":"indegree","set":{"T13":"2"}},{"panel":"indegree","set":{"T14":"1"}},{"panel":"indegree","set":{"T15":"1"}},{"panel":"indegree","set":{"T16":"1"}},{"panel":"indegree","set":{"T17":"2"}},{"panel":"indegree","set":{"T18":"5"}},{"panel":"indegree","set":{"T19":"1"}},{"panel":"indegree","set":{"T20":"3"}},{"panel":"indegree","set":{"T21":"4"}},{"panel":"indegree","set":{"T22":"4"}},{"panel":"indegree","set":{"T23":"3"}},{"panel":"indegree","set":{"T24":"4"}},{"panel":"indegree","set":{"T25":"2"}},{"panel":"indegree","set":{"T26":"3"}},{"panel":"indegree","set":{"T27":"3"}},{"panel":"indegree","set":{"T28":"3"}},{"panel":"indegree","set":{"T29":"3"}},{"panel":"indegree","set":{"T30":"3"}},{"panel":"indegree","set":{"T31":"1"}},{"panel":"indegree","set":{"T32":"4"}},{"panel":"indegree","set":{"T33":"0"}},{"panel":"indegree","set":{"T34":"1"}},{"panel":"indegree","set":{"T35":"1"}},{"panel":"indegree","set":{"T36":"1"}},{"panel":"indegree","set":{"T37":"2"}},{"panel":"indegree","set":{"T38":"1"}},{"panel":"indegree","set":{"T39":"2"}},{"panel":"indegree","set":{"T40":"2"}},{"panel":"indegree","set":{"T41":"1"}},{"panel":"indegree","set":{"T42":"5"}},{"panel":"indegree","set":{"T43":"5"}},{"panel":"indegree","set":{"T44":"4"}},{"panel":"indegree","set":{"T45":"5"}},{"panel":"indegree","set":{"T46":"4"}},{"panel":"indegree","set":{"T47":"6"}},{"panel":"indegree","set":{"T48":"5"}},{"panel":"indegree","set":{"T49":"5"}},{"panel":"indegree","set":{"T50":"5"}},{"panel":"indegree","set":{"T51":"4"}},{"panel":"indegree","set":{"T52":"5"}},{"panel":"indegree","set":{"T53":"4"}},{"panel":"indegree","set":{"T54":"3"}},{"panel":"indegree","set":{"T55":"3"}},{"panel":"indegree","set":{"T56":"3"}},{"panel":"indegree","set":{"T57":"3"}},{"panel":"indegree","set":{"T58":"7"}},{"panel":"indegree","set":{"T59":"1"}},{"panel":"indegree","set":{"T60":"4"}},{"panel":"indegree","set":{"T61":"3"}},{"panel":"indegree","set":{"T62":"4"}},{"panel":"indegree","set":{"T63":"3"}},{"panel":"indegree","set":{"T64":"4"}},{"panel":"indegree","set":{"T65":"0"}},{"panel":"indegree","set":{"T66":"0"}},{"panel":"indegree","set":{"T67":"0"}},{"panel":"indegree","set":{"T68":"2"}},{"panel":"indegree","set":{"T69":"2"}},{"panel":"indegree","set":{"T70":"1"}},{"panel":"indegree","set":{"T71":"2"}},{"panel":"indegree","set":{"T72":"4"}},{"panel":"indegree","set":{"T73":"5"}},{"panel":"indegree","set":{"T74":"3"}},{"panel":"indegree","set":{"T75":"4"}},{"panel":"indegree","set":{"T76":"2"}},{"panel":"indegree","set":{"T77":"0"}},{"panel":"indegree","set":{"T78":"2"}},{"panel":"indegree","set":{"T79":"2"}},{"panel":"indegree","set":{"T80":"2"}},{"panel":"indegree","set":{"T81":"2"}},{"panel":"indegree","set":{"T82":"2"}},{"panel":"indegree","set":{"T83":"2"}},{"panel":"indegree","set":{"T84":"2"}},{"panel":"indegree","set":{"T85":"2"}},{"panel":"indegree","set":{"T86":"2"}},{"panel":"indegree","set":{"T87":"2"}},{"panel":"indegree","set":{"T88":"2"}},{"panel":"indegree","set":{"T89":"2"}},{"panel":"indegree","set":{"T90":"2"}},{"panel":"indegree","set":{"T91":"2"}},{"panel":"indegree","set":{"T92":"2"}},{"panel":"indegree","set":{"T93":"2"}},{"panel":"indegree","set":{"T94":"4"}},{"panel":"indegree","set":{"T95":"6"}},{"panel":"indegree","set":{"T96":"18"}},{"panel":"indegree","set":{"T97":"1"}},{"panel":"indegree","set":{"T98":"5"}},{"panel":"indegree","set":{"T99":"2"}},{"panel":"indegree","set":{"T100":"2"}}]},{"say":"Level 1: T1, T2, T3, T33, T65, T66, T67 and T77 have no incoming edges, so they can run first, at the same time.","ops":[{"v":"T1","state":"component-1"},{"v":"T2","state":"component-1"},{"v":"T3","state":"component-1"},{"v":"T33","state":"component-1"},{"v":"T65","state":"component-1"},{"v":"T66","state":"component-1"},{"v":"T67","state":"component-1"},{"v":"T77","state":"component-1"},{"panel":"levels","groups":[["T1","T2","T3","T33","T65","T66","T67","T77"]]}]},{"say":"Remove the 42 edges out of level 1. That leaves T4, T5, T10, T11, T14, T15, T16, T8, T34, T70 and 1 more with no incoming edges, so they go in level 2.","ops":[{"e":["T1","T4"],"state":"removed"},{"panel":"indegree","set":{"T4":"0"}},{"e":["T1","T5"],"state":"removed"},{"panel":"indegree","set":{"T5":"0"}},{"e":["T1","T8"],"state":"removed"},{"panel":"indegree","set":{"T8":"0"}},{"e":["T1","T10"],"state":"removed"},{"panel":"indegree","set":{"T10":"0"}},{"e":["T1","T11"],"state":"removed"},{"panel":"indegree","set":{"T11":"0"}},{"e":["T1","T13"],"state":"removed"},{"panel":"indegree","set":{"T13":"1"}},{"e":["T1","T14"],"state":"removed"},{"panel":"indegree","set":{"T14":"0"}},{"e":["T1","T15"],"state":"removed"},{"panel":"indegree","set":{"T15":"0"}},{"e":["T1","T16"],"state":"removed"},{"panel":"indegree","set":{"T16":"0"}},{"e":["T2","T8"],"state":"removed"},{"panel":"indegree","set":{"T8":"0"}},{"e":["T2","T9"],"state":"removed"},{"panel":"indegree","set":{"T9":"1"}},{"e":["T2","T57"],"state":"removed"},{"panel":"indegree","set":{"T57":"2"}},{"e":["T2","T63"],"state":"removed"},{"panel":"indegree","set":{"T63":"2"}},{"e":["T3","T18"],"state":"removed"},{"panel":"indegree","set":{"T18":"4"}},{"e":["T3","T21"],"state":"removed"},{"panel":"indegree","set":{"T21":"3"}},{"e":["T33","T34"],"state":"removed"},{"panel":"indegree","set":{"T34":"0"}},{"e":["T65","T68"],"state":"removed"},{"panel":"indegree","set":{"T68":"0"}},{"e":["T65","T70"],"state":"removed"},{"panel":"indegree","set":{"T70":"0"}},{"e":["T65","T74"],"state":"removed"},{"panel":"indegree","set":{"T74":"1"}},{"e":["T66","T68"],"state":"removed"},{"panel":"indegree","set":{"T68":"0"}},{"e":["T67","T69"],"state":"removed"},{"panel":"indegree","set":{"T69":"1"}},{"e":["T67","T71"],"state":"removed"},{"panel":"indegree","set":{"T71":"1"}},{"e":["T67","T72"],"state":"removed"},{"panel":"indegree","set":{"T72":"3"}},{"e":["T67","T74"],"state":"removed"},{"panel":"indegree","set":{"T74":"1"}},{"e":["T77","T78"],"state":"removed"},{"panel":"indegree","set":{"T78":"1"}},{"e":["T77","T79"],"state":"removed"},{"panel":"indegree","set":{"T79":"1"}},{"e":["T77","T80"],"state":"removed"},{"panel":"indegree","set":{"T80":"1"}},{"e":["T77","T81"],"state":"removed"},{"panel":"indegree","set":{"T81":"1"}},{"e":["T77","T82"],"state":"removed"},{"panel":"indegree","set":{"T82":"1"}},{"e":["T77","T83"],"state":"removed"},{"panel":"indegree","set":{"T83":"1"}},{"e":["T77","T84"],"state":"removed"},{"panel":"indegree","set":{"T84":"1"}},{"e":["T77","T85"],"state":"removed"},{"panel":"indegree","set":{"T85":"1"}},{"e":["T77","T86"],"state":"removed"},{"panel":"indegree","set":{"T86":"1"}},{"e":["T77","T87"],"state":"removed"},{"panel":"indegree","set":{"T87":"1"}},{"e":["T77","T88"],"state":"removed"},{"panel":"indegree","set":{"T88":"1"}},{"e":["T77","T89"],"state":"removed"},{"panel":"indegree","set":{"T89":"1"}},{"e":["T77","T90"],"state":"removed"},{"panel":"indegree","set":{"T90":"1"}},{"e":["T77","T91"],"state":"removed"},{"panel":"indegree","set":{"T91":"1"}},{"e":["T77","T92"],"state":"removed"},{"panel":"indegree","set":{"T92":"1"}},{"e":["T77","T93"],"state":"removed"},{"panel":"indegree","set":{"T93":"1"}},{"e":["T77","T94"],"state":"removed"},{"panel":"indegree","set":{"T94":"3"}},{"e":["T77","T95"],"state":"removed"},{"panel":"indegree","set":{"T95":"5"}},{"v":"T4","state":"waiting"},{"v":"T5","state":"waiting"},{"v":"T10","state":"waiting"},{"v":"T11","state":"waiting"},{"v":"T14","state":"waiting"},{"v":"T15","state":"waiting"},{"v":"T16","state":"waiting"},{"v":"T8","state":"waiting"},{"v":"T34","state":"waiting"},{"v":"T70","state":"waiting"},{"v":"T68","state":"waiting"}]},{"say":"Level 2: T4, T5, T8, T10, T11, T14, T15, T16, T34, T68 and 1 more have no incoming edges left, so they can run at the same time.","ops":[{"v":"T4","state":"component-2"},{"v":"T5","state":"component-2"},{"v":"T8","state":"component-2"},{"v":"T10","state":"component-2"},{"v":"T11","state":"component-2"},{"v":"T14","state":"component-2"},{"v":"T15","state":"component-2"},{"v":"T16","state":"component-2"},{"v":"T34","state":"component-2"},{"v":"T68","state":"component-2"},{"v":"T70","state":"component-2"},{"panel":"levels","groups":[["T1","T2","T3","T33","T65","T66","T67","T77"],["T4","T5","T8","T10","T11","T14","T15","T16","T34","T68","T70"]]}]},{"say":"Remove the 48 edges out of level 2. That leaves T12, T6, T35, T36, T38, T41, T69 and T71 with no incoming edges, so they go in level 3.","ops":[{"e":["T4","T12"],"state":"removed"},{"panel":"indegree","set":{"T12":"0"}},{"e":["T4","T18"],"state":"removed"},{"panel":"indegree","set":{"T18":"1"}},{"e":["T4","T20"],"state":"removed"},{"panel":"indegree","set":{"T20":"1"}},{"e":["T4","T21"],"state":"removed"},{"panel":"indegree","set":{"T21":"1"}},{"e":["T4","T22"],"state":"removed"},{"panel":"indegree","set":{"T22":"3"}},{"e":["T4","T23"],"state":"removed"},{"panel":"indegree","set":{"T23":"1"}},{"e":["T4","T25"],"state":"removed"},{"panel":"indegree","set":{"T25":"1"}},{"e":["T4","T26"],"state":"removed"},{"panel":"indegree","set":{"T26":"1"}},{"e":["T4","T27"],"state":"removed"},{"panel":"indegree","set":{"T27":"1"}},{"e":["T4","T28"],"state":"removed"},{"panel":"indegree","set":{"T28":"1"}},{"e":["T5","T6"],"state":"removed"},{"panel":"indegree","set":{"T6":"0"}},{"e":["T5","T7"],"state":"removed"},{"panel":"indegree","set":{"T7":"1"}},{"e":["T5","T18"],"state":"removed"},{"panel":"indegree","set":{"T18":"1"}},{"e":["T8","T18"],"state":"removed"},{"panel":"indegree","set":{"T18":"1"}},{"e":["T8","T20"],"state":"removed"},{"panel":"indegree","set":{"T20":"1"}},{"e":["T8","T21"],"state":"removed"},{"panel":"indegree","set":{"T21":"1"}},{"e":["T8","T26"],"state":"removed"},{"panel":"indegree","set":{"T26":"1"}},{"e":["T8","T27"],"state":"removed"},{"panel":"indegree","set":{"T27":"1"}},{"e":["T8","T28"],"state":"removed"},{"panel":"indegree","set":{"T28":"1"}},{"e":["T8","T29"],"state":"removed"},{"panel":"indegree","set":{"T29":"1"}},{"e":["T10","T24"],"state":"removed"},{"panel":"indegree","set":{"T24":"3"}},{"e":["T10","T30"],"state":"removed"},{"panel":"indegree","set":{"T30":"1"}},{"e":["T11","T17"],"state":"removed"},{"panel":"indegree","set":{"T17":"1"}},{"e":["T11","T30"],"state":"removed"},{"panel":"indegree","set":{"T30":"1"}},{"e":["T11","T45"],"state":"removed"},{"panel":"indegree","set":{"T45":"4"}},{"e":["T11","T46"],"state":"removed"},{"panel":"indegree","set":{"T46":"3"}},{"e":["T11","T47"],"state":"removed"},{"panel":"indegree","set":{"T47":"5"}},{"e":["T14","T29"],"state":"removed"},{"panel":"indegree","set":{"T29":"1"}},{"e":["T14","T43"],"state":"removed"},{"panel":"indegree","set":{"T43":"4"}},{"e":["T14","T52"],"state":"removed"},{"panel":"indegree","set":{"T52":"4"}},{"e":["T15","T49"],"state":"removed"},{"panel":"indegree","set":{"T49":"4"}},{"e":["T16","T60"],"state":"removed"},{"panel":"indegree","set":{"T60":"3"}},{"e":["T34","T23"],"state":"removed"},{"panel":"indegree","set":{"T23":"1"}},{"e":["T34","T35"],"state":"removed"},{"panel":"indegree","set":{"T35":"0"}},{"e":["T34","T36"],"state":"removed"},{"panel":"indegree","set":{"T36":"0"}},{"e":["T34","T37"],"state":"removed"},{"panel":"indegree","set":{"T37":"1"}},{"e":["T34","T38"],"state":"removed"},{"panel":"indegree","set":{"T38":"0"}},{"e":["T34","T39"],"state":"removed"},{"panel":"indegree","set":{"T39":"1"}},{"e":["T34","T40"],"state":"removed"},{"panel":"indegree","set":{"T40":"1"}},{"e":["T34","T41"],"state":"removed"},{"panel":"indegree","set":{"T41":"0"}},{"e":["T68","T69"],"state":"removed"},{"panel":"indegree","set":{"T69":"0"}},{"e":["T68","T71"],"state":"removed"},{"panel":"indegree","set":{"T71":"0"}},{"e":["T68","T72"],"state":"removed"},{"panel":"indegree","set":{"T72":"2"}},{"e":["T68","T73"],"state":"removed"},{"panel":"indegree","set":{"T73":"3"}},{"e":["T68","T75"],"state":"removed"},{"panel":"indegree","set":{"T75":"2"}},{"e":["T68","T76"],"state":"removed"},{"panel":"indegree","set":{"T76":"1"}},{"e":["T70","T73"],"state":"removed"},{"panel":"indegree","set":{"T73":"3"}},{"e":["T70","T75"],"state":"removed"},{"panel":"indegree","set":{"T75":"2"}},{"v":"T12","state":"waiting"},{"v":"T6","state":"waiting"},{"v":"T35","state":"waiting"},{"v":"T36","state":"waiting"},{"v":"T38","state":"waiting"},{"v":"T41","state":"waiting"},{"v":"T69","state":"waiting"},{"v":"T71","state":"waiting"}]},{"say":"Level 3: T6, T12, T35, T36, T38, T41, T69 and T71 have no incoming edges left, so they can run at the same time.","ops":[{"v":"T6","state":"component-3"},{"v":"T12","state":"component-3"},{"v":"T35","state":"component-3"},{"v":"T36","state":"component-3"},{"v":"T38","state":"component-3"},{"v":"T41","state":"component-3"},{"v":"T69","state":"component-3"},{"v":"T71","state":"component-3"},{"panel":"levels","groups":[["T1","T2","T3","T33","T65","T66","T67","T77"],["T4","T5","T8","T10","T11","T14","T15","T16","T34","T68","T70"],["T6","T12","T35","T36","T38","T41","T69","T71"]]}]},{"say":"Remove the 37 edges out of level 3. That leaves T7, T9, T18, T20, T26, T13, T17, T27, T28, T37 and 2 more with no incoming edges, so they go in level 4.","ops":[{"e":["T6","T7"],"state":"removed"},{"panel":"indegree","set":{"T7":"0"}},{"e":["T6","T9"],"state":"removed"},{"panel":"indegree","set":{"T9":"0"}},{"e":["T6","T18"],"state":"removed"},{"panel":"indegree","set":{"T18":"0"}},{"e":["T6","T20"],"state":"removed"},{"panel":"indegree","set":{"T20":"0"}},{"e":["T6","T26"],"state":"removed"},{"panel":"indegree","set":{"T26":"0"}},{"e":["T12","T13"],"state":"removed"},{"panel":"indegree","set":{"T13":"0"}},{"e":["T12","T17"],"state":"removed"},{"panel":"indegree","set":{"T17":"0"}},{"e":["T12","T27"],"state":"removed"},{"panel":"indegree","set":{"T27":"0"}},{"e":["T12","T28"],"state":"removed"},{"panel":"indegree","set":{"T28":"0"}},{"e":["T35","T42"],"state":"removed"},{"panel":"indegree","set":{"T42":"4"}},{"e":["T35","T53"],"state":"removed"},{"panel":"indegree","set":{"T53":"2"}},{"e":["T35","T58"],"state":"removed"},{"panel":"indegree","set":{"T58":"5"}},{"e":["T35","T64"],"state":"removed"},{"panel":"indegree","set":{"T64":"1"}},{"e":["T35","T98"],"state":"removed"},{"panel":"indegree","set":{"T98":"2"}},{"e":["T36","T37"],"state":"removed"},{"panel":"indegree","set":{"T37":"0"}},{"e":["T36","T39"],"state":"removed"},{"panel":"indegree","set":{"T39":"0"}},{"e":["T36","T43"],"state":"removed"},{"panel":"indegree","set":{"T43":"3"}},{"e":["T36","T45"],"state":"removed"},{"panel":"indegree","set":{"T45":"3"}},{"e":["T36","T51"],"state":"removed"},{"panel":"indegree","set":{"T51":"3"}},{"e":["T36","T52"],"state":"removed"},{"panel":"indegree","set":{"T52":"3"}},{"e":["T36","T53"],"state":"removed"},{"panel":"indegree","set":{"T53":"2"}},{"e":["T36","T58"],"state":"removed"},{"panel":"indegree","set":{"T58":"5"}},{"e":["T36","T61"],"state":"removed"},{"panel":"indegree","set":{"T61":"2"}},{"e":["T36","T64"],"state":"removed"},{"panel":"indegree","set":{"T64":"1"}},{"e":["T36","T98"],"state":"removed"},{"panel":"indegree","set":{"T98":"2"}},{"e":["T38","T47"],"state":"removed"},{"panel":"indegree","set":{"T47":"4"}},{"e":["T38","T48"],"state":"removed"},{"panel":"indegree","set":{"T48":"4"}},{"e":["T38","T55"],"state":"removed"},{"panel":"indegree","set":{"T55":"2"}},{"e":["T38","T62"],"state":"removed"},{"panel":"indegree","set":{"T62":"3"}},{"e":["T38","T64"],"state":"removed"},{"panel":"indegree","set":{"T64":"1"}},{"e":["T38","T98"],"state":"removed"},{"panel":"indegree","set":{"T98":"2"}},{"e":["T41","T50"],"state":"removed"},{"panel":"indegree","set":{"T50":"4"}},{"e":["T69","T72"],"state":"removed"},{"panel":"indegree","set":{"T72":"1"}},{"e":["T69","T73"],"state":"removed"},{"panel":"indegree","set":{"T73":"1"}},{"e":["T69","T75"],"state":"removed"},{"panel":"indegree","set":{"T75":"0"}},{"e":["T71","T73"],"state":"removed"},{"panel":"indegree","set":{"T73":"1"}},{"e":["T71","T75"],"state":"removed"},{"panel":"indegree","set":{"T75":"0"}},{"v":"T7","state":"waiting"},{"v":"T9","state":"waiting"},{"v":"T18","state":"waiting"},{"v":"T20","state":"waiting"},{"v":"T26","state":"waiting"},{"v":"T13","state":"waiting"},{"v":"T17","state":"waiting"},{"v":"T27","state":"waiting"},{"v":"T28","state":"waiting"},{"v":"T37","state":"waiting"},{"v":"T39","state":"waiting"},{"v":"T75","state":"waiting"}]},{"say":"Level 4: T7, T9, T13, T17, T18, T20, T26, T27, T28, T37 and 2 more have no incoming edges left, so they can run at the same time.","ops":[{"v":"T7","state":"component-4"},{"v":"T9","state":"component-4"},{"v":"T13","state":"component-4"},{"v":"T17","state":"component-4"},{"v":"T18","state":"component-4"},{"v":"T20","state":"component-4"},{"v":"T26","state":"component-4"},{"v":"T27","state":"component-4"},{"v":"T28","state":"component-4"},{"v":"T37","state":"component-4"},{"v":"T39","state":"component-4"},{"v":"T75","state":"component-4"},{"panel":"levels","groups":[["T1","T2","T3","T33","T65","T66","T67","T77"],["T4","T5","T8","T10","T11","T14","T15","T16","T34","T68","T70"],["T6","T12","T35","T36","T38","T41","T69","T71"],["T7","T9","T13","T17","T18","T20","T26","T27","T28","T37","T39","T75"]]}]},{"say":"Remove the 46 edges out of level 4. That leaves T21, T23, T22, T19, T25, T31, T60, T63, T62, T40 and 1 more with no incoming edges, so they go in level 5.","ops":[{"e":["T7","T21"],"state":"removed"},{"panel":"indegree","set":{"T21":"0"}},{"e":["T7","T22"],"state":"removed"},{"panel":"indegree","set":{"T22":"0"}},{"e":["T7","T23"],"state":"removed"},{"panel":"indegree","set":{"T23":"0"}},{"e":["T9","T22"],"state":"removed"},{"panel":"indegree","set":{"T22":"0"}},{"e":["T9","T58"],"state":"removed"},{"panel":"indegree","set":{"T58":"3"}},{"e":["T13","T22"],"state":"removed"},{"panel":"indegree","set":{"T22":"0"}},{"e":["T13","T42"],"state":"removed"},{"panel":"indegree","set":{"T42":"2"}},{"e":["T13","T52"],"state":"removed"},{"panel":"indegree","set":{"T52":"1"}},{"e":["T17","T60"],"state":"removed"},{"panel":"indegree","set":{"T60":"0"}},{"e":["T17","T62"],"state":"removed"},{"panel":"indegree","set":{"T62":"0"}},{"e":["T18","T19"],"state":"removed"},{"panel":"indegree","set":{"T19":"0"}},{"e":["T18","T32"],"state":"removed"},{"panel":"indegree","set":{"T32":"2"}},{"e":["T18","T42"],"state":"removed"},{"panel":"indegree","set":{"T42":"2"}},{"e":["T18","T43"],"state":"removed"},{"panel":"indegree","set":{"T43":"1"}},{"e":["T18","T44"],"state":"removed"},{"panel":"indegree","set":{"T44":"2"}},{"e":["T18","T47"],"state":"removed"},{"panel":"indegree","set":{"T47":"2"}},{"e":["T18","T48"],"state":"removed"},{"panel":"indegree","set":{"T48":"3"}},{"e":["T18","T49"],"state":"removed"},{"panel":"indegree","set":{"T49":"3"}},{"e":["T18","T52"],"state":"removed"},{"panel":"indegree","set":{"T52":"1"}},{"e":["T18","T56"],"state":"removed"},{"panel":"indegree","set":{"T56":"1"}},{"e":["T18","T57"],"state":"removed"},{"panel":"indegree","set":{"T57":"1"}},{"e":["T18","T60"],"state":"removed"},{"panel":"indegree","set":{"T60":"0"}},{"e":["T18","T61"],"state":"removed"},{"panel":"indegree","set":{"T61":"1"}},{"e":["T18","T62"],"state":"removed"},{"panel":"indegree","set":{"T62":"0"}},{"e":["T18","T63"],"state":"removed"},{"panel":"indegree","set":{"T63":"0"}},{"e":["T20","T24"],"state":"removed"},{"panel":"indegree","set":{"T24":"2"}},{"e":["T20","T25"],"state":"removed"},{"panel":"indegree","set":{"T25":"0"}},{"e":["T20","T32"],"state":"removed"},{"panel":"indegree","set":{"T32":"2"}},{"e":["T20","T43"],"state":"removed"},{"panel":"indegree","set":{"T43":"1"}},{"e":["T20","T45"],"state":"removed"},{"panel":"indegree","set":{"T45":"2"}},{"e":["T20","T46"],"state":"removed"},{"panel":"indegree","set":{"T46":"1"}},{"e":["T20","T53"],"state":"removed"},{"panel":"indegree","set":{"T53":"1"}},{"e":["T26","T31"],"state":"removed"},{"panel":"indegree","set":{"T31":"0"}},{"e":["T26","T56"],"state":"removed"},{"panel":"indegree","set":{"T56":"1"}},{"e":["T26","T60"],"state":"removed"},{"panel":"indegree","set":{"T60":"0"}},{"e":["T26","T63"],"state":"removed"},{"panel":"indegree","set":{"T63":"0"}},{"e":["T27","T50"],"state":"removed"},{"panel":"indegree","set":{"T50":"2"}},{"e":["T27","T62"],"state":"removed"},{"panel":"indegree","set":{"T62":"0"}},{"e":["T28","T50"],"state":"removed"},{"panel":"indegree","set":{"T50":"2"}},{"e":["T37","T40"],"state":"removed"},{"panel":"indegree","set":{"T40":"0"}},{"e":["T37","T46"],"state":"removed"},{"panel":"indegree","set":{"T46":"1"}},{"e":["T37","T47"],"state":"removed"},{"panel":"indegree","set":{"T47":"2"}},{"e":["T37","T58"],"state":"removed"},{"panel":"indegree","set":{"T58":"3"}},{"e":["T37","T64"],"state":"removed"},{"panel":"indegree","set":{"T64":"0"}},{"e":["T37","T98"],"state":"removed"},{"panel":"indegree","set":{"T98":"1"}},{"e":["T39","T44"],"state":"removed"},{"panel":"indegree","set":{"T44":"2"}},{"v":"T21","state":"waiting"},{"v":"T23","state":"waiting"},{"v":"T22","state":"waiting"},{"v":"T19","state":"waiting"},{"v":"T25","state":"waiting"},{"v":"T31","state":"waiting"},{"v":"T60","state":"waiting"},{"v":"T63","state":"waiting"},{"v":"T62","state":"waiting"},{"v":"T40","state":"waiting"},{"v":"T64","state":"waiting"}]},{"say":"Level 5: T19, T21, T22, T23, T25, T31, T40, T60, T62, T63 and 1 more have no incoming edges left, so they can run at the same time.","ops":[{"v":"T19","state":"component-5"},{"v":"T21","state":"component-5"},{"v":"T22","state":"component-5"},{"v":"T23","state":"component-5"},{"v":"T25","state":"component-5"},{"v":"T31","state":"component-5"},{"v":"T40","state":"component-5"},{"v":"T60","state":"component-5"},{"v":"T62","state":"component-5"},{"v":"T63","state":"component-5"},{"v":"T64","state":"component-5"},{"panel":"levels","groups":[["T1","T2","T3","T33","T65","T66","T67","T77"],["T4","T5","T8","T10","T11","T14","T15","T16","T34","T68","T70"],["T6","T12","T35","T36","T38","T41","T69","T71"],["T7","T9","T13","T17","T18","T20","T26","T27","T28","T37","T39","T75"],["T19","T21","T22","T23","T25","T31","T40","T60","T62","T63","T64"]]}]},{"say":"Remove the 42 edges out of level 5. That leaves T59, T56, T57, T29, T30, T32, T24, T43, T44, T46 and 11 more with no incoming edges, so they go in level 6.","ops":[{"e":["T19","T59"],"state":"removed"},{"panel":"indegree","set":{"T59":"0"}},{"e":["T21","T32"],"state":"removed"},{"panel":"indegree","set":{"T32":"0"}},{"e":["T21","T44"],"state":"removed"},{"panel":"indegree","set":{"T44":"0"}},{"e":["T21","T47"],"state":"removed"},{"panel":"indegree","set":{"T47":"0"}},{"e":["T21","T48"],"state":"removed"},{"panel":"indegree","set":{"T48":"1"}},{"e":["T21","T49"],"state":"removed"},{"panel":"indegree","set":{"T49":"0"}},{"e":["T21","T50"],"state":"removed"},{"panel":"indegree","set":{"T50":"0"}},{"e":["T21","T51"],"state":"removed"},{"panel":"indegree","set":{"T51":"1"}},{"e":["T21","T56"],"state":"removed"},{"panel":"indegree","set":{"T56":"0"}},{"e":["T21","T57"],"state":"removed"},{"panel":"indegree","set":{"T57":"0"}},{"e":["T22","T24"],"state":"removed"},{"panel":"indegree","set":{"T24":"0"}},{"e":["T22","T29"],"state":"removed"},{"panel":"indegree","set":{"T29":"0"}},{"e":["T22","T30"],"state":"removed"},{"panel":"indegree","set":{"T30":"0"}},{"e":["T22","T32"],"state":"removed"},{"panel":"indegree","set":{"T32":"0"}},{"e":["T22","T54"],"state":"removed"},{"panel":"indegree","set":{"T54":"1"}},{"e":["T22","T58"],"state":"removed"},{"panel":"indegree","set":{"T58":"1"}},{"e":["T23","T24"],"state":"removed"},{"panel":"indegree","set":{"T24":"0"}},{"e":["T23","T42"],"state":"removed"},{"panel":"indegree","set":{"T42":"1"}},{"e":["T23","T43"],"state":"removed"},{"panel":"indegree","set":{"T43":"0"}},{"e":["T23","T44"],"state":"removed"},{"panel":"indegree","set":{"T44":"0"}},{"e":["T23","T45"],"state":"removed"},{"panel":"indegree","set":{"T45":"0"}},{"e":["T23","T46"],"state":"removed"},{"panel":"indegree","set":{"T46":"0"}},{"e":["T23","T47"],"state":"removed"},{"panel":"indegree","set":{"T47":"0"}},{"e":["T23","T48"],"state":"removed"},{"panel":"indegree","set":{"T48":"1"}},{"e":["T23","T49"],"state":"removed"},{"panel":"indegree","set":{"T49":"0"}},{"e":["T23","T50"],"state":"removed"},{"panel":"indegree","set":{"T50":"0"}},{"e":["T23","T51"],"state":"removed"},{"panel":"indegree","set":{"T51":"1"}},{"e":["T23","T52"],"state":"removed"},{"panel":"indegree","set":{"T52":"0"}},{"e":["T23","T53"],"state":"removed"},{"panel":"indegree","set":{"T53":"0"}},{"e":["T23","T55"],"state":"removed"},{"panel":"indegree","set":{"T55":"0"}},{"e":["T25","T45"],"state":"removed"},{"panel":"indegree","set":{"T45":"0"}},{"e":["T25","T55"],"state":"removed"},{"panel":"indegree","set":{"T55":"0"}},{"e":["T25","T58"],"state":"removed"},{"panel":"indegree","set":{"T58":"1"}},{"e":["T31","T54"],"state":"removed"},{"panel":"indegree","set":{"T54":"1"}},{"e":["T40","T49"],"state":"removed"},{"panel":"indegree","set":{"T49":"0"}},{"e":["T60","T95"],"state":"removed"},{"panel":"indegree","set":{"T95":"2"}},{"e":["T62","T95"],"state":"removed"},{"panel":"indegree","set":{"T95":"2"}},{"e":["T63","T95"],"state":"removed"},{"panel":"indegree","set":{"T95":"2"}},{"e":["T64","T72"],"state":"removed"},{"panel":"indegree","set":{"T72":"0"}},{"e":["T64","T73"],"state":"removed"},{"panel":"indegree","set":{"T73":"0"}},{"e":["T64","T74"],"state":"removed"},{"panel":"indegree","set":{"T74":"0"}},{"e":["T64","T76"],"state":"removed"},{"panel":"indegree","set":{"T76":"0"}},{"v":"T59","state":"waiting"},{"v":"T56","state":"waiting"},{"v":"T57","state":"waiting"},{"v":"T29","state":"waiting"},{"v":"T30","state":"waiting"},{"v":"T32","state":"waiting"},{"v":"T24","state":"waiting"},{"v":"T43","state":"waiting"},{"v":"T44","state":"waiting"},{"v":"T46","state":"waiting"},{"v":"T47","state":"waiting"},{"v":"T50","state":"waiting"},{"v":"T52","state":"waiting"},{"v":"T53","state":"waiting"},{"v":"T45","state":"waiting"},{"v":"T55","state":"waiting"},{"v":"T49","state":"waiting"},{"v":"T72","state":"waiting"},{"v":"T73","state":"waiting"},{"v":"T74","state":"waiting"},{"v":"T76","state":"waiting"}]},{"say":"Level 6: T24, T29, T30, T32, T43, T44, T45, T46, T47, T49 and 11 more have no incoming edges left, so they can run at the same time.","ops":[{"v":"T24","state":"component-6"},{"v":"T29","state":"component-6"},{"v":"T30","state":"component-6"},{"v":"T32","state":"component-6"},{"v":"T43","state":"component-6"},{"v":"T44","state":"component-6"},{"v":"T45","state":"component-6"},{"v":"T46","state":"component-6"},{"v":"T47","state":"component-6"},{"v":"T49","state":"component-6"},{"v":"T50","state":"component-6"},{"v":"T52","state":"component-6"},{"v":"T53","state":"component-6"},{"v":"T55","state":"component-6"},{"v":"T56","state":"component-6"},{"v":"T57","state":"component-6"},{"v":"T59","state":"component-6"},{"v":"T72","state":"component-6"},{"v":"T73","state":"component-6"},{"v":"T74","state":"component-6"},{"v":"T76","state":"component-6"},{"panel":"levels","groups":[["T1","T2","T3","T33","T65","T66","T67","T77"],["T4","T5","T8","T10","T11","T14","T15","T16","T34","T68","T70"],["T6","T12","T35","T36","T38","T41","T69","T71"],["T7","T9","T13","T17","T18","T20","T26","T27","T28","T37","T39","T75"],["T19","T21","T22","T23","T25","T31","T40","T60","T62","T63","T64"],["T24","T29","T30","T32","T43","T44","T45","T46","T47","T49","T50","T52","T53","T55","T56","T57","T59","T72","T73","T74","T76"]]}]},{"say":"Remove the 22 edges out of level 6. That leaves T42, T54, T58, T51, T61, T48, T98, T79, T80, T81 and 9 more with no incoming edges, so they go in level 7.","ops":[{"e":["T24","T42"],"state":"removed"},{"panel":"indegree","set":{"T42":"0"}},{"e":["T24","T54"],"state":"removed"},{"panel":"indegree","set":{"T54":"0"}},{"e":["T24","T58"],"state":"removed"},{"panel":"indegree","set":{"T58":"0"}},{"e":["T29","T51"],"state":"removed"},{"panel":"indegree","set":{"T51":"0"}},{"e":["T29","T61"],"state":"removed"},{"panel":"indegree","set":{"T61":"0"}},{"e":["T30","T48"],"state":"removed"},{"panel":"indegree","set":{"T48":"0"}},{"e":["T32","T98"],"state":"removed"},{"panel":"indegree","set":{"T98":"0"}},{"e":["T43","T79"],"state":"removed"},{"panel":"indegree","set":{"T79":"0"}},{"e":["T44","T80"],"state":"removed"},{"panel":"indegree","set":{"T80":"0"}},{"e":["T45","T81"],"state":"removed"},{"panel":"indegree","set":{"T81":"0"}},{"e":["T46","T82"],"state":"removed"},{"panel":"indegree","set":{"T82":"0"}},{"e":["T47","T83"],"state":"removed"},{"panel":"indegree","set":{"T83":"0"}},{"e":["T49","T85"],"state":"removed"},{"panel":"indegree","set":{"T85":"0"}},{"e":["T50","T86"],"state":"removed"},{"panel":"indegree","set":{"T86":"0"}},{"e":["T52","T88"],"state":"removed"},{"panel":"indegree","set":{"T88":"0"}},{"e":["T53","T89"],"state":"removed"},{"panel":"indegree","set":{"T89":"0"}},{"e":["T55","T91"],"state":"removed"},{"panel":"indegree","set":{"T91":"0"}},{"e":["T56","T92"],"state":"removed"},{"panel":"indegree","set":{"T92":"0"}},{"e":["T57","T93"],"state":"removed"},{"panel":"indegree","set":{"T93":"0"}},{"e":["T59","T95"],"state":"removed"},{"panel":"indegree","set":{"T95":"1"}},{"e":["T72","T94"],"state":"removed"},{"panel":"indegree","set":{"T94":"1"}},{"e":["T73","T94"],"state":"removed"},{"panel":"indegree","set":{"T94":"1"}},{"v":"T42","state":"waiting"},{"v":"T54","state":"waiting"},{"v":"T58","state":"waiting"},{"v":"T51","state":"waiting"},{"v":"T61","state":"waiting"},{"v":"T48","state":"waiting"},{"v":"T98","state":"waiting"},{"v":"T79","state":"waiting"},{"v":"T80","state":"waiting"},{"v":"T81","state":"waiting"},{"v":"T82","state":"waiting"},{"v":"T83","state":"waiting"},{"v":"T85","state":"waiting"},{"v":"T86","state":"waiting"},{"v":"T88","state":"waiting"},{"v":"T89","state":"waiting"},{"v":"T91","state":"waiting"},{"v":"T92","state":"waiting"},{"v":"T93","state":"waiting"}]},{"say":"Level 7: T42, T48, T51, T54, T58, T61, T79, T80, T81, T82 and 9 more have no incoming edges left, so they can run at the same time.","ops":[{"v":"T42","state":"component-7"},{"v":"T48","state":"component-7"},{"v":"T51","state":"component-7"},{"v":"T54","state":"component-7"},{"v":"T58","state":"component-7"},{"v":"T61","state":"component-7"},{"v":"T79","state":"component-7"},{"v":"T80","state":"component-7"},{"v":"T81","state":"component-7"},{"v":"T82","state":"component-7"},{"v":"T83","state":"component-7"},{"v":"T85","state":"component-7"},{"v":"T86","state":"component-7"},{"v":"T88","state":"component-7"},{"v":"T89","state":"component-7"},{"v":"T91","state":"component-7"},{"v":"T92","state":"component-7"},{"v":"T93","state":"component-7"},{"v":"T98","state":"component-7"},{"panel":"levels","groups":[["T1","T2","T3","T33","T65","T66","T67","T77"],["T4","T5","T8","T10","T11","T14","T15","T16","T34","T68","T70"],["T6","T12","T35","T36","T38","T41","T69","T71"],["T7","T9","T13","T17","T18","T20","T26","T27","T28","T37","T39","T75"],["T19","T21","T22","T23","T25","T31","T40","T60","T62","T63","T64"],["T24","T29","T30","T32","T43","T44","T45","T46","T47","T49","T50","T52","T53","T55","T56","T57","T59","T72","T73","T74","T76"],["T42","T48","T51","T54","T58","T61","T79","T80","T81","T82","T83","T85","T86","T88","T89","T91","T92","T93","T98"]]}]},{"say":"Remove the 19 edges out of level 7. That leaves T78, T84, T87, T90, T94 and T95 with no incoming edges, so they go in level 8.","ops":[{"e":["T42","T78"],"state":"removed"},{"panel":"indegree","set":{"T78":"0"}},{"e":["T48","T84"],"state":"removed"},{"panel":"indegree","set":{"T84":"0"}},{"e":["T51","T87"],"state":"removed"},{"panel":"indegree","set":{"T87":"0"}},{"e":["T54","T90"],"state":"removed"},{"panel":"indegree","set":{"T90":"0"}},{"e":["T58","T94"],"state":"removed"},{"panel":"indegree","set":{"T94":"0"}},{"e":["T61","T95"],"state":"removed"},{"panel":"indegree","set":{"T95":"0"}},{"e":["T79","T96"],"state":"removed"},{"panel":"indegree","set":{"T96":"6"}},{"e":["T80","T96"],"state":"removed"},{"panel":"indegree","set":{"T96":"6"}},{"e":["T81","T96"],"state":"removed"},{"panel":"indegree","set":{"T96":"6"}},{"e":["T82","T96"],"state":"removed"},{"panel":"indegree","set":{"T96":"6"}},{"e":["T83","T96"],"state":"removed"},{"panel":"indegree","set":{"T96":"6"}},{"e":["T85","T96"],"state":"removed"},{"panel":"indegree","set":{"T96":"6"}},{"e":["T86","T96"],"state":"removed"},{"panel":"indegree","set":{"T96":"6"}},{"e":["T88","T96"],"state":"removed"},{"panel":"indegree","set":{"T96":"6"}},{"e":["T89","T96"],"state":"removed"},{"panel":"indegree","set":{"T96":"6"}},{"e":["T91","T96"],"state":"removed"},{"panel":"indegree","set":{"T96":"6"}},{"e":["T92","T96"],"state":"removed"},{"panel":"indegree","set":{"T96":"6"}},{"e":["T93","T96"],"state":"removed"},{"panel":"indegree","set":{"T96":"6"}},{"e":["T98","T99"],"state":"removed"},{"panel":"indegree","set":{"T99":"1"}},{"v":"T78","state":"waiting"},{"v":"T84","state":"waiting"},{"v":"T87","state":"waiting"},{"v":"T90","state":"waiting"},{"v":"T94","state":"waiting"},{"v":"T95","state":"waiting"}]},{"say":"Level 8: T78, T84, T87, T90, T94 and T95 have no incoming edges left, so they can run at the same time.","ops":[{"v":"T78","state":"component-8"},{"v":"T84","state":"component-8"},{"v":"T87","state":"component-8"},{"v":"T90","state":"component-8"},{"v":"T94","state":"component-8"},{"v":"T95","state":"component-8"},{"panel":"levels","groups":[["T1","T2","T3","T33","T65","T66","T67","T77"],["T4","T5","T8","T10","T11","T14","T15","T16","T34","T68","T70"],["T6","T12","T35","T36","T38","T41","T69","T71"],["T7","T9","T13","T17","T18","T20","T26","T27","T28","T37","T39","T75"],["T19","T21","T22","T23","T25","T31","T40","T60","T62","T63","T64"],["T24","T29","T30","T32","T43","T44","T45","T46","T47","T49","T50","T52","T53","T55","T56","T57","T59","T72","T73","T74","T76"],["T42","T48","T51","T54","T58","T61","T79","T80","T81","T82","T83","T85","T86","T88","T89","T91","T92","T93","T98"],["T78","T84","T87","T90","T94","T95"]]}]},{"say":"Remove the 6 edges out of level 8. That leaves T96 with no incoming edges, so it goes in level 9.","ops":[{"e":["T78","T96"],"state":"removed"},{"panel":"indegree","set":{"T96":"0"}},{"e":["T84","T96"],"state":"removed"},{"panel":"indegree","set":{"T96":"0"}},{"e":["T87","T96"],"state":"removed"},{"panel":"indegree","set":{"T96":"0"}},{"e":["T90","T96"],"state":"removed"},{"panel":"indegree","set":{"T96":"0"}},{"e":["T94","T96"],"state":"removed"},{"panel":"indegree","set":{"T96":"0"}},{"e":["T95","T96"],"state":"removed"},{"panel":"indegree","set":{"T96":"0"}},{"v":"T96","state":"waiting"}]},{"say":"Level 9: T96 is the only vertex with no incoming edges left. It runs on its own.","ops":[{"v":"T96","state":"single"},{"panel":"levels","groups":[["T1","T2","T3","T33","T65","T66","T67","T77"],["T4","T5","T8","T10","T11","T14","T15","T16","T34","T68","T70"],["T6","T12","T35","T36","T38","T41","T69","T71"],["T7","T9","T13","T17","T18","T20","T26","T27","T28","T37","T39","T75"],["T19","T21","T22","T23","T25","T31","T40","T60","T62","T63","T64"],["T24","T29","T30","T32","T43","T44","T45","T46","T47","T49","T50","T52","T53","T55","T56","T57","T59","T72","T73","T74","T76"],["T42","T48","T51","T54","T58","T61","T79","T80","T81","T82","T83","T85","T86","T88","T89","T91","T92","T93","T98"],["T78","T84","T87","T90","T94","T95"],["T96"]]}]},{"say":"Remove the 2 edges out of level 9. That leaves T97 with no incoming edges, so it goes in level 10.","ops":[{"e":["T96","T97"],"state":"removed"},{"panel":"indegree","set":{"T97":"0"}},{"e":["T96","T100"],"state":"removed"},{"panel":"indegree","set":{"T100":"1"}},{"v":"T97","state":"waiting"}]},{"say":"Level 10: T97 is the only vertex with no incoming edges left. It runs on its own.","ops":[{"v":"T97","state":"single"},{"panel":"levels","groups":[["T1","T2","T3","T33","T65","T66","T67","T77"],["T4","T5","T8","T10","T11","T14","T15","T16","T34","T68","T70"],["T6","T12","T35","T36","T38","T41","T69","T71"],["T7","T9","T13","T17","T18","T20","T26","T27","T28","T37","T39","T75"],["T19","T21","T22","T23","T25","T31","T40","T60","T62","T63","T64"],["T24","T29","T30","T32","T43","T44","T45","T46","T47","T49","T50","T52","T53","T55","T56","T57","T59","T72","T73","T74","T76"],["T42","T48","T51","T54","T58","T61","T79","T80","T81","T82","T83","T85","T86","T88","T89","T91","T92","T93","T98"],["T78","T84","T87","T90","T94","T95"],["T96"],["T97"]]}]},{"say":"Remove the edge from T97 to T99. That leaves T99 with no incoming edges, so it goes in level 11.","ops":[{"e":["T97","T99"],"state":"removed"},{"panel":"indegree","set":{"T99":"0"}},{"v":"T99","state":"waiting"}]},{"say":"Level 11: T99 is the only vertex with no incoming edges left. It runs on its own.","ops":[{"v":"T99","state":"single"},{"panel":"levels","groups":[["T1","T2","T3","T33","T65","T66","T67","T77"],["T4","T5","T8","T10","T11","T14","T15","T16","T34","T68","T70"],["T6","T12","T35","T36","T38","T41","T69","T71"],["T7","T9","T13","T17","T18","T20","T26","T27","T28","T37","T39","T75"],["T19","T21","T22","T23","T25","T31","T40","T60","T62","T63","T64"],["T24","T29","T30","T32","T43","T44","T45","T46","T47","T49","T50","T52","T53","T55","T56","T57","T59","T72","T73","T74","T76"],["T42","T48","T51","T54","T58","T61","T79","T80","T81","T82","T83","T85","T86","T88","T89","T91","T92","T93","T98"],["T78","T84","T87","T90","T94","T95"],["T96"],["T97"],["T99"]]}]},{"say":"Remove the edge from T99 to T100. That leaves T100 with no incoming edges, so it goes in level 12.","ops":[{"e":["T99","T100"],"state":"removed"},{"panel":"indegree","set":{"T100":"0"}},{"v":"T100","state":"waiting"}]},{"say":"Level 12: T100 is the only vertex with no incoming edges left. It runs on its own.","ops":[{"v":"T100","state":"single"},{"panel":"levels","groups":[["T1","T2","T3","T33","T65","T66","T67","T77"],["T4","T5","T8","T10","T11","T14","T15","T16","T34","T68","T70"],["T6","T12","T35","T36","T38","T41","T69","T71"],["T7","T9","T13","T17","T18","T20","T26","T27","T28","T37","T39","T75"],["T19","T21","T22","T23","T25","T31","T40","T60","T62","T63","T64"],["T24","T29","T30","T32","T43","T44","T45","T46","T47","T49","T50","T52","T53","T55","T56","T57","T59","T72","T73","T74","T76"],["T42","T48","T51","T54","T58","T61","T79","T80","T81","T82","T83","T85","T86","T88","T89","T91","T92","T93","T98"],["T78","T84","T87","T90","T94","T95"],["T96"],["T97"],["T99"],["T100"]]}]},{"say":"Done. All 100 vertices have a level, 12 levels in all, and every edge goes from a level to a later one."}],"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":"levels, err := dag.Levels(g)\nif err != nil {\n\treturn err\n}\nfor i, level := range levels {\n\tvar names []string\n\tfor _, v := range level {\n\t\tnames = append(names, v.Label())\n\t}\n\tfmt.Println(i, strings.Join(names, \", \"))\n}"}
