[{"data":1,"prerenderedAt":11713},["ShallowReactive",2],{"nav:algorithms":3,"lesson:\u002Falgorithms\u002Fgraphs\u002Frepresentations-and-traversal":374,"course-wordcounts":11581,"ref-card-index":11637},[4,28,50,71,120,152,205,230,286,306,331,352],{"module":5,"moduleNumber":6,"slug":7,"lessons":8},"Foundations",1,"foundations",[9,15,21],{"title":10,"path":11,"lessonNumber":6,"topics":12,"summary":14},"What Is an Algorithm?","\u002Falgorithms\u002Ffoundations\u002Fwhat-is-an-algorithm",[5,13],"Correctness & Induction","An algorithm is a finite, mechanical recipe that transforms inputs into outputs. We pin down what counts as an algorithm, how we write one down, and the three things we always ask of it: is it correct, is it fast, and can we prove it.\n",{"title":16,"path":17,"lessonNumber":18,"topics":19,"summary":20},"Asymptotic Analysis","\u002Falgorithms\u002Ffoundations\u002Fasymptotic-analysis",2,[16],"We measure an algorithm's running time as a function of its input size, then strip away machine-specific constants and lower-order terms to compare algorithms cleanly. This lesson defines the RAM model and the $O$, $\\Omega$, $\\Theta$, $o$, and $\\omega$ notations, and shows how to read the cost of loops off the page.\n",{"title":22,"path":23,"lessonNumber":24,"topics":25,"summary":27},"Recurrences and the Master Theorem","\u002Falgorithms\u002Ffoundations\u002Frecurrences",3,[26],"Recurrences","Recursive and divide-and-conquer algorithms describe their own running time with a recurrence: $T(n)$ in terms of $T$ on smaller inputs. We solve recurrences three ways — drawing the recursion tree, guessing-and-verifying by induction, and applying the Master Theorem — using merge sort as the running example.\n",{"module":29,"moduleNumber":18,"slug":30,"lessons":31},"Divide & Conquer","divide-and-conquer",[32,38,44],{"title":33,"path":34,"lessonNumber":6,"topics":35,"summary":37},"Divide and Conquer & Mergesort","\u002Falgorithms\u002Fdivide-and-conquer\u002Fmergesort",[29,36],"Comparison Sorting","Divide and conquer breaks a problem into smaller copies of itself, solves them recursively, and stitches the answers together. We meet the paradigm through mergesort — its merge step, its loop-invariant proof, and the recursion tree that pins its cost at $\\Theta(n\\log n)$ — then glimpse Karatsuba multiplication as a second example of the same idea.",{"title":39,"path":40,"lessonNumber":18,"topics":41,"summary":43},"Quicksort","\u002Falgorithms\u002Fdivide-and-conquer\u002Fquicksort",[36,42],"Probabilistic Analysis","Quicksort sorts in place by partitioning around a pivot and recursing on each side. We give Lomuto and Hoare partitioning with a correctness invariant, see why a bad pivot costs $\\Theta(n^2)$ while a balanced one gives $\\Theta(n\\log n)$, and prove that randomizing the pivot makes the expected cost $\\Theta(n\\log n)$ on every input.",{"title":45,"path":46,"lessonNumber":24,"topics":47,"summary":49},"Linear-Time Selection","\u002Falgorithms\u002Fdivide-and-conquer\u002Fselection",[48,29],"Order Statistics","Finding the $k$-th smallest element looks like it should require sorting, but it does not. Quickselect adapts quicksort's partition to recurse on just one side, achieving expected $O(n)$. The median-of-medians algorithm guarantees a good pivot with the groups-of-five trick, pushing the worst case down to a provable $O(n)$.",{"module":51,"moduleNumber":24,"slug":52,"lessons":53},"Sorting & Order Statistics","sorting",[54,60,65],{"title":55,"path":56,"lessonNumber":6,"topics":57,"summary":59},"Heaps and Heapsort","\u002Falgorithms\u002Fsorting\u002Fheaps-and-heapsort",[58,36],"Heaps","A binary heap is a tree we store flat in an array, with index arithmetic standing in for pointers. We build the max-heap property bottom-up in $O(n)$ time, sort in place in $\\Theta(n\\log n)$ by repeatedly extracting the maximum, and reuse the same structure to implement a priority queue.",{"title":61,"path":62,"lessonNumber":18,"topics":63,"summary":64},"Lower Bounds for Comparison Sorting","\u002Falgorithms\u002Fsorting\u002Fsorting-lower-bounds",[36],"Every sort we have seen runs in $\\Omega(n\\log n)$, and that is no accident. Modeling a sort as a decision tree of comparisons, we show any such tree must have $n!$ leaves, forcing height $\\ge \\log_2(n!) = \\Omega(n\\log n)$ — a worst-case bound no comparison sort can ever beat.",{"title":66,"path":67,"lessonNumber":24,"topics":68,"summary":70},"Sorting in Linear Time","\u002Falgorithms\u002Fsorting\u002Flinear-time-sorting",[69],"Linear-Time Sorting","The $\\Omega(n\\log n)$ barrier only binds algorithms that compare. By instead using keys as array indices we slip past it: counting sort runs in $\\Theta(n+k)$ and is stable, radix sort layers it digit by digit, and bucket sort averages $\\Theta(n)$ on uniform data. We see exactly when each applies.",{"module":72,"moduleNumber":73,"slug":74,"lessons":75},"Data Structures",4,"data-structures",[76,82,88,93,99,105,113],{"title":77,"path":78,"lessonNumber":6,"topics":79,"summary":81},"Elementary Data Structures","\u002Falgorithms\u002Fdata-structures\u002Felementary-structures",[80],"Linear Structures","Every container is built one of two ways: **contiguous** in an array, or **linked** through pointers. We trade cache-friendly random access against $O(1)$ splicing, derive the **amortized $O(1)$** append of a doubling dynamic array, and assemble the two ordered access disciplines — the LIFO **stack** and the FIFO **queue** (with its generalization, the **deque**) — on top of both.",{"title":83,"path":84,"lessonNumber":18,"topics":85,"summary":87},"Hash Tables","\u002Falgorithms\u002Fdata-structures\u002Fhash-tables",[86],"Hashing","A hash table implements the dictionary — insert, search, delete — in expected $O(1)$ time by scattering keys across an array with a hash function. We build up from direct addressing, handle collisions by chaining and by open addressing, analyze the load factor $\\alpha$, and see how universal hashing earns its expected-time guarantee against every input.",{"title":89,"path":90,"lessonNumber":24,"topics":91,"summary":92},"Binary Search Trees","\u002Falgorithms\u002Fdata-structures\u002Fbinary-search-trees",[89],"A binary search tree keeps keys ordered so that every operation follows a single root-to-leaf path. We state the BST property, give search and insert, find minimum, maximum, and successor, see that an inorder walk emits the keys in sorted order, and confront the catch — every operation costs $O(h)$, and a carelessly built tree degrades to height $h = \\Theta(n)$, motivating balance.",{"title":94,"path":95,"lessonNumber":73,"topics":96,"summary":98},"AVL Trees","\u002Falgorithms\u002Fdata-structures\u002Favl-trees",[97],"Balanced Trees","An AVL tree is the first balanced BST: at every node the two subtrees' heights differ by at most $1$. A Fibonacci-style minimal-node argument forces height $h \\le 1.44\\log_2 n = O(\\log n)$, so search, insert, and delete are all $O(\\log n)$. Insertion rebalances with at most one of four rotation cases (LL, RR, LR, RL); deletion may rotate all the way to the root.",{"title":100,"path":101,"lessonNumber":102,"topics":103,"summary":104},"Balanced Search Trees","\u002Falgorithms\u002Fdata-structures\u002Fbalanced-trees",5,[97],"An ordinary BST can degrade to height $\\Theta(n)$; balanced search trees guarantee $h = O(\\log n)$ by maintaining invariants and repairing them after every update. We meet rotations, the local restructuring primitive, then red-black trees, whose color invariants force logarithmic height, and finally B-trees, which trade tall-and-thin for short-and-wide to win on disk.",{"title":106,"path":107,"lessonNumber":108,"topics":109,"summary":112},"Disjoint Sets (Union-Find)","\u002Falgorithms\u002Fdata-structures\u002Funion-find",6,[110,111],"Disjoint Sets","Amortized Analysis","The disjoint-set data structure tracks a partition of elements into groups, answering \"are these two in the same group?\" and merging groups on demand. A forest of parent pointers, sped up by union by rank and path compression, drives every operation to near-constant $O(\\alpha(n))$ amortized time — the engine behind connectivity queries and Kruskal's minimum spanning tree.",{"title":114,"path":115,"lessonNumber":116,"topics":117,"summary":119},"Fenwick & Segment Trees","\u002Falgorithms\u002Fdata-structures\u002Ffenwick-and-segment-trees",7,[118],"Range Queries","A prefix-sum array answers a range sum in $O(1)$ but pays $O(n)$ per update; a plain array updates in $O(1)$ but pays $O(n)$ per range sum. Fenwick and segment trees give us _both_ in $O(\\log n)$. The Fenwick (binary indexed) tree is a tiny array keyed by the low bit; the segment tree is a general balanced tree over canonical ranges that handles any associative aggregate and, with lazy propagation, range updates too.",{"module":121,"moduleNumber":102,"slug":122,"lessons":123},"Sequences & Strings","sequences",[124,130,135,141,147],{"title":125,"path":126,"lessonNumber":6,"topics":127,"summary":129},"Two Pointers, Sliding Windows & Prefix Sums","\u002Falgorithms\u002Fsequences\u002Ftwo-pointers-and-windows",[128],"Array Techniques","A family of array idioms that collapse an obvious $O(n^2)$ scan into a single $O(n)$ pass by maintaining an invariant as indices move. We meet two pointers (converging on a sorted array, and a fast\u002Fslow pair for in-place rewriting), the sliding window (fixed and variable size, amortized $O(n)$), and prefix sums, which answer any range-sum in $O(1)$ and count subarrays summing to $k$.",{"title":131,"path":132,"lessonNumber":18,"topics":133,"summary":134},"Monotonic Stacks & Queues","\u002Falgorithms\u002Fsequences\u002Fmonotonic-stacks",[128],"A **monotonic stack** keeps its contents sorted by popping every element that would break the order before each push — turning a family of \"previous\u002Fnext greater (or smaller) element\" questions into a single $O(n)$ scan. We derive the next-greater-element routine and its amortized analysis, fuse two such scans to measure the **largest rectangle in a histogram** in linear time, and extend the idea to a **monotonic deque** that streams the **sliding-window maximum** in $O(n)$.",{"title":136,"path":137,"lessonNumber":24,"topics":138,"summary":140},"Binary Search on the Answer","\u002Falgorithms\u002Fsequences\u002Fbinary-search-on-the-answer",[139],"Searching","Binary search is not really about arrays — it is about locating the boundary of a **monotone predicate** $p(x)$ in $O(\\log(\\text{range}))$ probes. We first pin down the half-open `while (lo \u003C hi)` template for $\\textsc{lower\\_bound}$ and $\\textsc{upper\\_bound}$, then generalize to \"binary search on the answer\": whenever feasibility is monotone in a numeric parameter, we binary search the parameter itself, calling a feasibility check at each step.",{"title":142,"path":143,"lessonNumber":73,"topics":144,"summary":146},"String Matching: Rabin–Karp, KMP & Z","\u002Falgorithms\u002Fsequences\u002Fstring-matching",[145],"Strings","Given a text $T$ of length $n$ and a pattern $P$ of length $m$, find every occurrence of $P$ in $T$. The naive scan costs $O(nm)$; we beat it three ways. Rabin–Karp uses a **rolling hash** to test alignments in $O(1)$ amortised each, with expected $O(n+m)$. KMP precomputes a **failure function** so the scan never re-reads a text character, for worst-case $O(n+m)$. The **Z-function** gives the same bound from a different angle and converts freely to KMP's table.",{"title":148,"path":149,"lessonNumber":102,"topics":150,"summary":151},"Tries & Prefix Trees","\u002Falgorithms\u002Fsequences\u002Ftries",[145],"A **trie** stores a set of strings in a tree keyed by _characters_, so that insert, search, and prefix-test all run in $O(L)$ time — the length of the key, _independent of how many keys are stored_. Shared prefixes are stored once, which makes tries the natural structure for autocomplete, wildcard dictionaries, board word-search, and — over the alphabet $\\{0,1\\}$ — the maximum-XOR-pair problem.",{"module":153,"moduleNumber":108,"slug":154,"lessons":155},"Graphs","graphs",[156,163,168,173,178,183,188,193,199],{"title":157,"path":158,"lessonNumber":6,"topics":159,"summary":162},"Graph Representations and Traversal","\u002Falgorithms\u002Fgraphs\u002Frepresentations-and-traversal",[160,161],"Graph Representations","Graph Traversal","A graph captures _relationships_ — who connects to whom. We fix the vocabulary, weigh the two standard representations (adjacency list versus matrix), then meet the two explorations you'll use constantly: breadth-first search, which finds shortest paths by number of edges, and depth-first search, whose discovery and finish times reveal a graph's hidden structure. Both run in $O(V + E)$.",{"title":164,"path":165,"lessonNumber":18,"topics":166,"summary":167},"Topological Sort and Strong Connectivity","\u002Falgorithms\u002Fgraphs\u002Ftopological-sort-and-scc",[161],"Directed acyclic graphs model dependencies: tasks that must precede other tasks. A _topological order_ lays such a graph out in a line so every edge points forward, and depth-first finish times hand it to us almost for free. We then ask the harder question for graphs _with_ cycles: which vertices can reach each other? The answer is the strongly connected components, found by a two-pass DFS.",{"title":169,"path":170,"lessonNumber":24,"topics":171,"summary":172},"Minimum Spanning Trees","\u002Falgorithms\u002Fgraphs\u002Fminimum-spanning-trees",[169],"Given a weighted network, how do we connect everything as cheaply as possible? The answer is a minimum spanning tree. One lemma, the cut property, justifies _every_ correct MST algorithm, and from it two famous greedy methods fall out: Kruskal's, which grows a forest edge by edge with a union-find structure, and Prim's, which grows a single tree using a priority queue.",{"title":174,"path":175,"lessonNumber":73,"topics":176,"summary":177},"Shortest Paths","\u002Falgorithms\u002Fgraphs\u002Fshortest-paths",[174],"Finding the cheapest route through a weighted network is one of the most-used algorithms in computing. A single operation — _relaxation_ — underlies them all. Dijkstra's algorithm solves the non-negative case greedily; Bellman-Ford handles negative edges and detects negative cycles; and Floyd-Warshall finds the shortest path between _every_ pair of vertices.",{"title":179,"path":180,"lessonNumber":102,"topics":181,"summary":182},"Network Flow","\u002Falgorithms\u002Fgraphs\u002Fnetwork-flow",[179],"How much can flow through a network from source to sink? Max-flow is a surprisingly general model — once you see a problem as flow, a whole toolbox opens up. We build flow networks, find maximum flows by repeatedly pushing along augmenting paths in the residual graph, prove the max-flow min-cut theorem, and watch bipartite matching fall out as a special case.",{"title":184,"path":185,"lessonNumber":108,"topics":186,"summary":187},"Bridges & Articulation Points","\u002Falgorithms\u002Fgraphs\u002Fbridges-and-articulation-points",[153],"A **bridge** is an edge whose removal disconnects the graph; an **articulation point** is a vertex whose removal does. Both are single points of failure in a network. A single depth-first search computes discovery times and **low-links**, and two local criteria — $low[v] > disc[u]$ for bridges, $low[v] \\ge disc[u]$ for cut vertices — find them all in $O(V+E)$.",{"title":189,"path":190,"lessonNumber":116,"topics":191,"summary":192},"Lowest Common Ancestor & Binary Lifting","\u002Falgorithms\u002Fgraphs\u002Flowest-common-ancestor",[153],"Given a rooted tree, the lowest common ancestor of $u$ and $v$ is the deepest node that is an ancestor of both. A naive walk answers one query in $O(h)$; **binary lifting** precomputes the $2^k$-th ancestor of every node in $O(n\\log n)$, then answers $k$-th-ancestor and LCA queries in $O(\\log n)$ each. We derive both jumps, apply them to tree distance, and compare against the Euler-tour + RMQ and Tarjan offline alternatives.",{"title":194,"path":195,"lessonNumber":196,"topics":197,"summary":198},"2-SAT via Implication Graphs","\u002Falgorithms\u002Fgraphs\u002Ftwo-sat",8,[153],"A boolean formula whose every clause has exactly two literals can be solved in _linear_ time — even though its three-literal cousin is NP-complete. The trick is to read each clause as a pair of implications, build a directed graph on the $2n$ literals, and ask a question we already know how to answer: which literals share a strongly connected component? The formula is satisfiable iff no variable lands in the same SCC as its own negation, and the SCCs' topological order hands us a satisfying assignment for free.",{"title":200,"path":201,"lessonNumber":202,"topics":203,"summary":204},"Eulerian Tours","\u002Falgorithms\u002Fgraphs\u002Feulerian-tours",9,[153],"An **Eulerian tour** uses every _edge_ of a graph exactly once. We give the exact parity and balance conditions under which one exists (even degree for undirected graphs, in-degree equal to out-degree for directed) and Hierholzer's $O(E)$ algorithm that constructs one by splicing closed sub-tours. We contrast this sharply with the **Hamiltonian** problem (visit every _vertex_ once), which is NP-complete: visiting edges is easy, visiting vertices is hard.",{"module":206,"moduleNumber":116,"slug":207,"lessons":208},"Greedy Algorithms","greedy",[209,214,220,225],{"title":210,"path":211,"lessonNumber":6,"topics":212,"summary":213},"The Greedy Method","\u002Falgorithms\u002Fgreedy\u002Fthe-greedy-method",[206],"A greedy algorithm builds a solution one locally-best choice at a time and never looks back. We pin down the two properties that make this work — the greedy-choice property and optimal substructure — prove the canonical activity-selection algorithm correct with an exchange argument, watch greedy fail spectacularly on the 0\u002F1 knapsack, and glimpse matroids as the theory that says exactly when greed is good.",{"title":215,"path":216,"lessonNumber":18,"topics":217,"summary":219},"Scheduling & Interval Partitioning","\u002Falgorithms\u002Fgreedy\u002Fscheduling-and-intervals",[218],"Greedy","Three classic scheduling problems all yield to greedy algorithms — and all three turn on a single design decision: which key to sort by. Interval scheduling sorts by **finish** time to pack the most compatible jobs; interval partitioning sorts by **start** time and proves the rooms needed equal the maximum overlap **depth**; minimizing maximum lateness sorts by **deadline** and is justified by an adjacent-swap exchange argument.",{"title":221,"path":222,"lessonNumber":24,"topics":223,"summary":224},"Huffman Codes","\u002Falgorithms\u002Fgreedy\u002Fhuffman-codes",[206],"Huffman coding is the greedy method's most beautiful application: it builds a provably optimal prefix-free binary code by repeatedly merging the two least frequent symbols. We develop prefix-free codes as binary trees, give the algorithm with a priority queue, build a Huffman tree from example frequencies, prove optimality with the same greedy-choice-plus-substructure argument, and pin the running time at $O(n\\log n)$.",{"title":226,"path":227,"lessonNumber":73,"topics":228,"summary":229},"Matroids & Exchange Arguments","\u002Falgorithms\u002Fgreedy\u002Fmatroids",[218],"The capstone of the greedy module: _why_ and _when_ a greedy algorithm is provably optimal. We recap the two correctness templates — **greedy-stays-ahead** and the **exchange argument** — then meet the **matroid** $M=(S,\\mathcal{I})$, an abstraction whose **exchange property** is exactly the structure greedy needs. The matroid–greedy theorem says sorting by weight and taking what stays independent yields a maximum-weight basis _if and only if_ the structure is a matroid. Kruskal's MST is the canonical instance; 0\u002F1 knapsack and TSP are the canonical failures.",{"module":231,"moduleNumber":196,"slug":232,"lessons":233},"Dynamic Programming","dynamic-programming",[234,239,245,250,255,260,265,270,275,280],{"title":235,"path":236,"lessonNumber":6,"topics":237,"summary":238},"Principles of Dynamic Programming","\u002Falgorithms\u002Fdynamic-programming\u002Fprinciples",[231,26],"Dynamic programming is recursion with memory: when a recursive solution re-solves the same subproblems again and again, we solve each one once and store the answer. We pin down the two structural conditions that make this work — overlapping subproblems and optimal substructure — contrast top-down memoization with bottom-up tabulation, and distil the whole method into a five-step recipe.",{"title":240,"path":241,"lessonNumber":18,"topics":242,"summary":244},"Sequence Alignment & LCS","\u002Falgorithms\u002Fdynamic-programming\u002Fsequence-dp",[231,243],"String Structures","Two strings can be compared by asking how much of one survives inside the other. The longest common subsequence (LCS) and edit distance are the two classic answers, and they are the _same_ dynamic program wearing different costs. We derive the LCS recurrence by examining the last characters, fill a worked DP table, reconstruct the subsequence, and then show edit distance as the identical $\\Theta(mn)$ pattern.",{"title":246,"path":247,"lessonNumber":24,"topics":248,"summary":249},"Longest Increasing Subsequence","\u002Falgorithms\u002Fdynamic-programming\u002Flongest-increasing-subsequence",[231],"Given a sequence of numbers, how long is its longest strictly increasing subsequence? A first dynamic program indexes subproblems by the element each subsequence _ends at_, giving an $O(n^2)$ solution with parent-pointer reconstruction. A sharper idea, the patience-sorting _tails_ array searched by binary search, drops the time to $O(n\\log n)$. We then fold in the variants: non-decreasing, counting, Russian-doll envelopes, and bitonic.",{"title":251,"path":252,"lessonNumber":73,"topics":253,"summary":254},"Knapsack & Subset Problems","\u002Falgorithms\u002Fdynamic-programming\u002Fknapsack",[231],"We start from $\\textsc{Subset-sum}$ — does some sublist hit a target $t$? — and its include\u002Fexclude recurrence over a boolean table $A(i, u)$, then bolt on values to get 0\u002F1 knapsack as the same machine with $\\lor$ promoted to $\\max$. We fill both tables, recover the chosen items, and confront the surprise that the $\\Theta(nt)$ running time is only _pseudo-polynomial_ — exponential in the bit length $b$, and unimprovable unless $\\mathrm{P}=\\mathrm{NP}$ since subset-sum is $\\textsc{NP-complete}$. The fractional variant reveals the sharp line between greedy and dynamic programming.",{"title":256,"path":257,"lessonNumber":102,"topics":258,"summary":259},"Coin Change & Unbounded Knapsack","\u002Falgorithms\u002Fdynamic-programming\u002Fcoin-change-and-unbounded",[231],"The previous lesson let each item be taken at most once. Drop that cap — items may be reused _any number of times_ — and the 0\u002F1 knapsack collapses from a two-dimensional table to a one-dimensional one, because there is no longer a prefix of \"already-used\" items to track. We meet **unbounded knapsack**, then its most famous instance, **coin change**: the minimum-coins recurrence $C[a] = 1 + \\min_c C[a-c]$, and the counting variant where the _order of the loops_ decides whether you count unordered combinations or ordered sequences — the classic bug. Greed fails in general but works for canonical coin systems.",{"title":261,"path":262,"lessonNumber":108,"topics":263,"summary":264},"Interval DP","\u002Falgorithms\u002Fdynamic-programming\u002Finterval-dp",[231],"Many problems ask for the best way to combine a contiguous range of items, and the answer is a dynamic program over subintervals $[i,j]$ that chooses a split point $k$. We derive the pattern from matrix-chain multiplication — parenthesising a product to minimize scalar multiplications in $O(n^3)$ — distil it into a reusable template filled by increasing interval length, and then meet its sharpest variant: the \"last operation\" trick behind Burst Balloons and cutting a stick, where fixing the _last_ move (not the first) makes the two sides independent.",{"title":266,"path":267,"lessonNumber":116,"topics":268,"summary":269},"Dynamic Programming on Trees","\u002Falgorithms\u002Fdynamic-programming\u002Ftree-dp",[231],"When the subproblems of a dynamic program are _rooted subtrees_, a single post-order DFS solves the whole thing in $O(n)$: each node combines the already-computed answers of its children. We meet the archetype — maximum-weight independent set on a tree — then the \"path through a node\" pattern behind tree diameter and maximum path sum, and finally **rerooting**, which computes a per-node answer for _every_ node as root in $O(n)$ with two passes.",{"title":271,"path":272,"lessonNumber":196,"topics":273,"summary":274},"Bitmask DP","\u002Falgorithms\u002Fdynamic-programming\u002Fbitmask-dp",[231],"When a subproblem depends not on an index or a prefix but on _which subset_ of a small ground set has been used, we can encode that subset as the bits of an integer and index a DP table by it. With $n \\le \\sim 20$ the $2^n$ subsets fit in a table, turning $\\Theta(n!)$ brute force into $O(2^n \\cdot \\text{poly}(n))$. We meet the bit tricks, the Held–Karp TSP archetype, assignment by mask, subset-sum partitioning, and submask enumeration with its $3^n$ bound.",{"title":276,"path":277,"lessonNumber":202,"topics":278,"summary":279},"DP Optimizations","\u002Falgorithms\u002Fdynamic-programming\u002Fdp-optimizations",[231],"A correct DP recurrence is only half the battle; its naive evaluation is often a factor of $n$ slower than necessary. This capstone surveys five techniques, monotonic-queue, the convex hull trick, divide-and-conquer optimization, Knuth's optimization, and SOS DP, that each exploit _structure in the transition_ (a sliding window, linear costs, monotone optimal splits, the quadrangle inequality, or subset lattices) to shave an $O(n)$, $O(\\log n)$, or worse factor off the running time.",{"title":281,"path":282,"lessonNumber":283,"topics":284,"summary":285},"Dynamic Programming on Graphs","\u002Falgorithms\u002Fdynamic-programming\u002Fdp-on-graphs",10,[231],"Many graph algorithms are dynamic programs in disguise: the subproblem is the _best value reachable under a restricted resource_ — intermediate vertices allowed, edges allowed, or a topological prefix — and edge _relaxation_ is the DP transition. We frame Floyd–Warshall as the archetype ($O(V^3)$ all-pairs shortest paths), Bellman–Ford as a DP over path length (the at-most-$K$-stops variant), DAG-DP in topological order ($O(V+E)$), and Warshall's transitive closure as the boolean analog.",{"module":287,"moduleNumber":202,"slug":288,"lessons":289},"Backtracking & Search","backtracking",[290,296,301],{"title":291,"path":292,"lessonNumber":6,"topics":293,"summary":295},"Backtracking: Subsets, Permutations & Combinations","\u002Falgorithms\u002Fbacktracking\u002Fbacktracking-fundamentals",[294],"Backtracking","Backtracking builds a solution one choice at a time and abandons a partial solution the moment it cannot be completed, exploring a state-space tree by depth-first search. We meet the universal choose\u002Fexplore\u002Fun-choose template, derive the canonical enumerations — subsets ($2^n$), permutations ($n!$), and combinations ($\\binom{n}{k}$) — handle duplicate elements by skipping equal siblings, and see how pruning turns an exponential search into a tractable one.",{"title":297,"path":298,"lessonNumber":18,"topics":299,"summary":300},"Constraint Search: N-Queens & Sudoku","\u002Falgorithms\u002Fbacktracking\u002Fconstraint-search",[294],"Many hard puzzles are **constraint satisfaction problems**: assign each variable a value from its domain so that every constraint holds. Backtracking solves them by assigning variables one at a time and rejecting a partial assignment the instant a constraint breaks. We make the rejection cheap — $O(1)$ conflict checks for N-Queens via column and diagonal sets — and prune harder with **forward checking**, **MRV** ordering, and **constraint propagation**, which is what lets an exponential search actually finish.",{"title":302,"path":303,"lessonNumber":24,"topics":304,"summary":305},"Branch & Bound and Meet in the Middle","\u002Falgorithms\u002Fbacktracking\u002Fbranch-and-bound",[294],"Plain backtracking prunes a search tree by _feasibility_; for _optimization_ problems we can prune far more aggressively by _value_. **Branch and bound** keeps the best complete solution found so far and discards any partial solution whose optimistic bound cannot beat it. **Meet in the middle** splits the instance in two, enumerates each half, and recombines by binary search — turning $2^n$ into $O(2^{n\u002F2}\\,n)$ and pushing exact search out to $n \\approx 40$.",{"module":307,"moduleNumber":283,"slug":308,"lessons":309},"Mathematical Algorithms","mathematical-algorithms",[310,316,321,326],{"title":311,"path":312,"lessonNumber":6,"topics":313,"summary":315},"Number Theory: GCD & Modular Arithmetic","\u002Falgorithms\u002Fmathematical-algorithms\u002Fnumber-theory-basics",[314],"Number Theory","This lesson opens the mathematical-algorithms module with the bedrock of computational number theory. We prove Euclid's recurrence $\\gcd(a,b)=\\gcd(b,\\,a\\bmod b)$ and its $O(\\log\\min(a,b))$ running time, extend it to recover Bézout coefficients $x,y$ with $ax+by=\\gcd(a,b)$, and build modular arithmetic on residue classes — including when a modular inverse $a^{-1}\\bmod m$ exists and how to compute it.",{"title":317,"path":318,"lessonNumber":18,"topics":319,"summary":320},"Modular Exponentiation & Primality","\u002Falgorithms\u002Fmathematical-algorithms\u002Fmodular-exponentiation-and-primality",[314],"Computing $a^n \\bmod m$ naively costs $n$ multiplications; **repeated squaring** does it in $O(\\log n)$ by reading the bits of the exponent. We use this routine to state **Fermat's little theorem** (and the modular inverse it gives), then to test primality — trial division, the probabilistic **Fermat** and **Miller–Rabin** tests, and the deterministic witness set that settles primality for every 64-bit number.",{"title":322,"path":323,"lessonNumber":24,"topics":324,"summary":325},"Sieves & Factorization","\u002Falgorithms\u002Fmathematical-algorithms\u002Fsieve-and-factorization",[314],"The previous lesson tested one number for primality; here we ask for _all_ primes up to $n$ at once. The **sieve of Eratosthenes** cross-cuts composites in $O(n\\log\\log n)$, and a **linear sieve** does it in $O(n)$ while recording each number's **smallest prime factor**, which then factors any $x \\le n$ in $O(\\log x)$. From a factorization $x = \\prod p_i^{e_i}$ the multiplicative functions $\\tau$, $\\sigma$, and Euler's totient $\\varphi$ fall out immediately.",{"title":327,"path":328,"lessonNumber":73,"topics":329,"summary":330},"Combinatorics & Counting","\u002Falgorithms\u002Fmathematical-algorithms\u002Fcombinatorics",[314],"Counting is the arithmetic of finite sets. We build up from permutations $n!$ and combinations $\\binom{n}{k}$, prove Pascal's rule by a bijection, and count multisets with stars and bars. The practical core is computing $\\binom{n}{k}\\bmod p$ in $O(1)$ from precomputed factorials and inverse factorials. We close with inclusion–exclusion and the Chinese Remainder Theorem, both of which lean on the modular inverse from the previous lesson.",{"module":332,"moduleNumber":333,"slug":334,"lessons":335},"Computational Geometry",11,"computational-geometry",[336,342,347],{"title":337,"path":338,"lessonNumber":6,"topics":339,"summary":341},"Geometric Primitives & Orientation","\u002Falgorithms\u002Fcomputational-geometry\u002Fgeometric-primitives",[340],"Geometry","Computational geometry is built on a single reliable primitive — the **orientation test**, a sign of a cross product that tells whether three points turn left, right, or lie collinear. From points-as-vectors and the dot and cross products we derive orientation, segment intersection, the shoelace area formula, and point-in-polygon tests, keeping all arithmetic **exact and integer** so that no floating-point rounding can corrupt a sign.",{"title":343,"path":344,"lessonNumber":18,"topics":345,"summary":346},"Convex Hull","\u002Falgorithms\u002Fcomputational-geometry\u002Fconvex-hull",[340],"The convex hull is the smallest convex polygon enclosing a point set — the rubber band snapped around the nails. We build it with Andrew's monotone chain, sorting by $(x,y)$ and sweeping a lower and upper hull while popping any non-left turn via the orientation primitive, in $O(n\\log n)$. A reduction from sorting shows that bound is optimal, and the hull unlocks diameter, smallest enclosing rectangle, and more through rotating calipers.",{"title":348,"path":349,"lessonNumber":24,"topics":350,"summary":351},"Sweep-Line Algorithms","\u002Falgorithms\u002Fcomputational-geometry\u002Fsweep-line",[340],"The plane-sweep paradigm turns a static $2$-D geometry problem into a dynamic $1$-D ordered-set problem: a vertical line sweeps left to right, stopping at an $x$-sorted **event queue** while a balanced-BST **status structure** tracks the objects it currently crosses, ordered by $y$. We derive Bentley–Ottmann segment intersection in $O((n+k)\\log n)$, recover closest-pair in $O(n\\log n)$, and reduce skyline, rectangle-area, and overlap problems to $\\pm1$ event sweeps.",{"module":353,"moduleNumber":354,"slug":355,"lessons":356},"Intractability",12,"intractability",[357,363,367],{"title":358,"path":359,"lessonNumber":6,"topics":360,"summary":362},"P, NP, and Reductions","\u002Falgorithms\u002Fintractability\u002Fp-np-reductions",[361],"NP-Completeness","Most problems we have met so far have fast algorithms. A vast and important family seemingly does not. This lesson builds the vocabulary for that divide: decision problems, the class $\\mathsf{P}$ of problems we can solve quickly, the class $\\mathsf{NP}$ of problems whose solutions we can _check_ quickly, and polynomial-time reductions, the tool that lets us compare the difficulty of two problems without solving either.",{"title":361,"path":364,"lessonNumber":18,"topics":365,"summary":366},"\u002Falgorithms\u002Fintractability\u002Fnp-completeness",[361],"Some problems in $\\mathsf{NP}$ are universally hardest: every other problem in $\\mathsf{NP}$ reduces to them. This lesson defines $\\mathsf{NP}$-hard and $\\mathsf{NP}$-complete, states the Cook–Levin theorem that anchors the whole edifice on **SAT**, walks the web of reductions that grows from it, and gives the four-step recipe for proving a brand-new problem $\\mathsf{NP}$-complete.",{"title":368,"path":369,"lessonNumber":24,"topics":370,"summary":373},"Coping with NP-Hardness","\u002Falgorithms\u002Fintractability\u002Fcoping-with-hardness",[371,372],"Approximation","Heuristics","Proving a problem $\\mathsf{NP}$-hard is the beginning, not the end. The world still needs answers. This lesson surveys the four honest responses to hardness: approximation algorithms with a provable ratio (worked through a 2-approximation for vertex cover), heuristics and local search, exact exponential methods like branch and bound, and exploiting special structure in the instances you actually face.",{"id":375,"title":157,"blurb":376,"body":377,"description":11539,"extension":11540,"meta":11541,"module":153,"navigation":11543,"path":158,"practice":11544,"rawbody":11563,"readingTime":11564,"seo":11569,"sources":11570,"status":11577,"stem":11578,"summary":162,"topics":11579,"__hash__":11580},"course\u002F01.algorithms\u002F06.graphs\u002F01.representations-and-traversal.md","",{"type":378,"value":379,"toc":11526},"minimark",[380,413,418,542,872,1130,1133,2502,2505,2584,2944,2948,2985,3067,3328,3799,3838,4389,4447,4451,4473,4555,4599,4720,4731,4769,4989,4993,5054,5256,5371,5528,5819,6307,6429,6818,7130,7510,7520,7559,7613,7617,7643,7911,7958,8022,8141,8146,8287,8624,8773,8797,8922,9317,9792,9970,9974,10027,10684,10690,10694,10767,10993,11000,11004,11417,11522],[381,382,383,384,388,389,392,393,397,398,401,402],"p",{},"Almost every interesting structure (a road map, a social network, the\ndependencies between tasks, the states of a puzzle) is a set of ",[385,386,387],"em",{},"things"," and\nthe ",[385,390,391],{},"connections"," between them. A ",[394,395,396],"strong",{},"graph"," is the mathematical object that\ncaptures exactly this and nothing more. Mastering a handful of graph algorithms\ngives you a lever on a startlingly wide range of problems; Skiena's blunt\nadvice is that the hardest part is usually ",[385,399,400],{},"recognizing"," that your problem is a\ngraph problem in disguise.",[403,404,405],"sup",{},[406,407,412],"a",{"href":408,"ariaDescribedBy":409,"dataFootnoteRef":376,"id":411},"#user-content-fn-skiena-graph",[410],"footnote-label","user-content-fnref-skiena-graph","1",[414,415,417],"h2",{"id":416},"what-is-a-graph","What is a graph?",[419,420,422],"callout",{"type":421},"definition",[381,423,424,427,428,502,503,518,519,522,523,518,538,541],{},[394,425,426],{},"Definition (Graph)."," A graph ",[429,430,433],"span",{"className":431},[432],"katex",[429,434,438,466],{"className":435,"ariaHidden":437},[436],"katex-html","true",[429,439,442,447,453,458,463],{"className":440},[441],"base",[429,443],{"className":444,"style":446},[445],"strut","height:0.6833em;",[429,448,452],{"className":449},[450,451],"mord","mathnormal","G",[429,454],{"className":455,"style":457},[456],"mspace","margin-right:0.2778em;",[429,459,462],{"className":460},[461],"mrel","=",[429,464],{"className":465,"style":457},[456],[429,467,469,473,478,483,488,492,497],{"className":468},[441],[429,470],{"className":471,"style":472},[445],"height:1em;vertical-align:-0.25em;",[429,474,477],{"className":475},[476],"mopen","(",[429,479,482],{"className":480,"style":481},[450,451],"margin-right:0.2222em;","V",[429,484,487],{"className":485},[486],"mpunct",",",[429,489],{"className":490,"style":491},[456],"margin-right:0.1667em;",[429,493,496],{"className":494,"style":495},[450,451],"margin-right:0.0576em;","E",[429,498,501],{"className":499},[500],"mclose",")"," is a finite set ",[429,504,506],{"className":505},[432],[429,507,509],{"className":508,"ariaHidden":437},[436],[429,510,512,515],{"className":511},[441],[429,513],{"className":514,"style":446},[445],[429,516,482],{"className":517,"style":481},[450,451]," of ",[394,520,521],{},"vertices"," together with a\nset ",[429,524,526],{"className":525},[432],[429,527,529],{"className":528,"ariaHidden":437},[436],[429,530,532,535],{"className":531},[441],[429,533],{"className":534,"style":446},[445],[429,536,496],{"className":537,"style":495},[450,451],[394,539,540],{},"edges",", where each edge joins a pair of vertices.",[381,543,544,545,586,587,603,604,619,620,623,624,654,655,658,659,658,674,658,677,692,693,696,697,700,701,745,746,789,790,793,794,603,809,824,825,871],{},"If edges have no direction, so that an edge ",[429,546,548],{"className":547},[432],[429,549,551],{"className":550,"ariaHidden":437},[436],[429,552,554,557],{"className":553},[441],[429,555],{"className":556,"style":472},[445],[429,558,561,567,571,574,577,582],{"className":559},[560],"minner",[429,562,566],{"className":563,"style":565},[476,564],"delimcenter","top:0em;","{",[429,568,570],{"className":569},[450,451],"u",[429,572,487],{"className":573},[486],[429,575],{"className":576,"style":491},[456],[429,578,581],{"className":579,"style":580},[450,451],"margin-right:0.0359em;","v",[429,583,585],{"className":584,"style":565},[500,564],"}"," connects ",[429,588,590],{"className":589},[432],[429,591,593],{"className":592,"ariaHidden":437},[436],[429,594,596,600],{"className":595},[441],[429,597],{"className":598,"style":599},[445],"height:0.4306em;",[429,601,570],{"className":602},[450,451]," and ",[429,605,607],{"className":606},[432],[429,608,610],{"className":609,"ariaHidden":437},[436],[429,611,613,616],{"className":612},[441],[429,614],{"className":615,"style":599},[445],[429,617,581],{"className":618,"style":580},[450,451],"\nsymmetrically, the graph is ",[394,621,622],{},"undirected",". If each edge is an ordered pair\n",[429,625,627],{"className":626},[432],[429,628,630],{"className":629,"ariaHidden":437},[436],[429,631,633,636,639,642,645,648,651],{"className":632},[441],[429,634],{"className":635,"style":472},[445],[429,637,477],{"className":638},[476],[429,640,570],{"className":641},[450,451],[429,643,487],{"className":644},[486],[429,646],{"className":647,"style":491},[456],[429,649,581],{"className":650,"style":580},[450,451],[429,652,501],{"className":653},[500]," pointing ",[385,656,657],{},"from"," ",[429,660,662],{"className":661},[432],[429,663,665],{"className":664,"ariaHidden":437},[436],[429,666,668,671],{"className":667},[441],[429,669],{"className":670,"style":599},[445],[429,672,570],{"className":673},[450,451],[385,675,676],{},"to",[429,678,680],{"className":679},[432],[429,681,683],{"className":682,"ariaHidden":437},[436],[429,684,686,689],{"className":685},[441],[429,687],{"className":688,"style":599},[445],[429,690,581],{"className":691,"style":580},[450,451],", the graph is ",[394,694,695],{},"directed"," (a ",[385,698,699],{},"digraph",").\nWe write ",[429,702,704],{"className":703},[432],[429,705,707,726],{"className":706,"ariaHidden":437},[436],[429,708,710,713,717,720,723],{"className":709},[441],[429,711],{"className":712,"style":599},[445],[429,714,716],{"className":715},[450,451],"n",[429,718],{"className":719,"style":457},[456],[429,721,462],{"className":722},[461],[429,724],{"className":725,"style":457},[456],[429,727,729,732],{"className":728},[441],[429,730],{"className":731,"style":472},[445],[429,733,735,739,742],{"className":734},[560],[429,736,738],{"className":737,"style":565},[476,564],"∣",[429,740,482],{"className":741,"style":481},[450,451],[429,743,738],{"className":744,"style":565},[500,564]," for the number of vertices and ",[429,747,749],{"className":748},[432],[429,750,752,771],{"className":751,"ariaHidden":437},[436],[429,753,755,758,762,765,768],{"className":754},[441],[429,756],{"className":757,"style":599},[445],[429,759,761],{"className":760},[450,451],"m",[429,763],{"className":764,"style":457},[456],[429,766,462],{"className":767},[461],[429,769],{"className":770,"style":457},[456],[429,772,774,777],{"className":773},[441],[429,775],{"className":776,"style":472},[445],[429,778,780,783,786],{"className":779},[560],[429,781,738],{"className":782,"style":565},[476,564],[429,784,496],{"className":785,"style":495},[450,451],[429,787,738],{"className":788,"style":565},[500,564]," for the\nnumber of edges; inside ",[406,791,792],{"href":17},"asymptotic notation"," we abbreviate these to ",[429,795,797],{"className":796},[432],[429,798,800],{"className":799,"ariaHidden":437},[436],[429,801,803,806],{"className":802},[441],[429,804],{"className":805,"style":446},[445],[429,807,482],{"className":808,"style":481},[450,451],[429,810,812],{"className":811},[432],[429,813,815],{"className":814,"ariaHidden":437},[436],[429,816,818,821],{"className":817},[441],[429,819],{"className":820,"style":446},[445],[429,822,496],{"className":823,"style":495},[450,451],",\nwriting bounds like ",[429,826,828],{"className":827},[432],[429,829,831,859],{"className":830,"ariaHidden":437},[436],[429,832,834,837,842,845,848,851,856],{"className":833},[441],[429,835],{"className":836,"style":472},[445],[429,838,841],{"className":839,"style":840},[450,451],"margin-right:0.0278em;","O",[429,843,477],{"className":844},[476],[429,846,482],{"className":847,"style":481},[450,451],[429,849],{"className":850,"style":481},[456],[429,852,855],{"className":853},[854],"mbin","+",[429,857],{"className":858,"style":481},[456],[429,860,862,865,868],{"className":861},[441],[429,863],{"className":864,"style":472},[445],[429,866,496],{"className":867,"style":495},[450,451],[429,869,501],{"className":870},[500],".",[381,873,874,875,878,879,882,883,916,917,920,921,936,937,940,941,944,945,990,991,1129],{},"The definition is fussy for a reason: every clause rules out a\npathology. A graph is ",[394,876,877],{},"finite"," (otherwise we cannot index vertices), edges are\n",[394,880,881],{},"unordered"," pairs ",[429,884,886],{"className":885},[432],[429,887,889],{"className":888,"ariaHidden":437},[436],[429,890,892,895],{"className":891},[441],[429,893],{"className":894,"style":472},[445],[429,896,898,901,904,907,910,913],{"className":897},[560],[429,899,566],{"className":900,"style":565},[476,564],[429,902,570],{"className":903},[450,451],[429,905,487],{"className":906},[486],[429,908],{"className":909,"style":491},[456],[429,911,581],{"className":912,"style":580},[450,451],[429,914,585],{"className":915,"style":565},[500,564]," (ordered pairs would give a digraph), there are\n",[394,918,919],{},"no parallel edges"," (since ",[429,922,924],{"className":923},[432],[429,925,927],{"className":926,"ariaHidden":437},[436],[429,928,930,933],{"className":929},[441],[429,931],{"className":932,"style":446},[445],[429,934,496],{"className":935,"style":495},[450,451]," is a ",[385,938,939],{},"set",", not a multiset), and ",[394,942,943],{},"no self-loops","\n(since ",[429,946,948],{"className":947},[432],[429,949,951,979],{"className":950,"ariaHidden":437},[436],[429,952,954,957,970,973,976],{"className":953},[441],[429,955],{"className":956,"style":472},[445],[429,958,960,963,967],{"className":959},[560],[429,961,738],{"className":962,"style":565},[476,564],[429,964,966],{"className":965},[450,451],"e",[429,968,738],{"className":969,"style":565},[500,564],[429,971],{"className":972,"style":457},[456],[429,974,462],{"className":975},[461],[429,977],{"className":978,"style":457},[456],[429,980,982,986],{"className":981},[441],[429,983],{"className":984,"style":985},[445],"height:0.6444em;",[429,987,989],{"className":988},[450],"2"," for every ",[429,992,994],{"className":993},[432],[429,995,997,1017,1037],{"className":996,"ariaHidden":437},[436],[429,998,1000,1004,1007,1010,1014],{"className":999},[441],[429,1001],{"className":1002,"style":1003},[445],"height:0.5782em;vertical-align:-0.0391em;",[429,1005,966],{"className":1006},[450,451],[429,1008],{"className":1009,"style":457},[456],[429,1011,1013],{"className":1012},[461],"∈",[429,1015],{"className":1016,"style":457},[456],[429,1018,1020,1024,1027,1030,1034],{"className":1019},[441],[429,1021],{"className":1022,"style":1023},[445],"height:0.8193em;vertical-align:-0.136em;",[429,1025,496],{"className":1026,"style":495},[450,451],[429,1028],{"className":1029,"style":457},[456],[429,1031,1033],{"className":1032},[461],"⊆",[429,1035],{"className":1036,"style":457},[456],[429,1038,1040,1044],{"className":1039},[441],[429,1041],{"className":1042,"style":1043},[445],"height:1.2723em;vertical-align:-0.35em;",[429,1045,1047,1055,1123],{"className":1046},[450],[429,1048,1050],{"className":1049,"style":565},[476,564],[429,1051,477],{"className":1052},[1053,1054],"delimsizing","size1",[429,1056,1059],{"className":1057},[1058],"mfrac",[429,1060,1064,1114],{"className":1061},[1062,1063],"vlist-t","vlist-t2",[429,1065,1068,1109],{"className":1066},[1067],"vlist-r",[429,1069,1073,1094],{"className":1070,"style":1072},[1071],"vlist","height:0.9223em;",[429,1074,1076,1081],{"style":1075},"top:-2.355em;",[429,1077],{"className":1078,"style":1080},[1079],"pstrut","height:2.7em;",[429,1082,1088],{"className":1083},[1084,1085,1086,1087],"sizing","reset-size6","size3","mtight",[429,1089,1091],{"className":1090},[450,1087],[429,1092,989],{"className":1093},[450,1087],[429,1095,1097,1100],{"style":1096},"top:-3.144em;",[429,1098],{"className":1099,"style":1080},[1079],[429,1101,1103],{"className":1102},[1084,1085,1086,1087],[429,1104,1106],{"className":1105},[450,1087],[429,1107,482],{"className":1108,"style":481},[450,451,1087],[429,1110,1113],{"className":1111},[1112],"vlist-s","​",[429,1115,1117],{"className":1116},[1067],[429,1118,1121],{"className":1119,"style":1120},[1071],"height:0.345em;",[429,1122],{},[429,1124,1126],{"className":1125,"style":565},[500,564],[429,1127,501],{"className":1128},[1053,1054],"). Relaxing any one\nclause yields a richer object: a multigraph, a digraph, and so on.",[381,1131,1132],{},"A few terms recur constantly:",[1134,1135,1136,1234,1497,1804,2324,2342,2460],"ul",{},[1137,1138,1139,1140,603,1155,1170,1171,1174,1175,1226,1227,1230,1231,871],"li",{},"Vertices ",[429,1141,1143],{"className":1142},[432],[429,1144,1146],{"className":1145,"ariaHidden":437},[436],[429,1147,1149,1152],{"className":1148},[441],[429,1150],{"className":1151,"style":599},[445],[429,1153,570],{"className":1154},[450,451],[429,1156,1158],{"className":1157},[432],[429,1159,1161],{"className":1160,"ariaHidden":437},[436],[429,1162,1164,1167],{"className":1163},[441],[429,1165],{"className":1166,"style":599},[445],[429,1168,581],{"className":1169,"style":580},[450,451]," are ",[394,1172,1173],{},"adjacent"," if an edge joins them; that edge ",[429,1176,1178],{"className":1177},[432],[429,1179,1181,1199],{"className":1180,"ariaHidden":437},[436],[429,1182,1184,1187,1190,1193,1196],{"className":1183},[441],[429,1185],{"className":1186,"style":599},[445],[429,1188,966],{"className":1189},[450,451],[429,1191],{"className":1192,"style":457},[456],[429,1194,462],{"className":1195},[461],[429,1197],{"className":1198,"style":457},[456],[429,1200,1202,1205],{"className":1201},[441],[429,1203],{"className":1204,"style":472},[445],[429,1206,1208,1211,1214,1217,1220,1223],{"className":1207},[560],[429,1209,566],{"className":1210,"style":565},[476,564],[429,1212,570],{"className":1213},[450,451],[429,1215,487],{"className":1216},[486],[429,1218],{"className":1219,"style":491},[456],[429,1221,581],{"className":1222,"style":580},[450,451],[429,1224,585],{"className":1225,"style":565},[500,564]," is ",[394,1228,1229],{},"incident"," on both, which are its ",[394,1232,1233],{},"endpoints",[1137,1235,1236,1237,658,1240,1330,1331,1346,1347,658,1395,658,1398,1413,1414,1417,1418,658,1421,1413,1436,1439,1440,603,1469,871],{},"The ",[394,1238,1239],{},"degree",[429,1241,1243],{"className":1242},[432],[429,1244,1246,1279],{"className":1245,"ariaHidden":437},[436],[429,1247,1249,1252,1261,1264,1267,1270,1273,1276],{"className":1248},[441],[429,1250],{"className":1251,"style":472},[445],[429,1253,1256,1257],{"className":1254},[1255],"mop","de",[429,1258,1260],{"style":1259},"margin-right:0.0139em;","g",[429,1262,477],{"className":1263},[476],[429,1265,581],{"className":1266,"style":580},[450,451],[429,1268,501],{"className":1269},[500],[429,1271],{"className":1272,"style":457},[456],[429,1274,462],{"className":1275},[461],[429,1277],{"className":1278,"style":457},[456],[429,1280,1282,1285],{"className":1281},[441],[429,1283],{"className":1284,"style":472},[445],[429,1286,1288,1291,1327],{"className":1287},[560],[429,1289,738],{"className":1290,"style":565},[476,564],[429,1292,1294,1297,1300,1303,1307,1310,1313,1321,1324],{"className":1293},[560],[429,1295,566],{"className":1296,"style":565},[476,564],[429,1298,966],{"className":1299},[450,451],[429,1301],{"className":1302,"style":457},[456],[429,1304,1306],{"className":1305},[461],":",[429,1308],{"className":1309,"style":457},[456],[429,1311,966],{"className":1312},[450,451],[429,1314,1317],{"className":1315},[450,1316],"text",[429,1318,1320],{"className":1319},[450]," is incident on ",[429,1322,581],{"className":1323,"style":580},[450,451],[429,1325,585],{"className":1326,"style":565},[500,564],[429,1328,738],{"className":1329,"style":565},[500,564]," counts\nthe edges touching ",[429,1332,1334],{"className":1333},[432],[429,1335,1337],{"className":1336,"ariaHidden":437},[436],[429,1338,1340,1343],{"className":1339},[441],[429,1341],{"className":1342,"style":599},[445],[429,1344,581],{"className":1345,"style":580},[450,451],". In a digraph ",[429,1348,1350],{"className":1349},[432],[429,1351,1353,1371],{"className":1352,"ariaHidden":437},[436],[429,1354,1356,1359,1362,1365,1368],{"className":1355},[441],[429,1357],{"className":1358,"style":599},[445],[429,1360,966],{"className":1361},[450,451],[429,1363],{"className":1364,"style":457},[456],[429,1366,462],{"className":1367},[461],[429,1369],{"className":1370,"style":457},[456],[429,1372,1374,1377,1380,1383,1386,1389,1392],{"className":1373},[441],[429,1375],{"className":1376,"style":472},[445],[429,1378,477],{"className":1379},[476],[429,1381,570],{"className":1382},[450,451],[429,1384,487],{"className":1385},[486],[429,1387],{"className":1388,"style":491},[456],[429,1390,581],{"className":1391,"style":580},[450,451],[429,1393,501],{"className":1394},[500],[394,1396,1397],{},"leaves",[429,1399,1401],{"className":1400},[432],[429,1402,1404],{"className":1403,"ariaHidden":437},[436],[429,1405,1407,1410],{"className":1406},[441],[429,1408],{"className":1409,"style":599},[445],[429,1411,570],{"className":1412},[450,451]," (its ",[385,1415,1416],{},"tail",")\nand ",[394,1419,1420],{},"arrives at",[429,1422,1424],{"className":1423},[432],[429,1425,1427],{"className":1426,"ariaHidden":437},[436],[429,1428,1430,1433],{"className":1429},[441],[429,1431],{"className":1432,"style":599},[445],[429,1434,581],{"className":1435,"style":580},[450,451],[385,1437,1438],{},"head","), and we split degree into\n",[429,1441,1443],{"className":1442},[432],[429,1444,1446],{"className":1445,"ariaHidden":437},[436],[429,1447,1449,1452,1460,1463,1466],{"className":1448},[441],[429,1450],{"className":1451,"style":472},[445],[429,1453,1455],{"className":1454},[1255],[429,1456,1459],{"className":1457,"style":1259},[450,1458],"mathrm","in-deg",[429,1461,477],{"className":1462},[476],[429,1464,581],{"className":1465,"style":580},[450,451],[429,1467,501],{"className":1468},[500],[429,1470,1472],{"className":1471},[432],[429,1473,1475],{"className":1474,"ariaHidden":437},[436],[429,1476,1478,1481,1488,1491,1494],{"className":1477},[441],[429,1479],{"className":1480,"style":472},[445],[429,1482,1484],{"className":1483},[1255],[429,1485,1487],{"className":1486,"style":1259},[450,1458],"out-deg",[429,1489,477],{"className":1490},[476],[429,1492,581],{"className":1493,"style":580},[450,451],[429,1495,501],{"className":1496},[500],[1137,1498,1236,1499,1502,1503,1623,1624,1803],{},[394,1500,1501],{},"handshake lemma"," falls straight out of counting incidences both ways:\n",[429,1504,1506],{"className":1505},[432],[429,1507,1509,1599],{"className":1508,"ariaHidden":437},[436],[429,1510,1512,1516,1573,1576,1581,1584,1587,1590,1593,1596],{"className":1511},[441],[429,1513],{"className":1514,"style":1515},[445],"height:1.0771em;vertical-align:-0.3271em;",[429,1517,1519,1526],{"className":1518},[1255],[429,1520,1525],{"className":1521,"style":1524},[1255,1522,1523],"op-symbol","small-op","position:relative;top:0em;","∑",[429,1527,1530],{"className":1528},[1529],"msupsub",[429,1531,1533,1564],{"className":1532},[1062,1063],[429,1534,1536,1561],{"className":1535},[1067],[429,1537,1540],{"className":1538,"style":1539},[1071],"height:0.1786em;",[429,1541,1543,1546],{"style":1542},"top:-2.4003em;margin-left:0em;margin-right:0.05em;",[429,1544],{"className":1545,"style":1080},[1079],[429,1547,1549],{"className":1548},[1084,1085,1086,1087],[429,1550,1552,1555,1558],{"className":1551},[450,1087],[429,1553,581],{"className":1554,"style":580},[450,451,1087],[429,1556,1013],{"className":1557},[461,1087],[429,1559,482],{"className":1560,"style":481},[450,451,1087],[429,1562,1113],{"className":1563},[1112],[429,1565,1567],{"className":1566},[1067],[429,1568,1571],{"className":1569,"style":1570},[1071],"height:0.3271em;",[429,1572],{},[429,1574],{"className":1575,"style":491},[456],[429,1577,1256,1579],{"className":1578},[1255],[429,1580,1260],{"style":1259},[429,1582,477],{"className":1583},[476],[429,1585,581],{"className":1586,"style":580},[450,451],[429,1588,501],{"className":1589},[500],[429,1591],{"className":1592,"style":457},[456],[429,1594,462],{"className":1595},[461],[429,1597],{"className":1598,"style":457},[456],[429,1600,1602,1605,1608,1611],{"className":1601},[441],[429,1603],{"className":1604,"style":472},[445],[429,1606,989],{"className":1607},[450],[429,1609],{"className":1610,"style":491},[456],[429,1612,1614,1617,1620],{"className":1613},[560],[429,1615,738],{"className":1616,"style":565},[476,564],[429,1618,496],{"className":1619,"style":495},[450,451],[429,1621,738],{"className":1622,"style":565},[500,564]," in a graph, and ",[429,1625,1627],{"className":1626},[432],[429,1628,1630,1709,1736],{"className":1629,"ariaHidden":437},[436],[429,1631,1633,1637,1682,1685,1691,1694,1697,1700,1703,1706],{"className":1632},[441],[429,1634],{"className":1635,"style":1636},[445],"height:1.0497em;vertical-align:-0.2997em;",[429,1638,1640,1643],{"className":1639},[1255],[429,1641,1525],{"className":1642,"style":1524},[1255,1522,1523],[429,1644,1646],{"className":1645},[1529],[429,1647,1649,1673],{"className":1648},[1062,1063],[429,1650,1652,1670],{"className":1651},[1067],[429,1653,1656],{"className":1654,"style":1655},[1071],"height:0.0017em;",[429,1657,1658,1661],{"style":1542},[429,1659],{"className":1660,"style":1080},[1079],[429,1662,1664],{"className":1663},[1084,1085,1086,1087],[429,1665,1667],{"className":1666},[450,1087],[429,1668,581],{"className":1669,"style":580},[450,451,1087],[429,1671,1113],{"className":1672},[1112],[429,1674,1676],{"className":1675},[1067],[429,1677,1680],{"className":1678,"style":1679},[1071],"height:0.2997em;",[429,1681],{},[429,1683],{"className":1684,"style":491},[456],[429,1686,1688],{"className":1687},[1255],[429,1689,1459],{"className":1690,"style":1259},[450,1458],[429,1692,477],{"className":1693},[476],[429,1695,581],{"className":1696,"style":580},[450,451],[429,1698,501],{"className":1699},[500],[429,1701],{"className":1702,"style":457},[456],[429,1704,462],{"className":1705},[461],[429,1707],{"className":1708,"style":457},[456],[429,1710,1712,1715,1727,1730,1733],{"className":1711},[441],[429,1713],{"className":1714,"style":472},[445],[429,1716,1718,1721,1724],{"className":1717},[560],[429,1719,738],{"className":1720,"style":565},[476,564],[429,1722,496],{"className":1723,"style":495},[450,451],[429,1725,738],{"className":1726,"style":565},[500,564],[429,1728],{"className":1729,"style":457},[456],[429,1731,462],{"className":1732},[461],[429,1734],{"className":1735,"style":457},[456],[429,1737,1739,1742,1785,1788,1794,1797,1800],{"className":1738},[441],[429,1740],{"className":1741,"style":1636},[445],[429,1743,1745,1748],{"className":1744},[1255],[429,1746,1525],{"className":1747,"style":1524},[1255,1522,1523],[429,1749,1751],{"className":1750},[1529],[429,1752,1754,1777],{"className":1753},[1062,1063],[429,1755,1757,1774],{"className":1756},[1067],[429,1758,1760],{"className":1759,"style":1655},[1071],[429,1761,1762,1765],{"style":1542},[429,1763],{"className":1764,"style":1080},[1079],[429,1766,1768],{"className":1767},[1084,1085,1086,1087],[429,1769,1771],{"className":1770},[450,1087],[429,1772,581],{"className":1773,"style":580},[450,451,1087],[429,1775,1113],{"className":1776},[1112],[429,1778,1780],{"className":1779},[1067],[429,1781,1783],{"className":1782,"style":1679},[1071],[429,1784],{},[429,1786],{"className":1787,"style":491},[456],[429,1789,1791],{"className":1790},[1255],[429,1792,1487],{"className":1793,"style":1259},[450,1458],[429,1795,477],{"className":1796},[476],[429,1798,581],{"className":1799,"style":580},[450,451],[429,1801,501],{"className":1802},[500]," in a\ndigraph.",[1137,1805,1806,1807,1810,1811,2119,2120,658,2123,2139,2140,2248,2249,2252,2253,2256,2257,2260,2261,2291,2292,2319,2320,2323],{},"A ",[394,1808,1809],{},"walk"," is an alternating sequence ",[429,1812,1814],{"className":1813},[432],[429,1815,1817],{"className":1816,"ariaHidden":437},[436],[429,1818,1820,1823,1826,1870,1873,1876,1917,1920,1923,1963,1966,1969,2009,2012,2015,2019,2022,2025,2028,2070,2073,2076,2116],{"className":1819},[441],[429,1821],{"className":1822,"style":472},[445],[429,1824,477],{"className":1825},[476],[429,1827,1829,1832],{"className":1828},[450],[429,1830,581],{"className":1831,"style":580},[450,451],[429,1833,1835],{"className":1834},[1529],[429,1836,1838,1861],{"className":1837},[1062,1063],[429,1839,1841,1858],{"className":1840},[1067],[429,1842,1845],{"className":1843,"style":1844},[1071],"height:0.3011em;",[429,1846,1848,1851],{"style":1847},"top:-2.55em;margin-left:-0.0359em;margin-right:0.05em;",[429,1849],{"className":1850,"style":1080},[1079],[429,1852,1854],{"className":1853},[1084,1085,1086,1087],[429,1855,1857],{"className":1856},[450,1087],"0",[429,1859,1113],{"className":1860},[1112],[429,1862,1864],{"className":1863},[1067],[429,1865,1868],{"className":1866,"style":1867},[1071],"height:0.15em;",[429,1869],{},[429,1871,487],{"className":1872},[486],[429,1874],{"className":1875,"style":491},[456],[429,1877,1879,1882],{"className":1878},[450],[429,1880,966],{"className":1881},[450,451],[429,1883,1885],{"className":1884},[1529],[429,1886,1888,1909],{"className":1887},[1062,1063],[429,1889,1891,1906],{"className":1890},[1067],[429,1892,1894],{"className":1893,"style":1844},[1071],[429,1895,1897,1900],{"style":1896},"top:-2.55em;margin-left:0em;margin-right:0.05em;",[429,1898],{"className":1899,"style":1080},[1079],[429,1901,1903],{"className":1902},[1084,1085,1086,1087],[429,1904,412],{"className":1905},[450,1087],[429,1907,1113],{"className":1908},[1112],[429,1910,1912],{"className":1911},[1067],[429,1913,1915],{"className":1914,"style":1867},[1071],[429,1916],{},[429,1918,487],{"className":1919},[486],[429,1921],{"className":1922,"style":491},[456],[429,1924,1926,1929],{"className":1925},[450],[429,1927,581],{"className":1928,"style":580},[450,451],[429,1930,1932],{"className":1931},[1529],[429,1933,1935,1955],{"className":1934},[1062,1063],[429,1936,1938,1952],{"className":1937},[1067],[429,1939,1941],{"className":1940,"style":1844},[1071],[429,1942,1943,1946],{"style":1847},[429,1944],{"className":1945,"style":1080},[1079],[429,1947,1949],{"className":1948},[1084,1085,1086,1087],[429,1950,412],{"className":1951},[450,1087],[429,1953,1113],{"className":1954},[1112],[429,1956,1958],{"className":1957},[1067],[429,1959,1961],{"className":1960,"style":1867},[1071],[429,1962],{},[429,1964,487],{"className":1965},[486],[429,1967],{"className":1968,"style":491},[456],[429,1970,1972,1975],{"className":1971},[450],[429,1973,966],{"className":1974},[450,451],[429,1976,1978],{"className":1977},[1529],[429,1979,1981,2001],{"className":1980},[1062,1063],[429,1982,1984,1998],{"className":1983},[1067],[429,1985,1987],{"className":1986,"style":1844},[1071],[429,1988,1989,1992],{"style":1896},[429,1990],{"className":1991,"style":1080},[1079],[429,1993,1995],{"className":1994},[1084,1085,1086,1087],[429,1996,989],{"className":1997},[450,1087],[429,1999,1113],{"className":2000},[1112],[429,2002,2004],{"className":2003},[1067],[429,2005,2007],{"className":2006,"style":1867},[1071],[429,2008],{},[429,2010,487],{"className":2011},[486],[429,2013],{"className":2014,"style":491},[456],[429,2016,2018],{"className":2017},[560],"…",[429,2020],{"className":2021,"style":491},[456],[429,2023,487],{"className":2024},[486],[429,2026],{"className":2027,"style":491},[456],[429,2029,2031,2034],{"className":2030},[450],[429,2032,966],{"className":2033},[450,451],[429,2035,2037],{"className":2036},[1529],[429,2038,2040,2062],{"className":2039},[1062,1063],[429,2041,2043,2059],{"className":2042},[1067],[429,2044,2047],{"className":2045,"style":2046},[1071],"height:0.3361em;",[429,2048,2049,2052],{"style":1896},[429,2050],{"className":2051,"style":1080},[1079],[429,2053,2055],{"className":2054},[1084,1085,1086,1087],[429,2056,2058],{"className":2057},[450,1087],"ℓ",[429,2060,1113],{"className":2061},[1112],[429,2063,2065],{"className":2064},[1067],[429,2066,2068],{"className":2067,"style":1867},[1071],[429,2069],{},[429,2071,487],{"className":2072},[486],[429,2074],{"className":2075,"style":491},[456],[429,2077,2079,2082],{"className":2078},[450],[429,2080,581],{"className":2081,"style":580},[450,451],[429,2083,2085],{"className":2084},[1529],[429,2086,2088,2108],{"className":2087},[1062,1063],[429,2089,2091,2105],{"className":2090},[1067],[429,2092,2094],{"className":2093,"style":2046},[1071],[429,2095,2096,2099],{"style":1847},[429,2097],{"className":2098,"style":1080},[1079],[429,2100,2102],{"className":2101},[1084,1085,1086,1087],[429,2103,2058],{"className":2104},[450,1087],[429,2106,1113],{"className":2107},[1112],[429,2109,2111],{"className":2110},[1067],[429,2112,2114],{"className":2113,"style":1867},[1071],[429,2115],{},[429,2117,501],{"className":2118},[500]," respecting incidence, of ",[394,2121,2122],{},"length",[429,2124,2126],{"className":2125},[432],[429,2127,2129],{"className":2128,"ariaHidden":437},[436],[429,2130,2132,2136],{"className":2131},[441],[429,2133],{"className":2134,"style":2135},[445],"height:0.6944em;",[429,2137,2058],{"className":2138},[450],". A walk with ",[429,2141,2143],{"className":2142},[432],[429,2144,2146,2202],{"className":2145,"ariaHidden":437},[436],[429,2147,2149,2153,2193,2196,2199],{"className":2148},[441],[429,2150],{"className":2151,"style":2152},[445],"height:0.5806em;vertical-align:-0.15em;",[429,2154,2156,2159],{"className":2155},[450],[429,2157,581],{"className":2158,"style":580},[450,451],[429,2160,2162],{"className":2161},[1529],[429,2163,2165,2185],{"className":2164},[1062,1063],[429,2166,2168,2182],{"className":2167},[1067],[429,2169,2171],{"className":2170,"style":1844},[1071],[429,2172,2173,2176],{"style":1847},[429,2174],{"className":2175,"style":1080},[1079],[429,2177,2179],{"className":2178},[1084,1085,1086,1087],[429,2180,1857],{"className":2181},[450,1087],[429,2183,1113],{"className":2184},[1112],[429,2186,2188],{"className":2187},[1067],[429,2189,2191],{"className":2190,"style":1867},[1071],[429,2192],{},[429,2194],{"className":2195,"style":457},[456],[429,2197,462],{"className":2198},[461],[429,2200],{"className":2201,"style":457},[456],[429,2203,2205,2208],{"className":2204},[441],[429,2206],{"className":2207,"style":2152},[445],[429,2209,2211,2214],{"className":2210},[450],[429,2212,581],{"className":2213,"style":580},[450,451],[429,2215,2217],{"className":2216},[1529],[429,2218,2220,2240],{"className":2219},[1062,1063],[429,2221,2223,2237],{"className":2222},[1067],[429,2224,2226],{"className":2225,"style":2046},[1071],[429,2227,2228,2231],{"style":1847},[429,2229],{"className":2230,"style":1080},[1079],[429,2232,2234],{"className":2233},[1084,1085,1086,1087],[429,2235,2058],{"className":2236},[450,1087],[429,2238,1113],{"className":2239},[1112],[429,2241,2243],{"className":2242},[1067],[429,2244,2246],{"className":2245,"style":1867},[1071],[429,2247],{},"\nis ",[394,2250,2251],{},"closed",". A ",[394,2254,2255],{},"path"," is a walk with no repeated vertices; a ",[394,2258,2259],{},"cycle"," is a\nclosed walk whose vertices are distinct except for the shared endpoint\n(length ",[429,2262,2264],{"className":2263},[432],[429,2265,2267,2281],{"className":2266,"ariaHidden":437},[436],[429,2268,2270,2274,2278],{"className":2269},[441],[429,2271],{"className":2272,"style":2273},[445],"height:0.7719em;vertical-align:-0.136em;",[429,2275,2277],{"className":2276},[461],"≥",[429,2279],{"className":2280,"style":457},[456],[429,2282,2284,2287],{"className":2283},[441],[429,2285],{"className":2286,"style":985},[445],[429,2288,2290],{"className":2289},[450],"3"," in a graph, ",[429,2293,2295],{"className":2294},[432],[429,2296,2298,2310],{"className":2297,"ariaHidden":437},[436],[429,2299,2301,2304,2307],{"className":2300},[441],[429,2302],{"className":2303,"style":2273},[445],[429,2305,2277],{"className":2306},[461],[429,2308],{"className":2309,"style":457},[456],[429,2311,2313,2316],{"className":2312},[441],[429,2314],{"className":2315,"style":985},[445],[429,2317,989],{"className":2318},[450]," in a digraph). Beware: many texts overload\n",[2321,2322,2255],"q",{}," to mean walk, but we keep them separate.",[1137,2325,2326,2327,2330,2331,2334,2335,2337,2338,2341],{},"An undirected graph is ",[394,2328,2329],{},"connected"," if a path joins every pair of vertices; a\ndigraph is ",[394,2332,2333],{},"strongly connected"," if a ",[385,2336,695],{}," path runs both ways between\nevery pair. A ",[394,2339,2340],{},"connected component"," is a maximal connected subgraph.",[1137,2343,2344,2345,2379,2380,2395,2396,2411,2412,2428,2429,2444,2445,871],{},"The distance ",[429,2346,2348],{"className":2347},[432],[429,2349,2351],{"className":2350,"ariaHidden":437},[436],[429,2352,2354,2357,2361,2364,2367,2370,2373,2376],{"className":2353},[441],[429,2355],{"className":2356,"style":472},[445],[429,2358,2360],{"className":2359},[450,451],"d",[429,2362,477],{"className":2363},[476],[429,2365,570],{"className":2366},[450,451],[429,2368,487],{"className":2369},[486],[429,2371],{"className":2372,"style":491},[456],[429,2374,581],{"className":2375,"style":580},[450,451],[429,2377,501],{"className":2378},[500]," is the length of the shortest path from ",[429,2381,2383],{"className":2382},[432],[429,2384,2386],{"className":2385,"ariaHidden":437},[436],[429,2387,2389,2392],{"className":2388},[441],[429,2390],{"className":2391,"style":599},[445],[429,2393,570],{"className":2394},[450,451]," to ",[429,2397,2399],{"className":2398},[432],[429,2400,2402],{"className":2401,"ariaHidden":437},[436],[429,2403,2405,2408],{"className":2404},[441],[429,2406],{"className":2407,"style":599},[445],[429,2409,581],{"className":2410,"style":580},[450,451],"\n(directed, for digraphs), or ",[429,2413,2415],{"className":2414},[432],[429,2416,2418],{"className":2417,"ariaHidden":437},[436],[429,2419,2421,2424],{"className":2420},[441],[429,2422],{"className":2423,"style":599},[445],[429,2425,2427],{"className":2426},[450],"∞"," if ",[429,2430,2432],{"className":2431},[432],[429,2433,2435],{"className":2434,"ariaHidden":437},[436],[429,2436,2438,2441],{"className":2437},[441],[429,2439],{"className":2440,"style":599},[445],[429,2442,581],{"className":2443,"style":580},[450,451]," is unreachable from ",[429,2446,2448],{"className":2447},[432],[429,2449,2451],{"className":2450,"ariaHidden":437},[436],[429,2452,2454,2457],{"className":2453},[441],[429,2455],{"className":2456,"style":599},[445],[429,2458,570],{"className":2459},[450,451],[1137,2461,2462,2463,658,2466,2501],{},"A graph may carry a ",[394,2464,2465],{},"weight",[429,2467,2469],{"className":2468},[432],[429,2470,2472],{"className":2471,"ariaHidden":437},[436],[429,2473,2475,2478,2483,2486,2489,2492,2495,2498],{"className":2474},[441],[429,2476],{"className":2477,"style":472},[445],[429,2479,2482],{"className":2480,"style":2481},[450,451],"margin-right:0.0269em;","w",[429,2484,477],{"className":2485},[476],[429,2487,570],{"className":2488},[450,451],[429,2490,487],{"className":2491},[486],[429,2493],{"className":2494,"style":491},[456],[429,2496,581],{"className":2497,"style":580},[450,451],[429,2499,501],{"className":2500},[500]," on each edge (a length, cost, or\ncapacity) that later lessons will exploit.",[381,2503,2504],{},"Here is a small undirected graph on five vertices that we will use throughout\nthis lesson:",[2506,2507,2511,2578],"figure",{"className":2508},[2509,2510],"tikz-figure","tikz-diagram-rendered",[2512,2513,2518],"svg",{"xmlns":2514,"width":2515,"height":2516,"viewBox":2517},"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg","225.034","158.432","-75 -75 168.775 118.824",[1260,2519,2522,2526,2535,2538,2545,2548,2555,2558,2565,2568,2575],{"stroke":2520,"style":2521},"currentColor","stroke-miterlimit:10;stroke-width:.4",[2255,2523],{"fill":2524,"d":2525},"none","M-45.975-15.858c0-6.286-5.095-11.381-11.38-11.381s-11.382 5.095-11.382 11.381S-63.64-4.477-57.356-4.477s11.381-5.095 11.381-11.381Zm-11.38 0",[1260,2527,2529],{"transform":2528},"translate(-2.154 1.937)",[2255,2530],{"d":2531,"fill":2520,"stroke":2520,"className":2532,"style":2534},"M-56.521-16.407Q-56.301-16.021-55.545-16.021Q-55.247-16.021-54.952-16.122Q-54.658-16.223-54.464-16.436Q-54.271-16.649-54.271-16.957Q-54.271-17.185-54.449-17.332Q-54.627-17.480-54.873-17.532L-55.383-17.629Q-55.598-17.669-55.774-17.792Q-55.950-17.915-56.055-18.101Q-56.161-18.288-56.161-18.504Q-56.161-18.903-55.937-19.209Q-55.712-19.514-55.354-19.675Q-54.996-19.835-54.592-19.835Q-54.328-19.835-54.080-19.756Q-53.832-19.677-53.662-19.497Q-53.493-19.316-53.493-19.053Q-53.493-18.846-53.614-18.688Q-53.735-18.530-53.946-18.530Q-54.069-18.530-54.155-18.611Q-54.240-18.692-54.240-18.811Q-54.240-18.974-54.117-19.108Q-53.994-19.242-53.836-19.242Q-53.924-19.422-54.141-19.499Q-54.359-19.576-54.609-19.576Q-54.851-19.576-55.077-19.488Q-55.304-19.400-55.449-19.231Q-55.594-19.062-55.594-18.811Q-55.594-18.635-55.462-18.517Q-55.330-18.398-55.132-18.350L-54.627-18.253Q-54.240-18.174-53.972-17.904Q-53.704-17.633-53.704-17.251Q-53.704-16.921-53.893-16.601Q-54.082-16.280-54.359-16.082Q-54.860-15.757-55.554-15.757Q-55.866-15.757-56.167-15.843Q-56.468-15.928-56.673-16.126Q-56.877-16.324-56.877-16.631Q-56.877-16.882-56.734-17.066Q-56.591-17.251-56.350-17.251Q-56.196-17.251-56.097-17.159Q-55.998-17.066-55.998-16.921Q-55.998-16.711-56.150-16.559Q-56.301-16.407-56.521-16.407",[2533],"tikz-text","stroke-width:0.270",[2255,2536],{"fill":2524,"d":2537},"M15.928-60.689c0-6.286-5.095-11.381-11.381-11.381S-6.834-66.975-6.834-60.689s5.095 11.381 11.38 11.381c6.287 0 11.382-5.095 11.382-11.38Zm-11.381 0",[1260,2539,2541],{"transform":2540},"translate(59.452 -42.893)",[2255,2542],{"d":2543,"fill":2520,"stroke":2520,"className":2544,"style":2534},"M-55.734-15.757Q-56.130-15.757-56.416-15.961Q-56.701-16.166-56.848-16.500Q-56.996-16.834-56.996-17.225Q-56.996-17.660-56.822-18.121Q-56.648-18.583-56.336-18.974Q-56.024-19.365-55.614-19.600Q-55.203-19.835-54.763-19.835Q-54.495-19.835-54.278-19.697Q-54.060-19.558-53.928-19.312Q-53.889-19.462-53.781-19.558Q-53.673-19.655-53.533-19.655Q-53.410-19.655-53.326-19.582Q-53.243-19.510-53.243-19.387Q-53.243-19.334-53.252-19.303L-53.871-16.812Q-53.928-16.614-53.928-16.416Q-53.928-16.021-53.665-16.021Q-53.379-16.021-53.245-16.344Q-53.111-16.667-52.992-17.172Q-52.983-17.203-52.959-17.227Q-52.935-17.251-52.900-17.251L-52.794-17.251Q-52.746-17.251-52.724-17.218Q-52.702-17.185-52.702-17.137Q-52.816-16.706-52.907-16.453Q-52.997-16.201-53.190-15.979Q-53.383-15.757-53.682-15.757Q-53.990-15.757-54.238-15.928Q-54.486-16.100-54.557-16.390Q-54.812-16.104-55.108-15.931Q-55.405-15.757-55.734-15.757M-55.717-16.021Q-55.387-16.021-55.077-16.262Q-54.768-16.504-54.557-16.820Q-54.548-16.829-54.548-16.847L-54.051-18.811Q-54.108-19.128-54.300-19.352Q-54.491-19.576-54.781-19.576Q-55.150-19.576-55.449-19.257Q-55.748-18.939-55.915-18.530Q-56.051-18.183-56.176-17.673Q-56.301-17.163-56.301-16.838Q-56.301-16.513-56.163-16.267Q-56.024-16.021-55.717-16.021",[2533],[2255,2546],{"fill":2524,"d":2547},"M15.928 28.973c0-6.286-5.095-11.381-11.381-11.381s-11.381 5.095-11.381 11.38c0 6.287 5.095 11.382 11.38 11.382 6.287 0 11.382-5.095 11.382-11.381Zm-11.381 0",[1260,2549,2551],{"transform":2550},"translate(59.92 47.956)",[2255,2552],{"d":2553,"fill":2520,"stroke":2520,"className":2554,"style":2534},"M-55.734-15.757Q-56.310-15.757-56.631-16.188Q-56.952-16.618-56.952-17.198Q-56.952-17.603-56.868-17.831L-55.989-21.329Q-55.954-21.479-55.954-21.553Q-55.954-21.690-56.521-21.690Q-56.618-21.690-56.618-21.808Q-56.618-21.865-56.587-21.936Q-56.556-22.006-56.490-22.006L-55.269-22.103Q-55.216-22.103-55.183-22.074Q-55.150-22.046-55.150-21.997L-55.150-21.962L-55.809-19.352Q-55.286-19.835-54.763-19.835Q-54.377-19.835-54.086-19.631Q-53.796-19.426-53.649-19.092Q-53.502-18.758-53.502-18.367Q-53.502-17.783-53.805-17.174Q-54.108-16.566-54.629-16.161Q-55.150-15.757-55.734-15.757M-55.717-16.021Q-55.348-16.021-55.044-16.344Q-54.741-16.667-54.583-17.062Q-54.438-17.418-54.317-17.926Q-54.196-18.433-54.196-18.754Q-54.196-19.079-54.341-19.327Q-54.486-19.576-54.781-19.576Q-55.383-19.576-55.954-18.776L-56.196-17.783Q-56.341-17.159-56.341-16.895Q-56.341-16.552-56.189-16.286Q-56.038-16.021-55.717-16.021",[2533],[2255,2556],{"fill":2524,"d":2557},"M90.305-60.689c0-6.286-5.095-11.381-11.38-11.381-6.287 0-11.382 5.095-11.382 11.381s5.095 11.381 11.381 11.381 11.381-5.095 11.381-11.38Zm-11.38 0",[1260,2559,2561],{"transform":2560},"translate(134.277 -42.893)",[2255,2562],{"d":2563,"fill":2520,"stroke":2520,"className":2564,"style":2534},"M-56.266-16.965Q-56.266-16.570-56.053-16.295Q-55.840-16.021-55.458-16.021Q-54.913-16.021-54.407-16.256Q-53.902-16.491-53.585-16.913Q-53.564-16.948-53.502-16.948Q-53.445-16.948-53.399-16.897Q-53.353-16.847-53.353-16.794Q-53.353-16.759-53.379-16.733Q-53.726-16.258-54.289-16.007Q-54.851-15.757-55.475-15.757Q-55.906-15.757-56.255-15.959Q-56.605-16.161-56.796-16.517Q-56.987-16.873-56.987-17.299Q-56.987-17.761-56.785-18.218Q-56.583-18.675-56.227-19.044Q-55.871-19.413-55.427-19.624Q-54.983-19.835-54.513-19.835Q-54.245-19.835-53.996-19.754Q-53.748-19.672-53.581-19.494Q-53.414-19.316-53.414-19.053Q-53.414-18.816-53.564-18.638Q-53.713-18.460-53.946-18.460Q-54.086-18.460-54.192-18.554Q-54.297-18.649-54.297-18.794Q-54.297-18.996-54.150-19.150Q-54.003-19.303-53.801-19.303Q-53.906-19.444-54.111-19.510Q-54.315-19.576-54.522-19.576Q-55.058-19.576-55.455-19.147Q-55.853-18.719-56.060-18.099Q-56.266-17.480-56.266-16.965",[2533],[2255,2566],{"fill":2524,"d":2567},"M90.305 28.973c0-6.286-5.095-11.381-11.38-11.381-6.287 0-11.382 5.095-11.382 11.38 0 6.287 5.095 11.382 11.381 11.382s11.381-5.095 11.381-11.381Zm-11.38 0",[1260,2569,2571],{"transform":2570},"translate(133.883 47.956)",[2255,2572],{"d":2573,"fill":2520,"stroke":2520,"className":2574,"style":2534},"M-55.734-15.757Q-56.130-15.757-56.416-15.961Q-56.701-16.166-56.848-16.500Q-56.996-16.834-56.996-17.225Q-56.996-17.660-56.822-18.121Q-56.648-18.583-56.336-18.974Q-56.024-19.365-55.614-19.600Q-55.203-19.835-54.763-19.835Q-54.495-19.835-54.278-19.697Q-54.060-19.558-53.928-19.312L-53.423-21.329Q-53.388-21.479-53.388-21.553Q-53.388-21.690-53.955-21.690Q-54.051-21.690-54.051-21.808Q-54.051-21.865-54.021-21.936Q-53.990-22.006-53.928-22.006L-52.702-22.103Q-52.649-22.103-52.619-22.074Q-52.588-22.046-52.588-21.997L-52.588-21.962L-53.871-16.812Q-53.871-16.754-53.900-16.623Q-53.928-16.491-53.928-16.416Q-53.928-16.021-53.665-16.021Q-53.379-16.021-53.245-16.344Q-53.111-16.667-52.992-17.172Q-52.983-17.203-52.959-17.227Q-52.935-17.251-52.900-17.251L-52.794-17.251Q-52.746-17.251-52.724-17.218Q-52.702-17.185-52.702-17.137Q-52.816-16.706-52.907-16.453Q-52.997-16.201-53.190-15.979Q-53.383-15.757-53.682-15.757Q-53.990-15.757-54.238-15.928Q-54.486-16.100-54.557-16.390Q-54.812-16.104-55.108-15.931Q-55.405-15.757-55.734-15.757M-55.717-16.021Q-55.387-16.021-55.077-16.262Q-54.768-16.504-54.557-16.820Q-54.548-16.829-54.548-16.856L-54.051-18.811Q-54.108-19.128-54.300-19.352Q-54.491-19.576-54.781-19.576Q-55.150-19.576-55.449-19.257Q-55.748-18.939-55.915-18.530Q-56.051-18.183-56.176-17.673Q-56.301-17.163-56.301-16.838Q-56.301-16.513-56.163-16.267Q-56.024-16.021-55.717-16.021",[2533],[2255,2576],{"fill":2524,"d":2577},"m-47.976-22.65 43.144-31.246M-47.976-9.065-4.832 22.18M4.547-49.108v66.5M16.128-60.689h51.215M16.128 28.973h51.215M78.924-49.108v66.5",[2579,2580,2583],"figcaption",{"className":2581},[2582],"tikz-cap","A small undirected graph on five vertices used throughout the lesson.",[381,2585,2586,2587,2775,2776,2847,2848,2851,2852,2867,2868,603,2883,2886,2887,2867,2902,2943],{},"A graph is bounded in size: every simple graph has at most\n",[429,2588,2590],{"className":2589},[432],[429,2591,2593,2676],{"className":2592,"ariaHidden":437},[436],[429,2594,2596,2600,2667,2670,2673],{"className":2595},[441],[429,2597],{"className":2598,"style":2599},[445],"height:1.2em;vertical-align:-0.35em;",[429,2601,2603,2609,2661],{"className":2602},[450],[429,2604,2606],{"className":2605,"style":565},[476,564],[429,2607,477],{"className":2608},[1053,1054],[429,2610,2612],{"className":2611},[1058],[429,2613,2615,2653],{"className":2614},[1062,1063],[429,2616,2618,2650],{"className":2617},[1067],[429,2619,2622,2636],{"className":2620,"style":2621},[1071],"height:0.7454em;",[429,2623,2624,2627],{"style":1075},[429,2625],{"className":2626,"style":1080},[1079],[429,2628,2630],{"className":2629},[1084,1085,1086,1087],[429,2631,2633],{"className":2632},[450,1087],[429,2634,989],{"className":2635},[450,1087],[429,2637,2638,2641],{"style":1096},[429,2639],{"className":2640,"style":1080},[1079],[429,2642,2644],{"className":2643},[1084,1085,1086,1087],[429,2645,2647],{"className":2646},[450,1087],[429,2648,716],{"className":2649},[450,451,1087],[429,2651,1113],{"className":2652},[1112],[429,2654,2656],{"className":2655},[1067],[429,2657,2659],{"className":2658,"style":1120},[1071],[429,2660],{},[429,2662,2664],{"className":2663,"style":565},[500,564],[429,2665,501],{"className":2666},[1053,1054],[429,2668],{"className":2669,"style":457},[456],[429,2671,462],{"className":2672},[461],[429,2674],{"className":2675,"style":457},[456],[429,2677,2679,2683],{"className":2678},[441],[429,2680],{"className":2681,"style":2682},[445],"height:1.355em;vertical-align:-0.345em;",[429,2684,2686,2690,2772],{"className":2685},[450],[429,2687],{"className":2688},[476,2689],"nulldelimiter",[429,2691,2693],{"className":2692},[1058],[429,2694,2696,2764],{"className":2695},[1062,1063],[429,2697,2699,2761],{"className":2698},[1067],[429,2700,2703,2719,2730],{"className":2701,"style":2702},[1071],"height:1.01em;",[429,2704,2706,2710],{"style":2705},"top:-2.655em;",[429,2707],{"className":2708,"style":2709},[1079],"height:3em;",[429,2711,2713],{"className":2712},[1084,1085,1086,1087],[429,2714,2716],{"className":2715},[450,1087],[429,2717,989],{"className":2718},[450,1087],[429,2720,2722,2725],{"style":2721},"top:-3.23em;",[429,2723],{"className":2724,"style":2709},[1079],[429,2726],{"className":2727,"style":2729},[2728],"frac-line","border-bottom-width:0.04em;",[429,2731,2733,2736],{"style":2732},"top:-3.485em;",[429,2734],{"className":2735,"style":2709},[1079],[429,2737,2739],{"className":2738},[1084,1085,1086,1087],[429,2740,2742,2745,2748,2751,2755,2758],{"className":2741},[450,1087],[429,2743,716],{"className":2744},[450,451,1087],[429,2746,477],{"className":2747},[476,1087],[429,2749,716],{"className":2750},[450,451,1087],[429,2752,2754],{"className":2753},[854,1087],"−",[429,2756,412],{"className":2757},[450,1087],[429,2759,501],{"className":2760},[500,1087],[429,2762,1113],{"className":2763},[1112],[429,2765,2767],{"className":2766},[1067],[429,2768,2770],{"className":2769,"style":1120},[1071],[429,2771],{},[429,2773],{"className":2774},[500,2689]," edges, so ",[429,2777,2779],{"className":2778},[432],[429,2780,2782,2800],{"className":2781,"ariaHidden":437},[436],[429,2783,2785,2788,2791,2794,2797],{"className":2784},[441],[429,2786],{"className":2787,"style":599},[445],[429,2789,761],{"className":2790},[450,451],[429,2792],{"className":2793,"style":457},[456],[429,2795,462],{"className":2796},[461],[429,2798],{"className":2799,"style":457},[456],[429,2801,2803,2807,2810,2813,2844],{"className":2802},[441],[429,2804],{"className":2805,"style":2806},[445],"height:1.0641em;vertical-align:-0.25em;",[429,2808,841],{"className":2809,"style":840},[450,451],[429,2811,477],{"className":2812},[476],[429,2814,2816,2819],{"className":2815},[450],[429,2817,716],{"className":2818},[450,451],[429,2820,2822],{"className":2821},[1529],[429,2823,2825],{"className":2824},[1062],[429,2826,2828],{"className":2827},[1067],[429,2829,2832],{"className":2830,"style":2831},[1071],"height:0.8141em;",[429,2833,2835,2838],{"style":2834},"top:-3.063em;margin-right:0.05em;",[429,2836],{"className":2837,"style":1080},[1079],[429,2839,2841],{"className":2840},[1084,1085,1086,1087],[429,2842,989],{"className":2843},[450,1087],[429,2845,501],{"className":2846},[500],". A graph is ",[394,2849,2850],{},"sparse","\nwhen ",[429,2853,2855],{"className":2854},[432],[429,2856,2858],{"className":2857,"ariaHidden":437},[436],[429,2859,2861,2864],{"className":2860},[441],[429,2862],{"className":2863,"style":599},[445],[429,2865,761],{"className":2866},[450,451]," is close to ",[429,2869,2871],{"className":2870},[432],[429,2872,2874],{"className":2873,"ariaHidden":437},[436],[429,2875,2877,2880],{"className":2876},[441],[429,2878],{"className":2879,"style":599},[445],[429,2881,716],{"className":2882},[450,451],[394,2884,2885],{},"dense"," when ",[429,2888,2890],{"className":2889},[432],[429,2891,2893],{"className":2892,"ariaHidden":437},[436],[429,2894,2896,2899],{"className":2895},[441],[429,2897],{"className":2898,"style":599},[445],[429,2900,761],{"className":2901},[450,451],[429,2903,2905],{"className":2904},[432],[429,2906,2908],{"className":2907,"ariaHidden":437},[436],[429,2909,2911,2914],{"className":2910},[441],[429,2912],{"className":2913,"style":2831},[445],[429,2915,2917,2920],{"className":2916},[450],[429,2918,716],{"className":2919},[450,451],[429,2921,2923],{"className":2922},[1529],[429,2924,2926],{"className":2925},[1062],[429,2927,2929],{"className":2928},[1067],[429,2930,2932],{"className":2931,"style":2831},[1071],[429,2933,2934,2937],{"style":2834},[429,2935],{"className":2936,"style":1080},[1079],[429,2938,2940],{"className":2939},[1084,1085,1086,1087],[429,2941,989],{"className":2942},[450,1087],". This single\ndistinction governs which representation, and sometimes which algorithm, to\nchoose.",[414,2945,2947],{"id":2946},"two-ways-to-store-a-graph","Two ways to store a graph",[381,2949,2950,2951],{},"We need a concrete data structure before we can compute anything. The two\nstandard choices trade space against the speed of one key query: ",[385,2952,2953,2954,2395,2969,2984],{},"is there an\nedge from ",[429,2955,2957],{"className":2956},[432],[429,2958,2960],{"className":2959,"ariaHidden":437},[436],[429,2961,2963,2966],{"className":2962},[441],[429,2964],{"className":2965,"style":599},[445],[429,2967,570],{"className":2968},[450,451],[429,2970,2972],{"className":2971},[432],[429,2973,2975],{"className":2974,"ariaHidden":437},[436],[429,2976,2978,2981],{"className":2977},[441],[429,2979],{"className":2980,"style":599},[445],[429,2982,581],{"className":2983,"style":580},[450,451],"?",[381,2986,2987,2990,2991,3006,3007,3022,3023,3066],{},[394,2988,2989],{},"Adjacency list."," Keep an array indexed by vertex; entry ",[429,2992,2994],{"className":2993},[432],[429,2995,2997],{"className":2996,"ariaHidden":437},[436],[429,2998,3000,3003],{"className":2999},[441],[429,3001],{"className":3002,"style":599},[445],[429,3004,570],{"className":3005},[450,451]," holds a list of\n",[429,3008,3010],{"className":3009},[432],[429,3011,3013],{"className":3012,"ariaHidden":437},[436],[429,3014,3016,3019],{"className":3015},[441],[429,3017],{"className":3018,"style":599},[445],[429,3020,570],{"className":3021},[450,451],"'s neighbors. Total space is ",[429,3024,3026],{"className":3025},[432],[429,3027,3029,3054],{"className":3028,"ariaHidden":437},[436],[429,3030,3032,3035,3039,3042,3045,3048,3051],{"className":3031},[441],[429,3033],{"className":3034,"style":472},[445],[429,3036,3038],{"className":3037},[450],"Θ",[429,3040,477],{"className":3041},[476],[429,3043,482],{"className":3044,"style":481},[450,451],[429,3046],{"className":3047,"style":481},[456],[429,3049,855],{"className":3050},[854],[429,3052],{"className":3053,"style":481},[456],[429,3055,3057,3060,3063],{"className":3056},[441],[429,3058],{"className":3059,"style":472},[445],[429,3061,496],{"className":3062,"style":495},[450,451],[429,3064,501],{"className":3065},[500],", one slot per vertex plus one\nlist node per edge (two, in an undirected graph, since each edge appears on both\nendpoints' lists). Listing a vertex's neighbors is immediate, which is exactly\nwhat traversals need.",[381,3068,3069,3072,3073,3108,3109,3125,3126,3179,3180,3210,3211,3226,3227,3251,3252,3302,3303,3327],{},[394,3070,3071],{},"Adjacency matrix."," Keep an ",[429,3074,3076],{"className":3075},[432],[429,3077,3079,3099],{"className":3078,"ariaHidden":437},[436],[429,3080,3082,3086,3089,3092,3096],{"className":3081},[441],[429,3083],{"className":3084,"style":3085},[445],"height:0.6667em;vertical-align:-0.0833em;",[429,3087,716],{"className":3088},[450,451],[429,3090],{"className":3091,"style":481},[456],[429,3093,3095],{"className":3094},[854],"×",[429,3097],{"className":3098,"style":481},[456],[429,3100,3102,3105],{"className":3101},[441],[429,3103],{"className":3104,"style":599},[445],[429,3106,716],{"className":3107},[450,451]," matrix ",[429,3110,3112],{"className":3111},[432],[429,3113,3115],{"className":3114,"ariaHidden":437},[436],[429,3116,3118,3121],{"className":3117},[441],[429,3119],{"className":3120,"style":446},[445],[429,3122,3124],{"className":3123},[450,451],"A"," with ",[429,3127,3129],{"className":3128},[432],[429,3130,3132,3170],{"className":3131,"ariaHidden":437},[436],[429,3133,3135,3138,3141,3145,3148,3152,3155,3158,3161,3164,3167],{"className":3134},[441],[429,3136],{"className":3137,"style":472},[445],[429,3139,3124],{"className":3140},[450,451],[429,3142,3144],{"className":3143},[476],"[",[429,3146,570],{"className":3147},[450,451],[429,3149,3151],{"className":3150},[500],"]",[429,3153,3144],{"className":3154},[476],[429,3156,581],{"className":3157,"style":580},[450,451],[429,3159,3151],{"className":3160},[500],[429,3162],{"className":3163,"style":457},[456],[429,3165,462],{"className":3166},[461],[429,3168],{"className":3169,"style":457},[456],[429,3171,3173,3176],{"className":3172},[441],[429,3174],{"className":3175,"style":985},[445],[429,3177,412],{"className":3178},[450]," when\nedge ",[429,3181,3183],{"className":3182},[432],[429,3184,3186],{"className":3185,"ariaHidden":437},[436],[429,3187,3189,3192,3195,3198,3201,3204,3207],{"className":3188},[441],[429,3190],{"className":3191,"style":472},[445],[429,3193,477],{"className":3194},[476],[429,3196,570],{"className":3197},[450,451],[429,3199,487],{"className":3200},[486],[429,3202],{"className":3203,"style":491},[456],[429,3205,581],{"className":3206,"style":580},[450,451],[429,3208,501],{"className":3209},[500]," exists and ",[429,3212,3214],{"className":3213},[432],[429,3215,3217],{"className":3216,"ariaHidden":437},[436],[429,3218,3220,3223],{"className":3219},[441],[429,3221],{"className":3222,"style":985},[445],[429,3224,1857],{"className":3225},[450]," otherwise (or the weight, for a weighted graph).\nTesting a specific edge is ",[429,3228,3230],{"className":3229},[432],[429,3231,3233],{"className":3232,"ariaHidden":437},[436],[429,3234,3236,3239,3242,3245,3248],{"className":3235},[441],[429,3237],{"className":3238,"style":472},[445],[429,3240,841],{"className":3241,"style":840},[450,451],[429,3243,477],{"className":3244},[476],[429,3246,412],{"className":3247},[450],[429,3249,501],{"className":3250},[500],", but the matrix always occupies\n",[429,3253,3255],{"className":3254},[432],[429,3256,3258],{"className":3257,"ariaHidden":437},[436],[429,3259,3261,3264,3267,3270,3299],{"className":3260},[441],[429,3262],{"className":3263,"style":2806},[445],[429,3265,3038],{"className":3266},[450],[429,3268,477],{"className":3269},[476],[429,3271,3273,3276],{"className":3272},[450],[429,3274,482],{"className":3275,"style":481},[450,451],[429,3277,3279],{"className":3278},[1529],[429,3280,3282],{"className":3281},[1062],[429,3283,3285],{"className":3284},[1067],[429,3286,3288],{"className":3287,"style":2831},[1071],[429,3289,3290,3293],{"style":2834},[429,3291],{"className":3292,"style":1080},[1079],[429,3294,3296],{"className":3295},[1084,1085,1086,1087],[429,3297,989],{"className":3298},[450,1087],[429,3300,501],{"className":3301},[500]," space regardless of how few edges there are, and listing a\nvertex's neighbors costs ",[429,3304,3306],{"className":3305},[432],[429,3307,3309],{"className":3308,"ariaHidden":437},[436],[429,3310,3312,3315,3318,3321,3324],{"className":3311},[441],[429,3313],{"className":3314,"style":472},[445],[429,3316,3038],{"className":3317},[450],[429,3319,477],{"className":3320},[476],[429,3322,482],{"className":3323,"style":481},[450,451],[429,3325,501],{"className":3326},[500]," because we must scan a whole row.",[3329,3330,3331,3347],"table",{},[3332,3333,3334],"thead",{},[3335,3336,3337,3341,3344],"tr",{},[3338,3339,3340],"th",{},"Operation",[3338,3342,3343],{},"Adjacency list",[3338,3345,3346],{},"Adjacency matrix",[3348,3349,3350,3452,3547,3627,3684,3785],"tbody",{},[3335,3351,3352,3356,3400],{},[3353,3354,3355],"td",{},"Space",[3353,3357,3358],{},[429,3359,3361],{"className":3360},[432],[429,3362,3364,3388],{"className":3363,"ariaHidden":437},[436],[429,3365,3367,3370,3373,3376,3379,3382,3385],{"className":3366},[441],[429,3368],{"className":3369,"style":472},[445],[429,3371,3038],{"className":3372},[450],[429,3374,477],{"className":3375},[476],[429,3377,482],{"className":3378,"style":481},[450,451],[429,3380],{"className":3381,"style":481},[456],[429,3383,855],{"className":3384},[854],[429,3386],{"className":3387,"style":481},[456],[429,3389,3391,3394,3397],{"className":3390},[441],[429,3392],{"className":3393,"style":472},[445],[429,3395,496],{"className":3396,"style":495},[450,451],[429,3398,501],{"className":3399},[500],[3353,3401,3402],{},[429,3403,3405],{"className":3404},[432],[429,3406,3408],{"className":3407,"ariaHidden":437},[436],[429,3409,3411,3414,3417,3420,3449],{"className":3410},[441],[429,3412],{"className":3413,"style":2806},[445],[429,3415,3038],{"className":3416},[450],[429,3418,477],{"className":3419},[476],[429,3421,3423,3426],{"className":3422},[450],[429,3424,482],{"className":3425,"style":481},[450,451],[429,3427,3429],{"className":3428},[1529],[429,3430,3432],{"className":3431},[1062],[429,3433,3435],{"className":3434},[1067],[429,3436,3438],{"className":3437,"style":2831},[1071],[429,3439,3440,3443],{"style":2834},[429,3441],{"className":3442,"style":1080},[1079],[429,3444,3446],{"className":3445},[1084,1085,1086,1087],[429,3447,989],{"className":3448},[450,1087],[429,3450,501],{"className":3451},[500],[3335,3453,3454,3487,3521],{},[3353,3455,3456,3457,2984],{},"Test edge ",[429,3458,3460],{"className":3459},[432],[429,3461,3463],{"className":3462,"ariaHidden":437},[436],[429,3464,3466,3469,3472,3475,3478,3481,3484],{"className":3465},[441],[429,3467],{"className":3468,"style":472},[445],[429,3470,477],{"className":3471},[476],[429,3473,570],{"className":3474},[450,451],[429,3476,487],{"className":3477},[486],[429,3479],{"className":3480,"style":491},[456],[429,3482,581],{"className":3483,"style":580},[450,451],[429,3485,501],{"className":3486},[500],[3353,3488,3489],{},[429,3490,3492],{"className":3491},[432],[429,3493,3495],{"className":3494,"ariaHidden":437},[436],[429,3496,3498,3501,3504,3507,3512,3515,3518],{"className":3497},[441],[429,3499],{"className":3500,"style":472},[445],[429,3502,841],{"className":3503,"style":840},[450,451],[429,3505,477],{"className":3506},[476],[429,3508,1256,3510],{"className":3509},[1255],[429,3511,1260],{"style":1259},[429,3513],{"className":3514,"style":491},[456],[429,3516,570],{"className":3517},[450,451],[429,3519,501],{"className":3520},[500],[3353,3522,3523],{},[429,3524,3526],{"className":3525},[432],[429,3527,3529],{"className":3528,"ariaHidden":437},[436],[429,3530,3532,3535,3538,3541,3544],{"className":3531},[441],[429,3533],{"className":3534,"style":472},[445],[429,3536,3038],{"className":3537},[450],[429,3539,477],{"className":3540},[476],[429,3542,412],{"className":3543},[450],[429,3545,501],{"className":3546},[500],[3335,3548,3549,3567,3601],{},[3353,3550,3551,3552],{},"List neighbors of ",[429,3553,3555],{"className":3554},[432],[429,3556,3558],{"className":3557,"ariaHidden":437},[436],[429,3559,3561,3564],{"className":3560},[441],[429,3562],{"className":3563,"style":599},[445],[429,3565,570],{"className":3566},[450,451],[3353,3568,3569],{},[429,3570,3572],{"className":3571},[432],[429,3573,3575],{"className":3574,"ariaHidden":437},[436],[429,3576,3578,3581,3584,3587,3592,3595,3598],{"className":3577},[441],[429,3579],{"className":3580,"style":472},[445],[429,3582,3038],{"className":3583},[450],[429,3585,477],{"className":3586},[476],[429,3588,1256,3590],{"className":3589},[1255],[429,3591,1260],{"style":1259},[429,3593],{"className":3594,"style":491},[456],[429,3596,570],{"className":3597},[450,451],[429,3599,501],{"className":3600},[500],[3353,3602,3603],{},[429,3604,3606],{"className":3605},[432],[429,3607,3609],{"className":3608,"ariaHidden":437},[436],[429,3610,3612,3615,3618,3621,3624],{"className":3611},[441],[429,3613],{"className":3614,"style":472},[445],[429,3616,3038],{"className":3617},[450],[429,3619,477],{"className":3620},[476],[429,3622,482],{"className":3623,"style":481},[450,451],[429,3625,501],{"className":3626},[500],[3335,3628,3629,3632,3658],{},[3353,3630,3631],{},"Add an edge",[3353,3633,3634],{},[429,3635,3637],{"className":3636},[432],[429,3638,3640],{"className":3639,"ariaHidden":437},[436],[429,3641,3643,3646,3649,3652,3655],{"className":3642},[441],[429,3644],{"className":3645,"style":472},[445],[429,3647,841],{"className":3648,"style":840},[450,451],[429,3650,477],{"className":3651},[476],[429,3653,412],{"className":3654},[450],[429,3656,501],{"className":3657},[500],[3353,3659,3660],{},[429,3661,3663],{"className":3662},[432],[429,3664,3666],{"className":3665,"ariaHidden":437},[436],[429,3667,3669,3672,3675,3678,3681],{"className":3668},[441],[429,3670],{"className":3671,"style":472},[445],[429,3673,3038],{"className":3674},[450],[429,3676,477],{"className":3677},[476],[429,3679,412],{"className":3680},[450],[429,3682,501],{"className":3683},[500],[3335,3685,3686,3689,3733],{},[3353,3687,3688],{},"Iterate over all edges",[3353,3690,3691],{},[429,3692,3694],{"className":3693},[432],[429,3695,3697,3721],{"className":3696,"ariaHidden":437},[436],[429,3698,3700,3703,3706,3709,3712,3715,3718],{"className":3699},[441],[429,3701],{"className":3702,"style":472},[445],[429,3704,3038],{"className":3705},[450],[429,3707,477],{"className":3708},[476],[429,3710,482],{"className":3711,"style":481},[450,451],[429,3713],{"className":3714,"style":481},[456],[429,3716,855],{"className":3717},[854],[429,3719],{"className":3720,"style":481},[456],[429,3722,3724,3727,3730],{"className":3723},[441],[429,3725],{"className":3726,"style":472},[445],[429,3728,496],{"className":3729,"style":495},[450,451],[429,3731,501],{"className":3732},[500],[3353,3734,3735],{},[429,3736,3738],{"className":3737},[432],[429,3739,3741],{"className":3740,"ariaHidden":437},[436],[429,3742,3744,3747,3750,3753,3782],{"className":3743},[441],[429,3745],{"className":3746,"style":2806},[445],[429,3748,3038],{"className":3749},[450],[429,3751,477],{"className":3752},[476],[429,3754,3756,3759],{"className":3755},[450],[429,3757,482],{"className":3758,"style":481},[450,451],[429,3760,3762],{"className":3761},[1529],[429,3763,3765],{"className":3764},[1062],[429,3766,3768],{"className":3767},[1067],[429,3769,3771],{"className":3770,"style":2831},[1071],[429,3772,3773,3776],{"style":2834},[429,3774],{"className":3775,"style":1080},[1079],[429,3777,3779],{"className":3778},[1084,1085,1086,1087],[429,3780,989],{"className":3781},[450,1087],[429,3783,501],{"className":3784},[500],[3335,3786,3787,3790,3795],{},[3353,3788,3789],{},"Best when",[3353,3791,3792,3793],{},"graph is ",[394,3794,2850],{},[3353,3796,3792,3797],{},[394,3798,2885],{},[381,3800,3801,3802,3837],{},"Concretely, here is the five-vertex graph above stored both ways. The list keeps\none short neighbor-list per vertex; the matrix spends a full ",[429,3803,3805],{"className":3804},[432],[429,3806,3808,3828],{"className":3807,"ariaHidden":437},[436],[429,3809,3811,3815,3819,3822,3825],{"className":3810},[441],[429,3812],{"className":3813,"style":3814},[445],"height:0.7278em;vertical-align:-0.0833em;",[429,3816,3818],{"className":3817},[450],"5",[429,3820],{"className":3821,"style":481},[456],[429,3823,3095],{"className":3824},[854],[429,3826],{"className":3827,"style":481},[456],[429,3829,3831,3834],{"className":3830},[441],[429,3832],{"className":3833,"style":985},[445],[429,3835,3818],{"className":3836},[450]," grid of\nbits, symmetric across the diagonal because the graph is undirected:",[2506,3839,3841,4368],{"className":3840},[2509,2510],[2512,3842,3846],{"xmlns":2514,"width":3843,"height":3844,"viewBox":3845},"341.338","155.921","-75 -75 256.003 116.941",[1260,3847,3848,3866,3879,3900,3912,3938,3950,3975,3987,4006,4018,4038,4052,4059,4066,4073,4080,4087,4093,4099,4105,4111,4117,4120,4127,4139,4150,4153,4159,4162,4168,4179,4182,4188,4199,4210,4213,4219,4230,4241,4244,4250,4253,4259,4270,4273,4279,4290,4293,4299,4302,4308,4319,4322,4328,4331,4337,4348,4359,4362],{"stroke":2520,"style":2521},[1260,3849,3852,3860],{"stroke":2524,"fontFamily":3850,"fontSize":3851},"cmbx8","8",[1260,3853,3855],{"transform":3854},"translate(-9.169 -83.358)",[2255,3856],{"d":3857,"fill":2520,"stroke":2520,"className":3858,"style":3859},"M-52.828 19.047Q-52.828 18.676-52.533 18.424Q-52.238 18.172-51.787 18.041Q-51.335 17.911-50.900 17.864Q-50.464 17.817-50.078 17.817L-50.078 17.563Q-50.078 17.165-50.308 16.934Q-50.538 16.704-50.933 16.704Q-51.359 16.704-51.566 16.754Q-51.406 16.899-51.406 17.153Q-51.406 17.387-51.564 17.545Q-51.722 17.704-51.956 17.704Q-52.199 17.704-52.357 17.545Q-52.515 17.387-52.515 17.153Q-52.515 16.641-52.050 16.489Q-51.585 16.336-50.933 16.336Q-50.511 16.336-50.081 16.452Q-49.652 16.567-49.361 16.838Q-49.070 17.110-49.070 17.543L-49.070 19.403Q-49.038 19.528-48.499 19.528Q-48.441 19.528-48.394 19.575Q-48.347 19.622-48.347 19.680L-48.347 19.817Q-48.347 19.883-48.394 19.930Q-48.441 19.977-48.499 19.977L-49.046 19.977Q-49.925 19.977-49.925 19.473Q-50.113 19.750-50.458 19.891Q-50.804 20.032-51.171 20.032Q-51.546 20.032-51.927 19.948Q-52.308 19.864-52.568 19.641Q-52.828 19.418-52.828 19.047M-51.820 19.047Q-51.820 19.235-51.708 19.375Q-51.597 19.516-51.421 19.590Q-51.246 19.665-51.062 19.665Q-50.831 19.665-50.603 19.584Q-50.374 19.504-50.226 19.344Q-50.078 19.184-50.078 18.946L-50.078 18.153Q-50.413 18.153-50.816 18.237Q-51.218 18.321-51.519 18.522Q-51.820 18.723-51.820 19.047M-48.011 18.200Q-48.011 17.754-47.841 17.409Q-47.671 17.063-47.371 16.832Q-47.070 16.602-46.681 16.485Q-46.292 16.368-45.874 16.368Q-45.566 16.368-45.275 16.454Q-44.984 16.540-44.738 16.704L-44.738 15.161Q-44.738 15.012-44.884 14.975Q-45.031 14.938-45.269 14.938L-45.269 14.489L-43.781 14.426L-43.781 19.305Q-43.781 19.454-43.634 19.491Q-43.488 19.528-43.249 19.528L-43.249 19.977L-44.788 20.032L-44.788 19.657Q-45.304 20.032-45.980 20.032Q-46.390 20.032-46.757 19.913Q-47.124 19.793-47.410 19.557Q-47.695 19.321-47.853 18.975Q-48.011 18.629-48.011 18.200M-45.890 19.665Q-45.566 19.665-45.269 19.506Q-44.972 19.348-44.788 19.075L-44.788 17.207Q-44.960 16.985-45.228 16.862Q-45.496 16.739-45.781 16.739Q-46.234 16.739-46.482 16.928Q-46.730 17.118-46.814 17.430Q-46.898 17.743-46.898 18.200Q-46.898 18.649-46.831 18.956Q-46.765 19.262-46.542 19.463Q-46.320 19.665-45.890 19.665M-43.402 20.786Q-43.402 20.633-43.330 20.506Q-43.257 20.379-43.128 20.307Q-42.999 20.235-42.843 20.235Q-42.691 20.235-42.562 20.309Q-42.433 20.383-42.361 20.508Q-42.288 20.633-42.288 20.786Q-42.288 21.024-42.449 21.184Q-42.324 21.215-42.156 21.215Q-41.847 21.215-41.697 20.934Q-41.546 20.653-41.546 20.313L-41.546 17.106Q-41.546 16.879-42.128 16.879L-42.128 16.434L-40.585 16.368L-40.585 20.336Q-40.585 20.731-40.822 21.012Q-41.058 21.293-41.425 21.440Q-41.792 21.586-42.171 21.586Q-42.644 21.586-43.023 21.399Q-43.402 21.211-43.402 20.786M-41.898 15.075Q-41.898 14.797-41.705 14.608Q-41.511 14.418-41.242 14.418Q-41.062 14.418-40.912 14.508Q-40.761 14.598-40.673 14.745Q-40.585 14.891-40.585 15.075Q-40.585 15.344-40.779 15.538Q-40.972 15.731-41.242 15.731Q-41.515 15.731-41.706 15.540Q-41.898 15.348-41.898 15.075M-39.632 19.047Q-39.632 18.676-39.337 18.424Q-39.042 18.172-38.591 18.041Q-38.140 17.911-37.705 17.864Q-37.269 17.817-36.882 17.817L-36.882 17.563Q-36.882 17.165-37.113 16.934Q-37.343 16.704-37.738 16.704Q-38.163 16.704-38.371 16.754Q-38.210 16.899-38.210 17.153Q-38.210 17.387-38.369 17.545Q-38.527 17.704-38.761 17.704Q-39.003 17.704-39.162 17.545Q-39.320 17.387-39.320 17.153Q-39.320 16.641-38.855 16.489Q-38.390 16.336-37.738 16.336Q-37.316 16.336-36.886 16.452Q-36.456 16.567-36.165 16.838Q-35.874 17.110-35.874 17.543L-35.874 19.403Q-35.843 19.528-35.304 19.528Q-35.246 19.528-35.199 19.575Q-35.152 19.622-35.152 19.680L-35.152 19.817Q-35.152 19.883-35.199 19.930Q-35.246 19.977-35.304 19.977L-35.851 19.977Q-36.730 19.977-36.730 19.473Q-36.917 19.750-37.263 19.891Q-37.609 20.032-37.976 20.032Q-38.351 20.032-38.732 19.948Q-39.113 19.864-39.372 19.641Q-39.632 19.418-39.632 19.047M-38.624 19.047Q-38.624 19.235-38.513 19.375Q-38.402 19.516-38.226 19.590Q-38.050 19.665-37.867 19.665Q-37.636 19.665-37.408 19.584Q-37.179 19.504-37.031 19.344Q-36.882 19.184-36.882 18.946L-36.882 18.153Q-37.218 18.153-37.621 18.237Q-38.023 18.321-38.324 18.522Q-38.624 18.723-38.624 19.047M-34.816 18.200Q-34.816 17.754-34.650 17.405Q-34.484 17.055-34.187 16.815Q-33.890 16.575-33.511 16.456Q-33.132 16.336-32.695 16.336Q-32.101 16.336-31.642 16.502Q-31.183 16.668-31.183 17.153Q-31.183 17.387-31.341 17.545Q-31.499 17.704-31.738 17.704Q-31.972 17.704-32.134 17.541Q-32.296 17.379-32.296 17.153Q-32.296 16.918-32.160 16.778Q-32.382 16.747-32.695 16.747Q-33.105 16.747-33.326 16.950Q-33.546 17.153-33.624 17.471Q-33.703 17.790-33.703 18.192Q-33.703 18.848-33.423 19.237Q-33.144 19.625-32.503 19.625Q-31.781 19.625-31.535 18.993Q-31.503 18.915-31.425 18.915L-31.199 18.915Q-31.074 18.942-31.074 19.047L-31.074 19.090Q-31.203 19.426-31.443 19.635Q-31.683 19.844-32.005 19.938Q-32.328 20.032-32.695 20.032Q-33.273 20.032-33.755 19.823Q-34.238 19.614-34.527 19.200Q-34.816 18.786-34.816 18.200M-30.519 18.176Q-30.519 17.598-30.236 17.178Q-29.953 16.758-29.468 16.547Q-28.984 16.336-28.417 16.336Q-27.976 16.336-27.640 16.448Q-27.304 16.559-27.070 16.780Q-26.835 17-26.710 17.331Q-26.585 17.661-26.585 18.098Q-26.585 18.254-26.738 18.282L-29.410 18.282Q-29.410 19.625-28.152 19.625Q-27.800 19.625-27.494 19.469Q-27.187 19.313-27.066 19.016Q-26.992 18.887-26.906 18.887L-26.738 18.887Q-26.585 18.922-26.585 19.055Q-26.585 19.090-26.593 19.106Q-26.777 19.582-27.242 19.807Q-27.706 20.032-28.281 20.032Q-28.878 20.032-29.388 19.829Q-29.898 19.625-30.208 19.204Q-30.519 18.782-30.519 18.176M-29.410 17.938L-27.402 17.938Q-27.402 17.399-27.650 17.051Q-27.898 16.704-28.417 16.704Q-28.761 16.704-28.986 16.870Q-29.210 17.036-29.310 17.313Q-29.410 17.590-29.410 17.938M-23.808 19.977L-25.871 19.977L-25.871 19.528L-25.343 19.528L-25.343 17.106Q-25.343 16.954-25.490 16.916Q-25.636 16.879-25.871 16.879L-25.871 16.434L-24.441 16.368L-24.441 17.161Q-24.292 16.915-24.058 16.735Q-23.824 16.555-23.546 16.461Q-23.269 16.368-22.976 16.368Q-22.535 16.368-22.238 16.475Q-21.941 16.582-21.779 16.842Q-21.617 17.102-21.617 17.536L-21.617 19.528L-21.089 19.528L-21.089 19.977L-23.152 19.977L-23.152 19.528L-22.624 19.528L-22.624 17.563Q-22.624 17.188-22.703 16.963Q-22.781 16.739-23.074 16.739Q-23.585 16.739-23.960 17.073Q-24.335 17.407-24.335 17.915L-24.335 19.528L-23.808 19.528L-23.808 19.977M-20.535 18.200Q-20.535 17.754-20.369 17.405Q-20.203 17.055-19.906 16.815Q-19.609 16.575-19.230 16.456Q-18.851 16.336-18.413 16.336Q-17.820 16.336-17.361 16.502Q-16.902 16.668-16.902 17.153Q-16.902 17.387-17.060 17.545Q-17.218 17.704-17.456 17.704Q-17.691 17.704-17.853 17.541Q-18.015 17.379-18.015 17.153Q-18.015 16.918-17.878 16.778Q-18.101 16.747-18.413 16.747Q-18.824 16.747-19.044 16.950Q-19.265 17.153-19.343 17.471Q-19.421 17.790-19.421 18.192Q-19.421 18.848-19.142 19.237Q-18.863 19.625-18.222 19.625Q-17.499 19.625-17.253 18.993Q-17.222 18.915-17.144 18.915L-16.917 18.915Q-16.792 18.942-16.792 19.047L-16.792 19.090Q-16.921 19.426-17.162 19.635Q-17.402 19.844-17.724 19.938Q-18.046 20.032-18.413 20.032Q-18.992 20.032-19.474 19.823Q-19.956 19.614-20.246 19.200Q-20.535 18.786-20.535 18.200M-16.320 20.778Q-16.320 20.555-16.171 20.411Q-16.023 20.266-15.800 20.266Q-15.660 20.266-15.540 20.332Q-15.421 20.399-15.355 20.518Q-15.288 20.637-15.288 20.778Q-15.288 21.067-15.503 21.207Q-15.480 21.215-15.421 21.215Q-15.124 21.215-14.878 21.032Q-14.632 20.848-14.496 20.571L-14.199 19.977L-15.749 16.872L-16.273 16.872L-16.273 16.426L-14.312 16.426L-14.312 16.872L-14.679 16.872L-13.663 18.915L-12.663 16.922Q-12.663 16.872-13.007 16.872L-13.007 16.426L-11.581 16.426L-11.581 16.872Q-12.078 16.872-12.128 16.930L-13.960 20.571Q-14.175 21.004-14.566 21.295Q-14.956 21.586-15.421 21.586Q-15.648 21.586-15.857 21.483Q-16.066 21.379-16.193 21.192Q-16.320 21.004-16.320 20.778",[2533],"stroke-width:0.240",[1260,3861,3862],{"transform":3854},[2255,3863],{"d":3864,"fill":2520,"stroke":2520,"className":3865,"style":3859},"M-5.578 19.977L-7.594 19.977L-7.594 19.528L-7.067 19.528L-7.067 15.161Q-7.067 15.012-7.213 14.975Q-7.360 14.938-7.594 14.938L-7.594 14.489L-6.106 14.426L-6.106 19.528L-5.578 19.528L-5.578 19.977M-2.918 19.977L-4.875 19.977L-4.875 19.528L-4.348 19.528L-4.348 17.106Q-4.348 16.954-4.485 16.916Q-4.621 16.879-4.852 16.879L-4.852 16.434L-3.387 16.368L-3.387 19.528L-2.918 19.528L-2.918 19.977M-4.629 15.075Q-4.629 14.797-4.436 14.608Q-4.242 14.418-3.973 14.418Q-3.793 14.418-3.643 14.508Q-3.492 14.598-3.405 14.745Q-3.317 14.891-3.317 15.075Q-3.317 15.344-3.510 15.538Q-3.703 15.731-3.973 15.731Q-4.246 15.731-4.438 15.540Q-4.629 15.348-4.629 15.075M-2.047 20.032L-2.156 20.032Q-2.285 20-2.285 19.899L-2.285 18.856Q-2.285 18.813-2.248 18.772Q-2.211 18.731-2.156 18.731L-1.934 18.731Q-1.832 18.758-1.805 18.832Q-1.688 19.247-1.403 19.456Q-1.117 19.665-0.684 19.665Q-0.297 19.665-0.016 19.555Q0.265 19.446 0.265 19.114Q0.265 18.879 0.062 18.756Q-0.141 18.633-0.430 18.579L-1.055 18.481Q-1.274 18.438-1.490 18.356Q-1.707 18.274-1.891 18.145Q-2.074 18.016-2.180 17.838Q-2.285 17.661-2.285 17.426Q-2.285 17.004-2.051 16.762Q-1.817 16.520-1.461 16.428Q-1.106 16.336-0.684 16.336Q-0.176 16.336 0.129 16.473L0.402 16.344Q0.410 16.340 0.420 16.338Q0.429 16.336 0.441 16.336L0.547 16.336Q0.676 16.368 0.676 16.465L0.676 17.274Q0.676 17.325 0.633 17.368Q0.590 17.411 0.547 17.411L0.324 17.411Q0.195 17.372 0.195 17.274Q0.195 17.043 0.066 16.907Q-0.063 16.770-0.260 16.717Q-0.457 16.665-0.692 16.665Q-1.637 16.665-1.637 17.122Q-1.637 17.438-0.989 17.551L-0.356 17.657Q0.160 17.750 0.537 18.047Q0.914 18.344 0.914 18.832Q0.914 19.489 0.463 19.760Q0.011 20.032-0.684 20.032Q-1.242 20.032-1.629 19.801L-1.989 20.016Q-2.020 20.032-2.047 20.032M2.105 19.055L2.105 16.872L1.433 16.872L1.433 16.504Q1.820 16.504 2.094 16.258Q2.367 16.012 2.500 15.637Q2.633 15.262 2.633 14.899L3.113 14.899L3.113 16.426L4.347 16.426L4.347 16.872L3.113 16.872L3.113 19.040Q3.113 19.625 3.570 19.625Q3.781 19.625 3.904 19.442Q4.027 19.258 4.027 19.040L4.027 18.586L4.508 18.586L4.508 19.055Q4.508 19.329 4.361 19.551Q4.215 19.774 3.974 19.903Q3.734 20.032 3.465 20.032Q2.890 20.032 2.498 19.809Q2.105 19.586 2.105 19.055",[2533],[1260,3867,3869,3872],{"fill":3868},"var(--tk-soft-accent)",[2255,3870],{"d":3871},"M-60.215-41.196h14.227v-14.227h-14.227Z",[1260,3873,3875],{"transform":3874},"translate(-2.154 -66.349)",[2255,3876],{"d":3877,"fill":2520,"stroke":2520,"className":3878,"style":2534},"M-52.266 19.428Q-52.046 19.814-51.290 19.814Q-50.992 19.814-50.697 19.713Q-50.403 19.612-50.209 19.399Q-50.016 19.186-50.016 18.878Q-50.016 18.650-50.194 18.503Q-50.372 18.355-50.618 18.303L-51.128 18.206Q-51.343 18.166-51.519 18.043Q-51.695 17.920-51.800 17.734Q-51.906 17.547-51.906 17.331Q-51.906 16.932-51.682 16.626Q-51.457 16.321-51.099 16.160Q-50.741 16-50.337 16Q-50.073 16-49.825 16.079Q-49.577 16.158-49.407 16.338Q-49.238 16.519-49.238 16.782Q-49.238 16.989-49.359 17.147Q-49.480 17.305-49.691 17.305Q-49.814 17.305-49.900 17.224Q-49.985 17.143-49.985 17.024Q-49.985 16.861-49.862 16.727Q-49.739 16.593-49.581 16.593Q-49.669 16.413-49.886 16.336Q-50.104 16.259-50.354 16.259Q-50.596 16.259-50.822 16.347Q-51.049 16.435-51.194 16.604Q-51.339 16.773-51.339 17.024Q-51.339 17.200-51.207 17.318Q-51.075 17.437-50.877 17.485L-50.372 17.582Q-49.985 17.661-49.717 17.931Q-49.449 18.202-49.449 18.584Q-49.449 18.914-49.638 19.234Q-49.827 19.555-50.104 19.753Q-50.605 20.078-51.299 20.078Q-51.611 20.078-51.912 19.992Q-52.213 19.907-52.418 19.709Q-52.622 19.511-52.622 19.204Q-52.622 18.953-52.479 18.769Q-52.336 18.584-52.095 18.584Q-51.941 18.584-51.842 18.676Q-51.743 18.769-51.743 18.914Q-51.743 19.124-51.895 19.276Q-52.046 19.428-52.266 19.428",[2533],[1260,3880,3881,3888,3894],{"stroke":2524,"fontSize":3851},[1260,3882,3884],{"transform":3883},"translate(19.382 -66.286)",[2255,3885],{"d":3886,"fill":2520,"stroke":2520,"className":3887,"style":3859},"M-46.109 18.161L-52.453 18.161Q-52.527 18.161-52.578 18.104Q-52.628 18.047-52.628 17.977Q-52.628 17.907-52.581 17.850Q-52.535 17.793-52.453 17.793L-46.109 17.793Q-46.562 17.465-46.859 16.998Q-47.156 16.532-47.261 15.993Q-47.261 15.891-47.163 15.864L-46.996 15.864Q-46.913 15.883-46.894 15.969Q-46.765 16.645-46.285 17.163Q-45.804 17.680-45.140 17.872Q-45.078 17.895-45.078 17.977Q-45.078 18.059-45.140 18.082Q-45.804 18.270-46.285 18.790Q-46.765 19.309-46.894 19.985Q-46.913 20.071-46.996 20.090L-47.163 20.090Q-47.261 20.063-47.261 19.961Q-47.187 19.594-47.029 19.262Q-46.871 18.930-46.638 18.653Q-46.406 18.375-46.109 18.161",[2533],[1260,3889,3890],{"transform":3883},[2255,3891],{"d":3892,"fill":2520,"stroke":2520,"className":3893,"style":3859},"M-40.264 20.055Q-40.620 20.055-40.889 19.875Q-41.159 19.696-41.299 19.401Q-41.440 19.106-41.440 18.747Q-41.440 18.360-41.278 17.946Q-41.116 17.532-40.832 17.194Q-40.549 16.856-40.180 16.653Q-39.811 16.450-39.409 16.450Q-38.916 16.450-38.639 16.899Q-38.608 16.766-38.504 16.684Q-38.401 16.602-38.272 16.602Q-38.159 16.602-38.079 16.672Q-37.998 16.743-37.998 16.856Q-37.998 16.883-38.014 16.946L-38.569 19.145Q-38.608 19.391-38.608 19.442Q-38.608 19.801-38.362 19.801Q-38.217 19.801-38.116 19.694Q-38.014 19.586-37.950 19.432Q-37.885 19.278-37.836 19.088Q-37.788 18.899-37.768 18.801Q-37.741 18.731-37.678 18.731L-37.577 18.731Q-37.538 18.731-37.512 18.764Q-37.487 18.797-37.487 18.825Q-37.487 18.840-37.495 18.856Q-37.608 19.348-37.807 19.702Q-38.006 20.055-38.377 20.055Q-38.659 20.055-38.885 19.913Q-39.112 19.770-39.194 19.512Q-39.416 19.754-39.690 19.905Q-39.963 20.055-40.264 20.055M-40.248 19.801Q-40.038 19.801-39.829 19.688Q-39.620 19.575-39.450 19.401Q-39.280 19.227-39.151 19.032Q-39.163 19.047-39.172 19.061Q-39.182 19.075-39.194 19.090L-38.760 17.368Q-38.799 17.188-38.885 17.038Q-38.971 16.887-39.108 16.795Q-39.245 16.704-39.424 16.704Q-39.760 16.704-40.032 16.985Q-40.303 17.266-40.463 17.641Q-40.588 17.961-40.686 18.381Q-40.784 18.801-40.784 19.082Q-40.784 19.372-40.651 19.586Q-40.518 19.801-40.248 19.801M-36.432 21.383Q-36.432 21.360-36.401 21.313Q-36.108 21.051-35.942 20.684Q-35.776 20.317-35.776 19.930L-35.776 19.872Q-35.905 19.977-36.073 19.977Q-36.264 19.977-36.401 19.844Q-36.538 19.711-36.538 19.512Q-36.538 19.321-36.401 19.188Q-36.264 19.055-36.073 19.055Q-35.772 19.055-35.647 19.325Q-35.522 19.594-35.522 19.930Q-35.522 20.379-35.704 20.793Q-35.885 21.207-36.225 21.504Q-36.248 21.528-36.288 21.528Q-36.334 21.528-36.383 21.483Q-36.432 21.438-36.432 21.383",[2533],[1260,3895,3896],{"transform":3883},[2255,3897],{"d":3898,"fill":2520,"stroke":2520,"className":3899,"style":3859},"M-30.555 20.055Q-30.895 20.055-31.155 19.877Q-31.414 19.700-31.549 19.405Q-31.684 19.110-31.684 18.762Q-31.684 18.500-31.618 18.243L-30.868 15.215Q-30.856 15.168-30.829 15.067Q-30.801 14.965-30.801 14.915Q-30.801 14.809-31.297 14.809Q-31.395 14.778-31.395 14.680L-31.371 14.579Q-31.364 14.532-31.282 14.512L-30.180 14.426Q-30.137 14.426-30.098 14.457Q-30.059 14.489-30.059 14.543L-30.633 16.864Q-30.176 16.450-29.700 16.450Q-29.336 16.450-29.071 16.629Q-28.805 16.809-28.664 17.110Q-28.524 17.411-28.524 17.762Q-28.524 18.286-28.805 18.825Q-29.086 19.364-29.553 19.709Q-30.020 20.055-30.555 20.055M-30.539 19.801Q-30.204 19.801-29.924 19.510Q-29.645 19.219-29.508 18.864Q-29.383 18.571-29.282 18.137Q-29.180 17.704-29.180 17.426Q-29.180 17.141-29.313 16.922Q-29.446 16.704-29.715 16.704Q-29.926 16.704-30.121 16.805Q-30.317 16.907-30.477 17.063Q-30.637 17.219-30.770 17.411L-30.996 18.282Q-31.047 18.516-31.077 18.698Q-31.106 18.879-31.106 19.032Q-31.106 19.332-30.965 19.567Q-30.825 19.801-30.539 19.801",[2533],[1260,3901,3902,3905],{"fill":3868},[2255,3903],{"d":3904},"M-60.215-24.125h14.227v-14.226h-14.227Z",[1260,3906,3908],{"transform":3907},"translate(-2.45 -49.278)",[2255,3909],{"d":3910,"fill":2520,"stroke":2520,"className":3911,"style":2534},"M-51.479 20.078Q-51.875 20.078-52.161 19.874Q-52.446 19.669-52.593 19.335Q-52.741 19.001-52.741 18.610Q-52.741 18.175-52.567 17.714Q-52.393 17.252-52.081 16.861Q-51.769 16.470-51.359 16.235Q-50.948 16-50.508 16Q-50.240 16-50.023 16.138Q-49.805 16.277-49.673 16.523Q-49.634 16.373-49.526 16.277Q-49.418 16.180-49.278 16.180Q-49.155 16.180-49.071 16.253Q-48.988 16.325-48.988 16.448Q-48.988 16.501-48.997 16.532L-49.616 19.023Q-49.673 19.221-49.673 19.419Q-49.673 19.814-49.410 19.814Q-49.124 19.814-48.990 19.491Q-48.856 19.168-48.737 18.663Q-48.728 18.632-48.704 18.608Q-48.680 18.584-48.645 18.584L-48.539 18.584Q-48.491 18.584-48.469 18.617Q-48.447 18.650-48.447 18.698Q-48.561 19.129-48.652 19.382Q-48.742 19.634-48.935 19.856Q-49.128 20.078-49.427 20.078Q-49.735 20.078-49.983 19.907Q-50.231 19.735-50.302 19.445Q-50.557 19.731-50.853 19.904Q-51.150 20.078-51.479 20.078M-51.462 19.814Q-51.132 19.814-50.822 19.573Q-50.513 19.331-50.302 19.015Q-50.293 19.006-50.293 18.988L-49.796 17.024Q-49.853 16.707-50.045 16.483Q-50.236 16.259-50.526 16.259Q-50.895 16.259-51.194 16.578Q-51.493 16.896-51.660 17.305Q-51.796 17.652-51.921 18.162Q-52.046 18.672-52.046 18.997Q-52.046 19.322-51.908 19.568Q-51.769 19.814-51.462 19.814",[2533],[1260,3913,3914,3920,3926,3932],{"stroke":2524,"fontSize":3851},[1260,3915,3917],{"transform":3916},"translate(19.382 -49.215)",[2255,3918],{"d":3886,"fill":2520,"stroke":2520,"className":3919,"style":3859},[2533],[1260,3921,3922],{"transform":3916},[2255,3923],{"d":3924,"fill":2520,"stroke":2520,"className":3925,"style":3859},"M-40.975 19.497Q-40.760 19.801-40.096 19.801Q-39.666 19.801-39.309 19.600Q-38.952 19.399-38.952 19Q-38.952 18.797-39.112 18.674Q-39.272 18.551-39.479 18.512L-39.944 18.426Q-40.260 18.356-40.475 18.149Q-40.690 17.942-40.690 17.633Q-40.690 17.270-40.485 16.998Q-40.280 16.727-39.950 16.588Q-39.620 16.450-39.264 16.450Q-38.877 16.450-38.567 16.618Q-38.256 16.786-38.256 17.137Q-38.256 17.329-38.362 17.469Q-38.467 17.610-38.655 17.610Q-38.764 17.610-38.846 17.538Q-38.928 17.465-38.928 17.352Q-38.928 17.207-38.831 17.098Q-38.733 16.989-38.592 16.969Q-38.682 16.825-38.873 16.764Q-39.065 16.704-39.280 16.704Q-39.612 16.704-39.885 16.875Q-40.159 17.047-40.159 17.360Q-40.159 17.516-40.047 17.610Q-39.936 17.704-39.760 17.747L-39.303 17.832Q-38.928 17.903-38.676 18.135Q-38.424 18.368-38.424 18.731Q-38.424 19.004-38.569 19.272Q-38.713 19.540-38.952 19.719Q-39.428 20.055-40.112 20.055Q-40.389 20.055-40.670 19.983Q-40.952 19.911-41.143 19.737Q-41.334 19.563-41.334 19.282Q-41.334 19.059-41.206 18.895Q-41.077 18.731-40.858 18.731Q-40.713 18.731-40.625 18.813Q-40.538 18.895-40.538 19.032Q-40.538 19.211-40.668 19.354Q-40.799 19.497-40.975 19.497M-37.014 21.383Q-37.014 21.360-36.983 21.313Q-36.690 21.051-36.524 20.684Q-36.358 20.317-36.358 19.930L-36.358 19.872Q-36.487 19.977-36.655 19.977Q-36.846 19.977-36.983 19.844Q-37.120 19.711-37.120 19.512Q-37.120 19.321-36.983 19.188Q-36.846 19.055-36.655 19.055Q-36.354 19.055-36.229 19.325Q-36.104 19.594-36.104 19.930Q-36.104 20.379-36.286 20.793Q-36.467 21.207-36.807 21.504Q-36.831 21.528-36.870 21.528Q-36.916 21.528-36.965 21.483Q-37.014 21.438-37.014 21.383",[2533],[1260,3927,3928],{"transform":3916},[2255,3929],{"d":3930,"fill":2520,"stroke":2520,"className":3931,"style":3859},"M-31.139 20.055Q-31.479 20.055-31.739 19.877Q-31.998 19.700-32.133 19.405Q-32.268 19.110-32.268 18.762Q-32.268 18.500-32.202 18.243L-31.452 15.215Q-31.440 15.168-31.413 15.067Q-31.385 14.965-31.385 14.915Q-31.385 14.809-31.881 14.809Q-31.979 14.778-31.979 14.680L-31.956 14.579Q-31.948 14.532-31.866 14.512L-30.764 14.426Q-30.721 14.426-30.682 14.457Q-30.643 14.489-30.643 14.543L-31.217 16.864Q-30.760 16.450-30.284 16.450Q-29.920 16.450-29.655 16.629Q-29.389 16.809-29.248 17.110Q-29.108 17.411-29.108 17.762Q-29.108 18.286-29.389 18.825Q-29.670 19.364-30.137 19.709Q-30.604 20.055-31.139 20.055M-31.123 19.801Q-30.788 19.801-30.508 19.510Q-30.229 19.219-30.092 18.864Q-29.967 18.571-29.866 18.137Q-29.764 17.704-29.764 17.426Q-29.764 17.141-29.897 16.922Q-30.030 16.704-30.299 16.704Q-30.510 16.704-30.706 16.805Q-30.901 16.907-31.061 17.063Q-31.221 17.219-31.354 17.411L-31.581 18.282Q-31.631 18.516-31.661 18.698Q-31.690 18.879-31.690 19.032Q-31.690 19.332-31.549 19.567Q-31.409 19.801-31.123 19.801M-28.186 21.383Q-28.186 21.360-28.155 21.313Q-27.862 21.051-27.696 20.684Q-27.530 20.317-27.530 19.930L-27.530 19.872Q-27.659 19.977-27.827 19.977Q-28.018 19.977-28.155 19.844Q-28.291 19.711-28.291 19.512Q-28.291 19.321-28.155 19.188Q-28.018 19.055-27.827 19.055Q-27.526 19.055-27.401 19.325Q-27.276 19.594-27.276 19.930Q-27.276 20.379-27.457 20.793Q-27.639 21.207-27.979 21.504Q-28.002 21.528-28.041 21.528Q-28.088 21.528-28.137 21.483Q-28.186 21.438-28.186 21.383",[2533],[1260,3933,3934],{"transform":3916},[2255,3935],{"d":3936,"fill":2520,"stroke":2520,"className":3937,"style":3859},"M-22.804 18.961Q-22.804 19.200-22.716 19.389Q-22.628 19.579-22.457 19.690Q-22.285 19.801-22.050 19.801Q-21.542 19.801-21.087 19.608Q-20.632 19.415-20.347 19.040Q-20.328 19.008-20.277 19.008Q-20.226 19.008-20.179 19.059Q-20.132 19.110-20.132 19.161Q-20.132 19.200-20.156 19.223Q-20.472 19.637-20.988 19.846Q-21.503 20.055-22.070 20.055Q-22.371 20.055-22.626 19.954Q-22.882 19.852-23.074 19.665Q-23.265 19.477-23.371 19.219Q-23.476 18.961-23.476 18.672Q-23.476 18.250-23.287 17.848Q-23.097 17.446-22.771 17.129Q-22.445 16.813-22.042 16.631Q-21.640 16.450-21.218 16.450Q-20.835 16.450-20.523 16.616Q-20.210 16.782-20.210 17.137Q-20.210 17.352-20.341 17.512Q-20.472 17.672-20.683 17.672Q-20.816 17.672-20.910 17.586Q-21.003 17.500-21.003 17.368Q-21.003 17.196-20.882 17.063Q-20.761 16.930-20.597 16.907Q-20.800 16.704-21.238 16.704Q-21.605 16.704-21.902 16.922Q-22.199 17.141-22.400 17.493Q-22.601 17.844-22.703 18.243Q-22.804 18.641-22.804 18.961",[2533],[1260,3939,3940,3943],{"fill":3868},[2255,3941],{"d":3942},"M-60.215-7.053h14.227V-21.28h-14.227Z",[1260,3944,3946],{"transform":3945},"translate(-1.982 -31.018)",[2255,3947],{"d":3948,"fill":2520,"stroke":2520,"className":3949,"style":2534},"M-51.479 20.078Q-52.055 20.078-52.376 19.647Q-52.697 19.217-52.697 18.637Q-52.697 18.232-52.613 18.004L-51.734 14.506Q-51.699 14.356-51.699 14.282Q-51.699 14.145-52.266 14.145Q-52.363 14.145-52.363 14.027Q-52.363 13.970-52.332 13.899Q-52.301 13.829-52.235 13.829L-51.014 13.732Q-50.961 13.732-50.928 13.761Q-50.895 13.790-50.895 13.838L-50.895 13.873L-51.554 16.483Q-51.031 16-50.508 16Q-50.122 16-49.831 16.204Q-49.541 16.409-49.394 16.743Q-49.247 17.077-49.247 17.468Q-49.247 18.052-49.550 18.661Q-49.853 19.269-50.374 19.674Q-50.895 20.078-51.479 20.078M-51.462 19.814Q-51.093 19.814-50.789 19.491Q-50.486 19.168-50.328 18.773Q-50.183 18.417-50.062 17.909Q-49.941 17.402-49.941 17.081Q-49.941 16.756-50.086 16.508Q-50.231 16.259-50.526 16.259Q-51.128 16.259-51.699 17.059L-51.941 18.052Q-52.086 18.676-52.086 18.940Q-52.086 19.283-51.934 19.549Q-51.783 19.814-51.462 19.814",[2533],[1260,3951,3952,3958,3963,3969],{"stroke":2524,"fontSize":3851},[1260,3953,3955],{"transform":3954},"translate(19.382 -32.143)",[2255,3956],{"d":3886,"fill":2520,"stroke":2520,"className":3957,"style":3859},[2533],[1260,3959,3960],{"transform":3954},[2255,3961],{"d":3924,"fill":2520,"stroke":2520,"className":3962,"style":3859},[2533],[1260,3964,3965],{"transform":3954},[2255,3966],{"d":3967,"fill":2520,"stroke":2520,"className":3968,"style":3859},"M-31.139 20.055Q-31.495 20.055-31.764 19.875Q-32.034 19.696-32.174 19.401Q-32.315 19.106-32.315 18.747Q-32.315 18.360-32.153 17.946Q-31.991 17.532-31.707 17.194Q-31.424 16.856-31.055 16.653Q-30.686 16.450-30.284 16.450Q-29.791 16.450-29.514 16.899Q-29.483 16.766-29.379 16.684Q-29.276 16.602-29.147 16.602Q-29.034 16.602-28.954 16.672Q-28.873 16.743-28.873 16.856Q-28.873 16.883-28.889 16.946L-29.444 19.145Q-29.483 19.391-29.483 19.442Q-29.483 19.801-29.237 19.801Q-29.092 19.801-28.991 19.694Q-28.889 19.586-28.825 19.432Q-28.760 19.278-28.711 19.088Q-28.663 18.899-28.643 18.801Q-28.616 18.731-28.553 18.731L-28.452 18.731Q-28.413 18.731-28.387 18.764Q-28.362 18.797-28.362 18.825Q-28.362 18.840-28.370 18.856Q-28.483 19.348-28.682 19.702Q-28.881 20.055-29.252 20.055Q-29.534 20.055-29.760 19.913Q-29.987 19.770-30.069 19.512Q-30.291 19.754-30.565 19.905Q-30.838 20.055-31.139 20.055M-31.123 19.801Q-30.913 19.801-30.704 19.688Q-30.495 19.575-30.325 19.401Q-30.155 19.227-30.026 19.032Q-30.038 19.047-30.047 19.061Q-30.057 19.075-30.069 19.090L-29.635 17.368Q-29.674 17.188-29.760 17.038Q-29.846 16.887-29.983 16.795Q-30.120 16.704-30.299 16.704Q-30.635 16.704-30.907 16.985Q-31.178 17.266-31.338 17.641Q-31.463 17.961-31.561 18.381Q-31.659 18.801-31.659 19.082Q-31.659 19.372-31.526 19.586Q-31.393 19.801-31.123 19.801M-27.307 21.383Q-27.307 21.360-27.276 21.313Q-26.983 21.051-26.817 20.684Q-26.651 20.317-26.651 19.930L-26.651 19.872Q-26.780 19.977-26.948 19.977Q-27.139 19.977-27.276 19.844Q-27.413 19.711-27.413 19.512Q-27.413 19.321-27.276 19.188Q-27.139 19.055-26.948 19.055Q-26.647 19.055-26.522 19.325Q-26.397 19.594-26.397 19.930Q-26.397 20.379-26.579 20.793Q-26.760 21.207-27.100 21.504Q-27.123 21.528-27.163 21.528Q-27.209 21.528-27.258 21.483Q-27.307 21.438-27.307 21.383",[2533],[1260,3970,3971],{"transform":3954},[2255,3972],{"d":3973,"fill":2520,"stroke":2520,"className":3974,"style":3859},"M-21.429 20.055Q-21.785 20.055-22.054 19.875Q-22.324 19.696-22.464 19.401Q-22.605 19.106-22.605 18.747Q-22.605 18.360-22.443 17.946Q-22.281 17.532-21.997 17.194Q-21.714 16.856-21.345 16.653Q-20.976 16.450-20.574 16.450Q-20.081 16.450-19.804 16.899L-19.367 15.129Q-19.324 14.965-19.324 14.915Q-19.324 14.809-19.820 14.809Q-19.917 14.778-19.917 14.680L-19.894 14.579Q-19.863 14.524-19.804 14.512L-18.703 14.426Q-18.660 14.426-18.620 14.457Q-18.581 14.489-18.581 14.543L-19.734 19.145Q-19.773 19.391-19.773 19.442Q-19.773 19.801-19.527 19.801Q-19.382 19.801-19.281 19.694Q-19.179 19.586-19.115 19.432Q-19.050 19.278-19.001 19.088Q-18.953 18.899-18.933 18.801Q-18.906 18.731-18.843 18.731L-18.742 18.731Q-18.703 18.731-18.677 18.764Q-18.652 18.797-18.652 18.825Q-18.652 18.840-18.660 18.856Q-18.773 19.348-18.972 19.702Q-19.171 20.055-19.542 20.055Q-19.824 20.055-20.050 19.913Q-20.277 19.770-20.359 19.512Q-20.581 19.754-20.855 19.905Q-21.128 20.055-21.429 20.055M-21.413 19.801Q-21.203 19.801-20.994 19.688Q-20.785 19.575-20.615 19.401Q-20.445 19.227-20.316 19.032Q-20.328 19.047-20.337 19.061Q-20.347 19.075-20.359 19.090L-19.925 17.368Q-19.964 17.188-20.050 17.038Q-20.136 16.887-20.273 16.795Q-20.410 16.704-20.589 16.704Q-20.925 16.704-21.197 16.985Q-21.468 17.266-21.628 17.641Q-21.753 17.961-21.851 18.381Q-21.949 18.801-21.949 19.082Q-21.949 19.372-21.816 19.586Q-21.683 19.801-21.413 19.801",[2533],[1260,3976,3977,3980],{"fill":3868},[2255,3978],{"d":3979},"M-60.215 10.018h14.227V-4.208h-14.227Z",[1260,3981,3983],{"transform":3982},"translate(-2.002 -15.134)",[2255,3984],{"d":3985,"fill":2520,"stroke":2520,"className":3986,"style":2534},"M-52.011 18.870Q-52.011 19.265-51.798 19.540Q-51.585 19.814-51.203 19.814Q-50.658 19.814-50.152 19.579Q-49.647 19.344-49.330 18.922Q-49.309 18.887-49.247 18.887Q-49.190 18.887-49.144 18.938Q-49.098 18.988-49.098 19.041Q-49.098 19.076-49.124 19.102Q-49.471 19.577-50.034 19.828Q-50.596 20.078-51.220 20.078Q-51.651 20.078-52 19.876Q-52.350 19.674-52.541 19.318Q-52.732 18.962-52.732 18.536Q-52.732 18.074-52.530 17.617Q-52.328 17.160-51.972 16.791Q-51.616 16.422-51.172 16.211Q-50.728 16-50.258 16Q-49.990 16-49.741 16.081Q-49.493 16.163-49.326 16.341Q-49.159 16.519-49.159 16.782Q-49.159 17.019-49.309 17.197Q-49.458 17.375-49.691 17.375Q-49.831 17.375-49.937 17.281Q-50.042 17.186-50.042 17.041Q-50.042 16.839-49.895 16.685Q-49.748 16.532-49.546 16.532Q-49.651 16.391-49.856 16.325Q-50.060 16.259-50.267 16.259Q-50.803 16.259-51.200 16.688Q-51.598 17.116-51.805 17.736Q-52.011 18.355-52.011 18.870",[2533],[1260,3988,3989,3995,4000],{"stroke":2524,"fontSize":3851},[1260,3990,3992],{"transform":3991},"translate(19.382 -15.072)",[2255,3993],{"d":3886,"fill":2520,"stroke":2520,"className":3994,"style":3859},[2533],[1260,3996,3997],{"transform":3991},[2255,3998],{"d":3892,"fill":2520,"stroke":2520,"className":3999,"style":3859},[2533],[1260,4001,4002],{"transform":3991},[2255,4003],{"d":4004,"fill":2520,"stroke":2520,"className":4005,"style":3859},"M-30.555 20.055Q-30.911 20.055-31.180 19.875Q-31.450 19.696-31.590 19.401Q-31.731 19.106-31.731 18.747Q-31.731 18.360-31.569 17.946Q-31.407 17.532-31.123 17.194Q-30.840 16.856-30.471 16.653Q-30.102 16.450-29.700 16.450Q-29.207 16.450-28.930 16.899L-28.493 15.129Q-28.450 14.965-28.450 14.915Q-28.450 14.809-28.946 14.809Q-29.043 14.778-29.043 14.680L-29.020 14.579Q-28.989 14.524-28.930 14.512L-27.829 14.426Q-27.786 14.426-27.746 14.457Q-27.707 14.489-27.707 14.543L-28.860 19.145Q-28.899 19.391-28.899 19.442Q-28.899 19.801-28.653 19.801Q-28.508 19.801-28.407 19.694Q-28.305 19.586-28.241 19.432Q-28.176 19.278-28.127 19.088Q-28.079 18.899-28.059 18.801Q-28.032 18.731-27.969 18.731L-27.868 18.731Q-27.829 18.731-27.803 18.764Q-27.778 18.797-27.778 18.825Q-27.778 18.840-27.786 18.856Q-27.899 19.348-28.098 19.702Q-28.297 20.055-28.668 20.055Q-28.950 20.055-29.176 19.913Q-29.403 19.770-29.485 19.512Q-29.707 19.754-29.981 19.905Q-30.254 20.055-30.555 20.055M-30.539 19.801Q-30.329 19.801-30.120 19.688Q-29.911 19.575-29.741 19.401Q-29.571 19.227-29.442 19.032Q-29.454 19.047-29.463 19.061Q-29.473 19.075-29.485 19.090L-29.051 17.368Q-29.090 17.188-29.176 17.038Q-29.262 16.887-29.399 16.795Q-29.536 16.704-29.715 16.704Q-30.051 16.704-30.323 16.985Q-30.594 17.266-30.754 17.641Q-30.879 17.961-30.977 18.381Q-31.075 18.801-31.075 19.082Q-31.075 19.372-30.942 19.586Q-30.809 19.801-30.539 19.801",[2533],[1260,4007,4008,4011],{"fill":3868},[2255,4009],{"d":4010},"M-60.215 27.09h14.227V12.864h-14.227Z",[1260,4012,4014],{"transform":4013},"translate(-2.396 3.125)",[2255,4015],{"d":4016,"fill":2520,"stroke":2520,"className":4017,"style":2534},"M-51.479 20.078Q-51.875 20.078-52.161 19.874Q-52.446 19.669-52.593 19.335Q-52.741 19.001-52.741 18.610Q-52.741 18.175-52.567 17.714Q-52.393 17.252-52.081 16.861Q-51.769 16.470-51.359 16.235Q-50.948 16-50.508 16Q-50.240 16-50.023 16.138Q-49.805 16.277-49.673 16.523L-49.168 14.506Q-49.133 14.356-49.133 14.282Q-49.133 14.145-49.700 14.145Q-49.796 14.145-49.796 14.027Q-49.796 13.970-49.766 13.899Q-49.735 13.829-49.673 13.829L-48.447 13.732Q-48.394 13.732-48.364 13.761Q-48.333 13.790-48.333 13.838L-48.333 13.873L-49.616 19.023Q-49.616 19.081-49.645 19.212Q-49.673 19.344-49.673 19.419Q-49.673 19.814-49.410 19.814Q-49.124 19.814-48.990 19.491Q-48.856 19.168-48.737 18.663Q-48.728 18.632-48.704 18.608Q-48.680 18.584-48.645 18.584L-48.539 18.584Q-48.491 18.584-48.469 18.617Q-48.447 18.650-48.447 18.698Q-48.561 19.129-48.652 19.382Q-48.742 19.634-48.935 19.856Q-49.128 20.078-49.427 20.078Q-49.735 20.078-49.983 19.907Q-50.231 19.735-50.302 19.445Q-50.557 19.731-50.853 19.904Q-51.150 20.078-51.479 20.078M-51.462 19.814Q-51.132 19.814-50.822 19.573Q-50.513 19.331-50.302 19.015Q-50.293 19.006-50.293 18.979L-49.796 17.024Q-49.853 16.707-50.045 16.483Q-50.236 16.259-50.526 16.259Q-50.895 16.259-51.194 16.578Q-51.493 16.896-51.660 17.305Q-51.796 17.652-51.921 18.162Q-52.046 18.672-52.046 18.997Q-52.046 19.322-51.908 19.568Q-51.769 19.814-51.462 19.814",[2533],[1260,4019,4020,4026,4032],{"stroke":2524,"fontSize":3851},[1260,4021,4023],{"transform":4022},"translate(19.382 2)",[2255,4024],{"d":3886,"fill":2520,"stroke":2520,"className":4025,"style":3859},[2533],[1260,4027,4028],{"transform":4022},[2255,4029],{"d":4030,"fill":2520,"stroke":2520,"className":4031,"style":3859},"M-40.264 20.055Q-40.604 20.055-40.864 19.877Q-41.123 19.700-41.258 19.405Q-41.393 19.110-41.393 18.762Q-41.393 18.500-41.327 18.243L-40.577 15.215Q-40.565 15.168-40.538 15.067Q-40.510 14.965-40.510 14.915Q-40.510 14.809-41.006 14.809Q-41.104 14.778-41.104 14.680L-41.081 14.579Q-41.073 14.532-40.991 14.512L-39.889 14.426Q-39.846 14.426-39.807 14.457Q-39.768 14.489-39.768 14.543L-40.342 16.864Q-39.885 16.450-39.409 16.450Q-39.045 16.450-38.780 16.629Q-38.514 16.809-38.373 17.110Q-38.233 17.411-38.233 17.762Q-38.233 18.286-38.514 18.825Q-38.795 19.364-39.262 19.709Q-39.729 20.055-40.264 20.055M-40.248 19.801Q-39.913 19.801-39.633 19.510Q-39.354 19.219-39.217 18.864Q-39.092 18.571-38.991 18.137Q-38.889 17.704-38.889 17.426Q-38.889 17.141-39.022 16.922Q-39.155 16.704-39.424 16.704Q-39.635 16.704-39.831 16.805Q-40.026 16.907-40.186 17.063Q-40.346 17.219-40.479 17.411L-40.706 18.282Q-40.756 18.516-40.786 18.698Q-40.815 18.879-40.815 19.032Q-40.815 19.332-40.674 19.567Q-40.534 19.801-40.248 19.801M-37.311 21.383Q-37.311 21.360-37.280 21.313Q-36.987 21.051-36.821 20.684Q-36.655 20.317-36.655 19.930L-36.655 19.872Q-36.784 19.977-36.952 19.977Q-37.143 19.977-37.280 19.844Q-37.416 19.711-37.416 19.512Q-37.416 19.321-37.280 19.188Q-37.143 19.055-36.952 19.055Q-36.651 19.055-36.526 19.325Q-36.401 19.594-36.401 19.930Q-36.401 20.379-36.582 20.793Q-36.764 21.207-37.104 21.504Q-37.127 21.528-37.166 21.528Q-37.213 21.528-37.262 21.483Q-37.311 21.438-37.311 21.383",[2533],[1260,4033,4034],{"transform":4022},[2255,4035],{"d":4036,"fill":2520,"stroke":2520,"className":4037,"style":3859},"M-31.929 18.961Q-31.929 19.200-31.841 19.389Q-31.753 19.579-31.582 19.690Q-31.410 19.801-31.175 19.801Q-30.667 19.801-30.212 19.608Q-29.757 19.415-29.472 19.040Q-29.453 19.008-29.402 19.008Q-29.351 19.008-29.304 19.059Q-29.257 19.110-29.257 19.161Q-29.257 19.200-29.281 19.223Q-29.597 19.637-30.113 19.846Q-30.628 20.055-31.195 20.055Q-31.496 20.055-31.751 19.954Q-32.007 19.852-32.199 19.665Q-32.390 19.477-32.496 19.219Q-32.601 18.961-32.601 18.672Q-32.601 18.250-32.412 17.848Q-32.222 17.446-31.896 17.129Q-31.570 16.813-31.167 16.631Q-30.765 16.450-30.343 16.450Q-29.960 16.450-29.648 16.616Q-29.335 16.782-29.335 17.137Q-29.335 17.352-29.466 17.512Q-29.597 17.672-29.808 17.672Q-29.941 17.672-30.035 17.586Q-30.128 17.500-30.128 17.368Q-30.128 17.196-30.007 17.063Q-29.886 16.930-29.722 16.907Q-29.925 16.704-30.363 16.704Q-30.730 16.704-31.027 16.922Q-31.324 17.141-31.525 17.493Q-31.726 17.844-31.828 18.243Q-31.929 18.641-31.929 18.961",[2533],[1260,4039,4040,4046],{"stroke":2524,"fontFamily":3850,"fontSize":3851},[1260,4041,4043],{"transform":4042},"translate(153.765 -83.358)",[2255,4044],{"d":3857,"fill":2520,"stroke":2520,"className":4045,"style":3859},[2533],[1260,4047,4048],{"transform":4042},[2255,4049],{"d":4050,"fill":2520,"stroke":2520,"className":4051,"style":3859},"M-5.555 19.977L-7.617 19.977L-7.617 19.528L-7.090 19.528L-7.090 17.106Q-7.090 16.954-7.237 16.916Q-7.383 16.879-7.617 16.879L-7.617 16.434L-6.188 16.368L-6.188 17.161Q-6.039 16.915-5.805 16.735Q-5.571 16.555-5.293 16.461Q-5.016 16.368-4.723 16.368Q-4.227 16.368-3.881 16.524Q-3.535 16.680-3.418 17.090Q-3.188 16.747-2.811 16.557Q-2.434 16.368-2.004 16.368Q-1.563 16.368-1.266 16.475Q-0.969 16.582-0.807 16.842Q-0.645 17.102-0.645 17.536L-0.645 19.528L-0.114 19.528L-0.114 19.977L-2.180 19.977L-2.180 19.528L-1.653 19.528L-1.653 17.563Q-1.653 17.188-1.727 16.963Q-1.801 16.739-2.098 16.739Q-2.610 16.739-2.987 17.075Q-3.364 17.411-3.364 17.915L-3.364 19.528L-2.836 19.528L-2.836 19.977L-4.899 19.977L-4.899 19.528L-4.371 19.528L-4.371 17.563Q-4.371 17.188-4.449 16.963Q-4.528 16.739-4.821 16.739Q-5.332 16.739-5.707 17.073Q-6.082 17.407-6.082 17.915L-6.082 19.528L-5.555 19.528L-5.555 19.977M0.383 19.047Q0.383 18.676 0.678 18.424Q0.972 18.172 1.424 18.041Q1.875 17.911 2.310 17.864Q2.746 17.817 3.133 17.817L3.133 17.563Q3.133 17.165 2.902 16.934Q2.672 16.704 2.277 16.704Q1.851 16.704 1.644 16.754Q1.804 16.899 1.804 17.153Q1.804 17.387 1.646 17.545Q1.488 17.704 1.254 17.704Q1.011 17.704 0.853 17.545Q0.695 17.387 0.695 17.153Q0.695 16.641 1.160 16.489Q1.625 16.336 2.277 16.336Q2.699 16.336 3.129 16.452Q3.558 16.567 3.849 16.838Q4.140 17.110 4.140 17.543L4.140 19.403Q4.172 19.528 4.711 19.528Q4.769 19.528 4.816 19.575Q4.863 19.622 4.863 19.680L4.863 19.817Q4.863 19.883 4.816 19.930Q4.769 19.977 4.711 19.977L4.164 19.977Q3.285 19.977 3.285 19.473Q3.097 19.750 2.752 19.891Q2.406 20.032 2.039 20.032Q1.664 20.032 1.283 19.948Q0.902 19.864 0.642 19.641Q0.383 19.418 0.383 19.047M1.390 19.047Q1.390 19.235 1.502 19.375Q1.613 19.516 1.789 19.590Q1.965 19.665 2.148 19.665Q2.379 19.665 2.607 19.584Q2.836 19.504 2.984 19.344Q3.133 19.184 3.133 18.946L3.133 18.153Q2.797 18.153 2.394 18.237Q1.992 18.321 1.691 18.522Q1.390 18.723 1.390 19.047M5.726 19.055L5.726 16.872L5.054 16.872L5.054 16.504Q5.441 16.504 5.715 16.258Q5.988 16.012 6.121 15.637Q6.254 15.262 6.254 14.899L6.734 14.899L6.734 16.426L7.969 16.426L7.969 16.872L6.734 16.872L6.734 19.040Q6.734 19.625 7.191 19.625Q7.402 19.625 7.525 19.442Q7.648 19.258 7.648 19.040L7.648 18.586L8.129 18.586L8.129 19.055Q8.129 19.329 7.982 19.551Q7.836 19.774 7.595 19.903Q7.355 20.032 7.086 20.032Q6.511 20.032 6.119 19.809Q5.726 19.586 5.726 19.055M11.176 19.977L9.031 19.977L9.031 19.528L9.558 19.528L9.558 17.106Q9.558 16.954 9.412 16.916Q9.265 16.879 9.031 16.879L9.031 16.434L10.414 16.368L10.414 17.176Q10.570 16.821 10.849 16.594Q11.129 16.368 11.496 16.368Q11.859 16.368 12.154 16.555Q12.449 16.743 12.449 17.082Q12.449 17.227 12.377 17.354Q12.304 17.481 12.178 17.553Q12.051 17.625 11.902 17.625Q11.758 17.625 11.631 17.553Q11.504 17.481 11.431 17.354Q11.359 17.227 11.359 17.082Q11.359 16.868 11.472 16.739Q11.140 16.739 10.924 16.985Q10.707 17.231 10.613 17.590Q10.519 17.950 10.519 18.266L10.519 19.528L11.176 19.528L11.176 19.977M15.140 19.977L13.183 19.977L13.183 19.528L13.711 19.528L13.711 17.106Q13.711 16.954 13.574 16.916Q13.437 16.879 13.207 16.879L13.207 16.434L14.672 16.368L14.672 19.528L15.140 19.528L15.140 19.977M13.429 15.075Q13.429 14.797 13.623 14.608Q13.816 14.418 14.086 14.418Q14.265 14.418 14.416 14.508Q14.566 14.598 14.654 14.745Q14.742 14.891 14.742 15.075Q14.742 15.344 14.549 15.538Q14.355 15.731 14.086 15.731Q13.812 15.731 13.621 15.540Q13.429 15.348 13.429 15.075M17.293 19.977L15.668 19.977L15.668 19.528Q16.316 19.528 16.398 19.481L17.566 18.258L16.301 16.872L15.711 16.872L15.711 16.426L17.605 16.426L17.605 16.872L17.398 16.872L18.117 17.672L18.836 16.922Q18.836 16.899 18.746 16.885Q18.656 16.872 18.605 16.872L18.605 16.426L20.230 16.426L20.230 16.872Q19.582 16.872 19.500 16.922L18.445 18.024L19.812 19.528L20.406 19.528L20.406 19.977L18.500 19.977L18.500 19.528L18.719 19.528L17.886 18.618L17.062 19.481Q17.062 19.500 17.154 19.514Q17.246 19.528 17.293 19.528",[2533],[1260,4053,4055],{"transform":4054},"translate(145.989 -69.41)",[2255,4056],{"d":4057,"fill":2520,"stroke":2520,"className":4058,"style":3859},"M-52.308 19.497Q-52.093 19.801-51.429 19.801Q-50.999 19.801-50.642 19.600Q-50.285 19.399-50.285 19Q-50.285 18.797-50.445 18.674Q-50.605 18.551-50.812 18.512L-51.277 18.426Q-51.593 18.356-51.808 18.149Q-52.023 17.942-52.023 17.633Q-52.023 17.270-51.818 16.998Q-51.613 16.727-51.283 16.588Q-50.953 16.450-50.597 16.450Q-50.210 16.450-49.900 16.618Q-49.589 16.786-49.589 17.137Q-49.589 17.329-49.695 17.469Q-49.800 17.610-49.988 17.610Q-50.097 17.610-50.179 17.538Q-50.261 17.465-50.261 17.352Q-50.261 17.207-50.163 17.098Q-50.066 16.989-49.925 16.969Q-50.015 16.825-50.206 16.764Q-50.398 16.704-50.613 16.704Q-50.945 16.704-51.218 16.875Q-51.492 17.047-51.492 17.360Q-51.492 17.516-51.380 17.610Q-51.269 17.704-51.093 17.747L-50.636 17.832Q-50.261 17.903-50.009 18.135Q-49.757 18.368-49.757 18.731Q-49.757 19.004-49.902 19.272Q-50.046 19.540-50.285 19.719Q-50.761 20.055-51.445 20.055Q-51.722 20.055-52.003 19.983Q-52.285 19.911-52.476 19.737Q-52.667 19.563-52.667 19.282Q-52.667 19.059-52.538 18.895Q-52.410 18.731-52.191 18.731Q-52.046 18.731-51.958 18.813Q-51.871 18.895-51.871 19.032Q-51.871 19.211-52.001 19.354Q-52.132 19.497-52.308 19.497",[2533],[1260,4060,4062],{"transform":4061},"translate(162.769 -69.41)",[2255,4063],{"d":4064,"fill":2520,"stroke":2520,"className":4065,"style":3859},"M-51.597 20.055Q-51.953 20.055-52.222 19.875Q-52.492 19.696-52.632 19.401Q-52.773 19.106-52.773 18.747Q-52.773 18.360-52.611 17.946Q-52.449 17.532-52.165 17.194Q-51.882 16.856-51.513 16.653Q-51.144 16.450-50.742 16.450Q-50.249 16.450-49.972 16.899Q-49.941 16.766-49.837 16.684Q-49.734 16.602-49.605 16.602Q-49.492 16.602-49.412 16.672Q-49.331 16.743-49.331 16.856Q-49.331 16.883-49.347 16.946L-49.902 19.145Q-49.941 19.391-49.941 19.442Q-49.941 19.801-49.695 19.801Q-49.550 19.801-49.449 19.694Q-49.347 19.586-49.283 19.432Q-49.218 19.278-49.169 19.088Q-49.121 18.899-49.101 18.801Q-49.074 18.731-49.011 18.731L-48.910 18.731Q-48.871 18.731-48.845 18.764Q-48.820 18.797-48.820 18.825Q-48.820 18.840-48.828 18.856Q-48.941 19.348-49.140 19.702Q-49.339 20.055-49.710 20.055Q-49.992 20.055-50.218 19.913Q-50.445 19.770-50.527 19.512Q-50.749 19.754-51.023 19.905Q-51.296 20.055-51.597 20.055M-51.581 19.801Q-51.371 19.801-51.162 19.688Q-50.953 19.575-50.783 19.401Q-50.613 19.227-50.484 19.032Q-50.496 19.047-50.505 19.061Q-50.515 19.075-50.527 19.090L-50.093 17.368Q-50.132 17.188-50.218 17.038Q-50.304 16.887-50.441 16.795Q-50.578 16.704-50.757 16.704Q-51.093 16.704-51.365 16.985Q-51.636 17.266-51.796 17.641Q-51.921 17.961-52.019 18.381Q-52.117 18.801-52.117 19.082Q-52.117 19.372-51.984 19.586Q-51.851 19.801-51.581 19.801",[2533],[1260,4067,4069],{"transform":4068},"translate(180.28 -68.354)",[2255,4070],{"d":4071,"fill":2520,"stroke":2520,"className":4072,"style":3859},"M-51.597 20.055Q-51.937 20.055-52.197 19.877Q-52.456 19.700-52.591 19.405Q-52.726 19.110-52.726 18.762Q-52.726 18.500-52.660 18.243L-51.910 15.215Q-51.898 15.168-51.871 15.067Q-51.843 14.965-51.843 14.915Q-51.843 14.809-52.339 14.809Q-52.437 14.778-52.437 14.680L-52.413 14.579Q-52.406 14.532-52.324 14.512L-51.222 14.426Q-51.179 14.426-51.140 14.457Q-51.101 14.489-51.101 14.543L-51.675 16.864Q-51.218 16.450-50.742 16.450Q-50.378 16.450-50.113 16.629Q-49.847 16.809-49.706 17.110Q-49.566 17.411-49.566 17.762Q-49.566 18.286-49.847 18.825Q-50.128 19.364-50.595 19.709Q-51.062 20.055-51.597 20.055M-51.581 19.801Q-51.246 19.801-50.966 19.510Q-50.687 19.219-50.550 18.864Q-50.425 18.571-50.324 18.137Q-50.222 17.704-50.222 17.426Q-50.222 17.141-50.355 16.922Q-50.488 16.704-50.757 16.704Q-50.968 16.704-51.163 16.805Q-51.359 16.907-51.519 17.063Q-51.679 17.219-51.812 17.411L-52.038 18.282Q-52.089 18.516-52.119 18.698Q-52.148 18.879-52.148 19.032Q-52.148 19.332-52.007 19.567Q-51.867 19.801-51.581 19.801",[2533],[1260,4074,4076],{"transform":4075},"translate(197.329 -69.41)",[2255,4077],{"d":4078,"fill":2520,"stroke":2520,"className":4079,"style":3859},"M-52.093 18.961Q-52.093 19.200-52.005 19.389Q-51.917 19.579-51.746 19.690Q-51.574 19.801-51.339 19.801Q-50.831 19.801-50.376 19.608Q-49.921 19.415-49.636 19.040Q-49.617 19.008-49.566 19.008Q-49.515 19.008-49.468 19.059Q-49.421 19.110-49.421 19.161Q-49.421 19.200-49.445 19.223Q-49.761 19.637-50.277 19.846Q-50.792 20.055-51.359 20.055Q-51.660 20.055-51.915 19.954Q-52.171 19.852-52.363 19.665Q-52.554 19.477-52.660 19.219Q-52.765 18.961-52.765 18.672Q-52.765 18.250-52.576 17.848Q-52.386 17.446-52.060 17.129Q-51.734 16.813-51.331 16.631Q-50.929 16.450-50.507 16.450Q-50.124 16.450-49.812 16.616Q-49.499 16.782-49.499 17.137Q-49.499 17.352-49.630 17.512Q-49.761 17.672-49.972 17.672Q-50.105 17.672-50.199 17.586Q-50.292 17.500-50.292 17.368Q-50.292 17.196-50.171 17.063Q-50.050 16.930-49.886 16.907Q-50.089 16.704-50.527 16.704Q-50.894 16.704-51.191 16.922Q-51.488 17.141-51.689 17.493Q-51.890 17.844-51.992 18.243Q-52.093 18.641-52.093 18.961",[2533],[1260,4081,4083],{"transform":4082},"translate(214.054 -68.354)",[2255,4084],{"d":4085,"fill":2520,"stroke":2520,"className":4086,"style":3859},"M-51.597 20.055Q-51.953 20.055-52.222 19.875Q-52.492 19.696-52.632 19.401Q-52.773 19.106-52.773 18.747Q-52.773 18.360-52.611 17.946Q-52.449 17.532-52.165 17.194Q-51.882 16.856-51.513 16.653Q-51.144 16.450-50.742 16.450Q-50.249 16.450-49.972 16.899L-49.535 15.129Q-49.492 14.965-49.492 14.915Q-49.492 14.809-49.988 14.809Q-50.085 14.778-50.085 14.680L-50.062 14.579Q-50.031 14.524-49.972 14.512L-48.871 14.426Q-48.828 14.426-48.788 14.457Q-48.749 14.489-48.749 14.543L-49.902 19.145Q-49.941 19.391-49.941 19.442Q-49.941 19.801-49.695 19.801Q-49.550 19.801-49.449 19.694Q-49.347 19.586-49.283 19.432Q-49.218 19.278-49.169 19.088Q-49.121 18.899-49.101 18.801Q-49.074 18.731-49.011 18.731L-48.910 18.731Q-48.871 18.731-48.845 18.764Q-48.820 18.797-48.820 18.825Q-48.820 18.840-48.828 18.856Q-48.941 19.348-49.140 19.702Q-49.339 20.055-49.710 20.055Q-49.992 20.055-50.218 19.913Q-50.445 19.770-50.527 19.512Q-50.749 19.754-51.023 19.905Q-51.296 20.055-51.597 20.055M-51.581 19.801Q-51.371 19.801-51.162 19.688Q-50.953 19.575-50.783 19.401Q-50.613 19.227-50.484 19.032Q-50.496 19.047-50.505 19.061Q-50.515 19.075-50.527 19.090L-50.093 17.368Q-50.132 17.188-50.218 17.038Q-50.304 16.887-50.441 16.795Q-50.578 16.704-50.757 16.704Q-51.093 16.704-51.365 16.985Q-51.636 17.266-51.796 17.641Q-51.921 17.961-52.019 18.381Q-52.117 18.801-52.117 19.082Q-52.117 19.372-51.984 19.586Q-51.851 19.801-51.581 19.801",[2533],[1260,4088,4090],{"transform":4089},"translate(128.917 -55.183)",[2255,4091],{"d":4057,"fill":2520,"stroke":2520,"className":4092,"style":3859},[2533],[1260,4094,4096],{"transform":4095},"translate(128.625 -38.111)",[2255,4097],{"d":4064,"fill":2520,"stroke":2520,"className":4098,"style":3859},[2533],[1260,4100,4102],{"transform":4101},"translate(129.064 -19.985)",[2255,4103],{"d":4071,"fill":2520,"stroke":2520,"className":4104,"style":3859},[2533],[1260,4106,4108],{"transform":4107},"translate(129.042 -3.968)",[2255,4109],{"d":4078,"fill":2520,"stroke":2520,"className":4110,"style":3859},[2533],[1260,4112,4114],{"transform":4113},"translate(128.696 14.159)",[2255,4115],{"d":4085,"fill":2520,"stroke":2520,"className":4116,"style":3859},[2533],[2255,4118],{"fill":2524,"d":4119},"M87.74-29.816h14.226v-14.226H87.74Z",[1260,4121,4123],{"transform":4122},"translate(145.642 -54.005)",[2255,4124],{"d":4125,"fill":2520,"stroke":2520,"className":4126,"style":2534},"M-50.789 20.175Q-51.914 20.175-52.328 19.278Q-52.741 18.382-52.741 17.107Q-52.741 16.334-52.591 15.635Q-52.442 14.936-52.007 14.460Q-51.572 13.983-50.789 13.983Q-50.012 13.983-49.577 14.462Q-49.142 14.941-48.992 15.637Q-48.843 16.334-48.843 17.107Q-48.843 18.386-49.256 19.280Q-49.669 20.175-50.789 20.175M-50.789 19.915Q-50.271 19.915-50.020 19.404Q-49.770 18.892-49.713 18.281Q-49.656 17.670-49.656 16.962Q-49.656 16.277-49.713 15.717Q-49.770 15.156-50.023 14.699Q-50.275 14.242-50.789 14.242Q-51.194 14.242-51.431 14.519Q-51.668 14.796-51.776 15.237Q-51.884 15.679-51.908 16.072Q-51.932 16.466-51.932 16.962Q-51.932 17.468-51.908 17.896Q-51.884 18.325-51.776 18.808Q-51.668 19.291-51.429 19.603Q-51.189 19.915-50.789 19.915",[2533],[1260,4128,4129,4132],{"fill":3868},[2255,4130],{"d":4131},"M104.812-29.816h14.226v-14.226h-14.226Z",[1260,4133,4135],{"transform":4134},"translate(162.714 -54.005)",[2255,4136],{"d":4137,"fill":2520,"stroke":2520,"className":4138,"style":2534},"M-49.194 19.977L-52.226 19.977L-52.226 19.661Q-51.075 19.661-51.075 19.366L-51.075 14.642Q-51.563 14.875-52.284 14.875L-52.284 14.559Q-51.154 14.559-50.592 13.983L-50.447 13.983Q-50.412 13.983-50.379 14.016Q-50.346 14.049-50.346 14.084L-50.346 19.366Q-50.346 19.661-49.194 19.661",[2533],[1260,4140,4141,4144],{"fill":3868},[2255,4142],{"d":4143},"M121.883-29.816h14.227v-14.226h-14.227Z",[1260,4145,4147],{"transform":4146},"translate(179.785 -54.005)",[2255,4148],{"d":4137,"fill":2520,"stroke":2520,"className":4149,"style":2534},[2533],[2255,4151],{"fill":2524,"d":4152},"M138.955-29.816h14.227v-14.226h-14.227Z",[1260,4154,4156],{"transform":4155},"translate(196.857 -54.005)",[2255,4157],{"d":4125,"fill":2520,"stroke":2520,"className":4158,"style":2534},[2533],[2255,4160],{"fill":2524,"d":4161},"M156.027-29.816h14.226v-14.226h-14.226Z",[1260,4163,4165],{"transform":4164},"translate(213.93 -54.005)",[2255,4166],{"d":4125,"fill":2520,"stroke":2520,"className":4167,"style":2534},[2533],[1260,4169,4170,4173],{"fill":3868},[2255,4171],{"d":4172},"M87.74-12.744h14.226V-26.97H87.74Z",[1260,4174,4176],{"transform":4175},"translate(145.642 -36.934)",[2255,4177],{"d":4137,"fill":2520,"stroke":2520,"className":4178,"style":2534},[2533],[2255,4180],{"fill":2524,"d":4181},"M104.812-12.744h14.226V-26.97h-14.226Z",[1260,4183,4185],{"transform":4184},"translate(162.714 -36.934)",[2255,4186],{"d":4125,"fill":2520,"stroke":2520,"className":4187,"style":2534},[2533],[1260,4189,4190,4193],{"fill":3868},[2255,4191],{"d":4192},"M121.883-12.744h14.227V-26.97h-14.227Z",[1260,4194,4196],{"transform":4195},"translate(179.785 -36.934)",[2255,4197],{"d":4137,"fill":2520,"stroke":2520,"className":4198,"style":2534},[2533],[1260,4200,4201,4204],{"fill":3868},[2255,4202],{"d":4203},"M138.955-12.744h14.227V-26.97h-14.227Z",[1260,4205,4207],{"transform":4206},"translate(196.857 -36.934)",[2255,4208],{"d":4137,"fill":2520,"stroke":2520,"className":4209,"style":2534},[2533],[2255,4211],{"fill":2524,"d":4212},"M156.027-12.744h14.226V-26.97h-14.226Z",[1260,4214,4216],{"transform":4215},"translate(213.93 -36.934)",[2255,4217],{"d":4125,"fill":2520,"stroke":2520,"className":4218,"style":2534},[2533],[1260,4220,4221,4224],{"fill":3868},[2255,4222],{"d":4223},"M87.74 4.328h14.226V-9.9H87.74Z",[1260,4225,4227],{"transform":4226},"translate(145.642 -19.862)",[2255,4228],{"d":4137,"fill":2520,"stroke":2520,"className":4229,"style":2534},[2533],[1260,4231,4232,4235],{"fill":3868},[2255,4233],{"d":4234},"M104.812 4.328h14.226V-9.9h-14.226Z",[1260,4236,4238],{"transform":4237},"translate(162.714 -19.862)",[2255,4239],{"d":4137,"fill":2520,"stroke":2520,"className":4240,"style":2534},[2533],[2255,4242],{"fill":2524,"d":4243},"M121.883 4.328h14.227V-9.9h-14.227Z",[1260,4245,4247],{"transform":4246},"translate(179.785 -19.862)",[2255,4248],{"d":4125,"fill":2520,"stroke":2520,"className":4249,"style":2534},[2533],[2255,4251],{"fill":2524,"d":4252},"M138.955 4.328h14.227V-9.9h-14.227Z",[1260,4254,4256],{"transform":4255},"translate(196.857 -19.862)",[2255,4257],{"d":4125,"fill":2520,"stroke":2520,"className":4258,"style":2534},[2533],[1260,4260,4261,4264],{"fill":3868},[2255,4262],{"d":4263},"M156.027 4.328h14.226V-9.9h-14.226Z",[1260,4265,4267],{"transform":4266},"translate(213.93 -19.862)",[2255,4268],{"d":4137,"fill":2520,"stroke":2520,"className":4269,"style":2534},[2533],[2255,4271],{"fill":2524,"d":4272},"M87.74 21.4h14.226V7.172H87.74Z",[1260,4274,4276],{"transform":4275},"translate(145.642 -2.79)",[2255,4277],{"d":4125,"fill":2520,"stroke":2520,"className":4278,"style":2534},[2533],[1260,4280,4281,4284],{"fill":3868},[2255,4282],{"d":4283},"M104.812 21.4h14.226V7.172h-14.226Z",[1260,4285,4287],{"transform":4286},"translate(162.714 -2.79)",[2255,4288],{"d":4137,"fill":2520,"stroke":2520,"className":4289,"style":2534},[2533],[2255,4291],{"fill":2524,"d":4292},"M121.883 21.4h14.227V7.172h-14.227Z",[1260,4294,4296],{"transform":4295},"translate(179.785 -2.79)",[2255,4297],{"d":4125,"fill":2520,"stroke":2520,"className":4298,"style":2534},[2533],[2255,4300],{"fill":2524,"d":4301},"M138.955 21.4h14.227V7.172h-14.227Z",[1260,4303,4305],{"transform":4304},"translate(196.857 -2.79)",[2255,4306],{"d":4125,"fill":2520,"stroke":2520,"className":4307,"style":2534},[2533],[1260,4309,4310,4313],{"fill":3868},[2255,4311],{"d":4312},"M156.027 21.4h14.226V7.172h-14.226Z",[1260,4314,4316],{"transform":4315},"translate(213.93 -2.79)",[2255,4317],{"d":4137,"fill":2520,"stroke":2520,"className":4318,"style":2534},[2533],[2255,4320],{"fill":2524,"d":4321},"M87.74 38.47h14.226V24.246H87.74Z",[1260,4323,4325],{"transform":4324},"translate(145.642 14.28)",[2255,4326],{"d":4125,"fill":2520,"stroke":2520,"className":4327,"style":2534},[2533],[2255,4329],{"fill":2524,"d":4330},"M104.812 38.47h14.226V24.246h-14.226Z",[1260,4332,4334],{"transform":4333},"translate(162.714 14.28)",[2255,4335],{"d":4125,"fill":2520,"stroke":2520,"className":4336,"style":2534},[2533],[1260,4338,4339,4342],{"fill":3868},[2255,4340],{"d":4341},"M121.883 38.47h14.227V24.246h-14.227Z",[1260,4343,4345],{"transform":4344},"translate(179.785 14.28)",[2255,4346],{"d":4137,"fill":2520,"stroke":2520,"className":4347,"style":2534},[2533],[1260,4349,4350,4353],{"fill":3868},[2255,4351],{"d":4352},"M138.955 38.47h14.227V24.246h-14.227Z",[1260,4354,4356],{"transform":4355},"translate(196.857 14.28)",[2255,4357],{"d":4137,"fill":2520,"stroke":2520,"className":4358,"style":2534},[2533],[2255,4360],{"fill":2524,"d":4361},"M156.027 38.47h14.226V24.246h-14.226Z",[1260,4363,4365],{"transform":4364},"translate(213.93 14.28)",[2255,4366],{"d":4125,"fill":2520,"stroke":2520,"className":4367,"style":2534},[2533],[2579,4369,4371,4372,4388],{"className":4370},[2582],"The five-vertex graph stored two ways: adjacency lists (left) and the symmetric ",[429,4373,4375],{"className":4374},[432],[429,4376,4378],{"className":4377,"ariaHidden":437},[436],[429,4379,4381,4384],{"className":4380},[441],[429,4382],{"className":4383,"style":472},[445],[429,4385,4387],{"className":4386},[450],"0\u002F1"," adjacency matrix (right).",[381,4390,4391,4392,4395,4396,4403,4404,4446],{},"CLRS, Skiena, and Erickson all reach the same verdict: the ",[394,4393,4394],{},"adjacency list","\nis the default.",[403,4397,4398],{},[406,4399,989],{"href":4400,"ariaDescribedBy":4401,"dataFootnoteRef":376,"id":4402},"#user-content-fn-clrs-rep",[410],"user-content-fnref-clrs-rep"," Real graphs are usually sparse, and the linear-space, fast-to-iterate\nlist is what makes the ",[429,4405,4407],{"className":4406},[432],[429,4408,4410,4434],{"className":4409,"ariaHidden":437},[436],[429,4411,4413,4416,4419,4422,4425,4428,4431],{"className":4412},[441],[429,4414],{"className":4415,"style":472},[445],[429,4417,841],{"className":4418,"style":840},[450,451],[429,4420,477],{"className":4421},[476],[429,4423,482],{"className":4424,"style":481},[450,451],[429,4426],{"className":4427,"style":481},[456],[429,4429,855],{"className":4430},[854],[429,4432],{"className":4433,"style":481},[456],[429,4435,4437,4440,4443],{"className":4436},[441],[429,4438],{"className":4439,"style":472},[445],[429,4441,496],{"className":4442,"style":495},[450,451],[429,4444,501],{"className":4445},[500]," traversals below possible. Reach for\nthe matrix only when the graph is dense, when you need constant-time edge tests,\nor when an algorithm is naturally phrased in linear-algebra terms.",[414,4448,4450],{"id":4449},"one-traversal-to-rule-them-all","One traversal to rule them all",[381,4452,4453,4454,4457,4458,4461,4462,4465,4466,4469,4470,871],{},"Before specializing, it pays to see that BFS and DFS are the ",[385,4455,4456],{},"same algorithm",".\nThis is made explicit with a deliberately generic skeleton called\n",[394,4459,4460],{},"Whatever-First Search",": grow a ",[385,4463,4464],{},"frontier"," of discovered-but-unprocessed\nvertices, repeatedly pull one out, and push each of its undiscovered neighbors\nin. The only freedom is ",[385,4467,4468],{},"which"," vertex you pull next, and that is decided\nentirely by the ",[394,4471,4472],{},"data structure holding the frontier",[4474,4475,4479],"pre",{"className":4476,"code":4477,"language":4478,"meta":376,"style":376},"language-algorithm shiki shiki-themes Vesper Light - Orange Boost (Quick Open Adjusted) vesper","caption: $\\textsc{Whatever-First-Search}(G, s)$ — the generic skeleton\nnumber: 1\nforeach vertex $v \\in V$ do\n  $v.visited \\gets \\text{false}$\n  $v.\\pi \\gets \\text{nil}$\n$s.visited \\gets \\text{true}$\nput $s$ into the bag $B$\nwhile $B \\neq \\emptyset$ do\n  take a vertex $u$ out of $B$ \u002F\u002F bag decides who\n  foreach $v$ adjacent to $u$ do\n    if not $v.visited$ then\n      $v.visited \\gets \\text{true}$\n      $v.\\pi \\gets u$\n      put $v$ into the bag $B$\n","algorithm",[4480,4481,4482,4488,4493,4498,4503,4508,4513,4518,4523,4528,4533,4538,4543,4549],"code",{"__ignoreMap":376},[429,4483,4485],{"class":4484,"line":6},"line",[429,4486,4487],{},"caption: $\\textsc{Whatever-First-Search}(G, s)$ — the generic skeleton\n",[429,4489,4490],{"class":4484,"line":18},[429,4491,4492],{},"number: 1\n",[429,4494,4495],{"class":4484,"line":24},[429,4496,4497],{},"foreach vertex $v \\in V$ do\n",[429,4499,4500],{"class":4484,"line":73},[429,4501,4502],{},"  $v.visited \\gets \\text{false}$\n",[429,4504,4505],{"class":4484,"line":102},[429,4506,4507],{},"  $v.\\pi \\gets \\text{nil}$\n",[429,4509,4510],{"class":4484,"line":108},[429,4511,4512],{},"$s.visited \\gets \\text{true}$\n",[429,4514,4515],{"class":4484,"line":116},[429,4516,4517],{},"put $s$ into the bag $B$\n",[429,4519,4520],{"class":4484,"line":196},[429,4521,4522],{},"while $B \\neq \\emptyset$ do\n",[429,4524,4525],{"class":4484,"line":202},[429,4526,4527],{},"  take a vertex $u$ out of $B$ \u002F\u002F bag decides who\n",[429,4529,4530],{"class":4484,"line":283},[429,4531,4532],{},"  foreach $v$ adjacent to $u$ do\n",[429,4534,4535],{"class":4484,"line":333},[429,4536,4537],{},"    if not $v.visited$ then\n",[429,4539,4540],{"class":4484,"line":354},[429,4541,4542],{},"      $v.visited \\gets \\text{true}$\n",[429,4544,4546],{"class":4484,"line":4545},13,[429,4547,4548],{},"      $v.\\pi \\gets u$\n",[429,4550,4552],{"class":4484,"line":4551},14,[429,4553,4554],{},"      put $v$ into the bag $B$\n",[381,4556,1236,4557,4573,4574,4590,4591,4594,4595,4598],{},[429,4558,4560],{"className":4559},[432],[429,4561,4563],{"className":4562,"ariaHidden":437},[436],[429,4564,4566,4569],{"className":4565},[441],[429,4567],{"className":4568,"style":599},[445],[429,4570,4572],{"className":4571,"style":580},[450,451],"π"," pointers always carve out a tree (or forest) rooted at ",[429,4575,4577],{"className":4576},[432],[429,4578,4580],{"className":4579,"ariaHidden":437},[436],[429,4581,4583,4586],{"className":4582},[441],[429,4584],{"className":4585,"style":599},[445],[429,4587,4589],{"className":4588},[450,451],"s",", the\n",[394,4592,4593],{},"search tree",", because each vertex is discovered exactly once, from exactly\none parent. What changes is the ",[385,4596,4597],{},"shape"," of that tree, and it is fixed by one\nchoice:",[3329,4600,4601,4631],{},[3332,4602,4603],{},[3335,4604,4605,4625,4628],{},[3338,4606,4607,4608],{},"Bag ",[429,4609,4611],{"className":4610},[432],[429,4612,4614],{"className":4613,"ariaHidden":437},[436],[429,4615,4617,4620],{"className":4616},[441],[429,4618],{"className":4619,"style":446},[445],[429,4621,4624],{"className":4622,"style":4623},[450,451],"margin-right:0.0502em;","B",[3338,4626,4627],{},"Order of removal",[3338,4629,4630],{},"Specialization",[3348,4632,4633,4671,4707],{},[3335,4634,4635,4641,4644],{},[3353,4636,4637,4640],{},[394,4638,4639],{},"Queue"," (FIFO)",[3353,4642,4643],{},"oldest first",[3353,4645,4646,4670],{},[429,4647,4649],{"className":4648},[432],[429,4650,4652],{"className":4651,"ariaHidden":437},[436],[429,4653,4655,4658],{"className":4654},[441],[429,4656],{"className":4657,"style":446},[445],[429,4659,4663],{"className":4660},[4661,4662],"enclosing","textsc",[429,4664,4666],{"className":4665},[450,1316],[429,4667,4669],{"className":4668},[450],"BFS"," — explores in rings",[3335,4672,4673,4679,4682],{},[3353,4674,4675,4678],{},[394,4676,4677],{},"Stack"," (LIFO)",[3353,4680,4681],{},"newest first",[3353,4683,4684,4706],{},[429,4685,4687],{"className":4686},[432],[429,4688,4690],{"className":4689,"ariaHidden":437},[436],[429,4691,4693,4696],{"className":4692},[441],[429,4694],{"className":4695,"style":446},[445],[429,4697,4699],{"className":4698},[4661,4662],[429,4700,4702],{"className":4701},[450,1316],[429,4703,4705],{"className":4704},[450],"DFS"," — plunges and backtracks",[3335,4708,4709,4714,4717],{},[3353,4710,4711],{},[394,4712,4713],{},"Priority queue",[3353,4715,4716],{},"cheapest first",[3353,4718,4719],{},"Dijkstra \u002F Prim (later lessons)",[381,4721,4722,4723,4726,4727,4730],{},"This is the unifying idea to carry forward: ",[385,4724,4725],{},"BFS is the queue instantiation, DFS\nis the stack instantiation,"," and the weighted shortest-path and ",[406,4728,4729],{"href":170},"minimum-spanning-tree","\nalgorithms of later lessons are just Whatever-First-Search with a priority queue.\nEverything below specializes this one skeleton.",[381,4732,4733,4734,4736,4737,4752,4753,4768],{},"The choice of bag shows up as the ",[385,4735,4597],{}," of the search tree. Run both on the\nsame little graph from ",[429,4738,4740],{"className":4739},[432],[429,4741,4743],{"className":4742,"ariaHidden":437},[436],[429,4744,4746,4749],{"className":4745},[441],[429,4747],{"className":4748,"style":599},[445],[429,4750,4589],{"className":4751},[450,451]," (ties broken alphabetically): the queue grows a short,\nbushy tree that hugs ",[429,4754,4756],{"className":4755},[432],[429,4757,4759],{"className":4758,"ariaHidden":437},[436],[429,4760,4762,4765],{"className":4761},[441],[429,4763],{"className":4764,"style":599},[445],[429,4766,4589],{"className":4767},[450,451]," at every depth, while the stack grows one long descending\nspine, diving as far as it can before backing up.",[2506,4770,4772,4985],{"className":4771},[2509,2510],[2512,4773,4777],{"xmlns":2514,"width":4774,"height":4775,"viewBox":4776},"343.681","228.594","-75 -75 257.760 171.446",[1260,4778,4779,4795,4809,4812,4819,4822,4829,4832,4839,4842,4849,4858,4866,4875,4883,4904,4915,4918,4924,4927,4933,4936,4942,4945,4951,4960,4968,4977],{"stroke":2520,"style":2521},[1260,4780,4782,4789],{"stroke":2524,"fontFamily":4781,"fontSize":3851},"cmr8",[1260,4783,4785],{"transform":4784},"translate(16.226 -26.453)",[2255,4786],{"d":4787,"fill":2520,"stroke":2520,"className":4788,"style":3859},"M-51.797-36.484L-55.078-36.484L-55.078-36.781Q-54.754-36.781-54.511-36.828Q-54.269-36.875-54.269-37.043L-54.269-41.386Q-54.269-41.558-54.511-41.605Q-54.754-41.652-55.078-41.652L-55.078-41.949L-52.031-41.949Q-51.605-41.949-51.172-41.795Q-50.738-41.640-50.443-41.332Q-50.148-41.023-50.148-40.589Q-50.148-40.336-50.273-40.119Q-50.398-39.902-50.599-39.746Q-50.800-39.589-51.033-39.490Q-51.265-39.390-51.523-39.339Q-51.148-39.304-50.769-39.127Q-50.390-38.949-50.150-38.650Q-49.910-38.351-49.910-37.957Q-49.910-37.504-50.193-37.170Q-50.476-36.836-50.912-36.660Q-51.347-36.484-51.797-36.484M-53.558-39.195L-53.558-37.043Q-53.558-36.871-53.466-36.826Q-53.375-36.781-53.156-36.781L-52.031-36.781Q-51.793-36.781-51.558-36.869Q-51.324-36.957-51.138-37.117Q-50.953-37.277-50.851-37.490Q-50.750-37.703-50.750-37.957Q-50.750-38.277-50.902-38.562Q-51.054-38.847-51.324-39.021Q-51.593-39.195-51.910-39.195L-53.558-39.195M-53.558-41.386L-53.558-39.453L-52.269-39.453Q-52.027-39.453-51.789-39.535Q-51.550-39.617-51.367-39.763Q-51.183-39.910-51.070-40.127Q-50.957-40.343-50.957-40.589Q-50.957-40.800-51.043-41.002Q-51.129-41.203-51.275-41.345Q-51.422-41.488-51.617-41.570Q-51.812-41.652-52.031-41.652L-53.156-41.652Q-53.375-41.652-53.466-41.609Q-53.558-41.566-53.558-41.386M-46.508-36.484L-49.093-36.484L-49.093-36.781Q-48.773-36.781-48.529-36.828Q-48.285-36.875-48.285-37.043L-48.285-41.386Q-48.285-41.558-48.529-41.605Q-48.773-41.652-49.093-41.652L-49.093-41.949L-44.476-41.949L-44.246-40.101L-44.527-40.101Q-44.613-40.785-44.775-41.105Q-44.937-41.425-45.277-41.539Q-45.617-41.652-46.308-41.652L-47.117-41.652Q-47.336-41.652-47.427-41.609Q-47.519-41.566-47.519-41.386L-47.519-39.363L-46.910-39.363Q-46.484-39.363-46.287-39.429Q-46.090-39.496-46.008-39.689Q-45.925-39.882-45.925-40.300L-45.644-40.300L-45.644-38.132L-45.925-38.132Q-45.925-38.550-46.008-38.744Q-46.090-38.937-46.287-39.004Q-46.484-39.070-46.910-39.070L-47.519-39.070L-47.519-37.043Q-47.519-36.879-47.201-36.830Q-46.883-36.781-46.508-36.781L-46.508-36.484M-43.414-36.406L-43.414-38.211Q-43.414-38.238-43.383-38.269Q-43.351-38.300-43.328-38.300L-43.222-38.300Q-43.191-38.300-43.162-38.271Q-43.133-38.242-43.133-38.211Q-43.133-37.429-42.617-37.021Q-42.101-36.613-41.293-36.613Q-40.996-36.613-40.740-36.763Q-40.484-36.914-40.334-37.170Q-40.183-37.425-40.183-37.722Q-40.183-38.121-40.429-38.425Q-40.675-38.730-41.047-38.812L-42.168-39.070Q-42.508-39.144-42.795-39.365Q-43.082-39.586-43.248-39.904Q-43.414-40.222-43.414-40.574Q-43.414-41.004-43.183-41.359Q-42.953-41.714-42.572-41.916Q-42.191-42.117-41.765-42.117Q-41.515-42.117-41.269-42.058Q-41.023-42-40.804-41.877Q-40.586-41.754-40.422-41.574L-40.093-42.070Q-40.062-42.117-40.023-42.117L-39.976-42.117Q-39.949-42.117-39.918-42.086Q-39.886-42.054-39.886-42.027L-39.886-40.218Q-39.886-40.195-39.918-40.164Q-39.949-40.132-39.976-40.132L-40.078-40.132Q-40.109-40.132-40.138-40.162Q-40.168-40.191-40.168-40.218Q-40.168-40.351-40.211-40.537Q-40.254-40.722-40.318-40.877Q-40.383-41.031-40.482-41.189Q-40.582-41.347-40.672-41.437Q-41.101-41.843-41.765-41.843Q-42.043-41.843-42.302-41.711Q-42.562-41.578-42.720-41.343Q-42.879-41.109-42.879-40.828Q-42.879-40.472-42.638-40.201Q-42.398-39.929-42.031-39.843L-40.918-39.589Q-40.640-39.523-40.408-39.369Q-40.175-39.214-40.006-38.996Q-39.836-38.777-39.742-38.519Q-39.648-38.261-39.648-37.972Q-39.648-37.644-39.773-37.341Q-39.898-37.039-40.133-36.802Q-40.367-36.566-40.660-36.441Q-40.953-36.316-41.293-36.316Q-42.308-36.316-42.879-36.859L-43.207-36.363Q-43.238-36.316-43.277-36.316L-43.328-36.316Q-43.351-36.316-43.383-36.347Q-43.414-36.379-43.414-36.406",[2533],[1260,4790,4791],{"transform":4784},[2255,4792],{"d":4793,"fill":2520,"stroke":2520,"className":4794,"style":3859},"M-33.711-34.492Q-34.324-34.949-34.726-35.584Q-35.129-36.218-35.324-36.964Q-35.519-37.711-35.519-38.484Q-35.519-39.257-35.324-40.004Q-35.129-40.750-34.726-41.384Q-34.324-42.019-33.711-42.476Q-33.699-42.480-33.691-42.482Q-33.683-42.484-33.672-42.484L-33.594-42.484Q-33.555-42.484-33.529-42.457Q-33.504-42.429-33.504-42.386Q-33.504-42.336-33.535-42.316Q-34.043-41.863-34.365-41.240Q-34.687-40.617-34.828-39.922Q-34.969-39.226-34.969-38.484Q-34.969-37.750-34.830-37.050Q-34.691-36.351-34.367-35.726Q-34.043-35.101-33.535-34.652Q-33.504-34.632-33.504-34.582Q-33.504-34.539-33.529-34.511Q-33.555-34.484-33.594-34.484L-33.672-34.484Q-33.680-34.488-33.689-34.490Q-33.699-34.492-33.711-34.492M-28.566-34.933L-30.422-34.933L-30.422-35.226Q-30.152-35.226-29.984-35.271Q-29.816-35.316-29.816-35.492L-29.816-36.941Q-30.019-36.695-30.320-36.550Q-30.621-36.406-30.953-36.406Q-31.437-36.406-31.849-36.648Q-32.262-36.890-32.502-37.302Q-32.742-37.714-32.742-38.211Q-32.742-38.707-32.486-39.121Q-32.230-39.535-31.801-39.773Q-31.371-40.011-30.879-40.011Q-30.523-40.011-30.217-39.832Q-29.910-39.652-29.719-39.339L-29.430-40.011L-29.176-40.011L-29.176-35.492Q-29.176-35.316-29.008-35.271Q-28.840-35.226-28.566-35.226L-28.566-34.933M-30.894-36.660Q-30.527-36.660-30.234-36.892Q-29.941-37.125-29.793-37.484L-29.793-38.820Q-29.887-39.203-30.160-39.466Q-30.433-39.730-30.808-39.730Q-31.168-39.730-31.441-39.500Q-31.715-39.269-31.857-38.912Q-32-38.554-32-38.203Q-32-37.867-31.875-37.505Q-31.750-37.144-31.498-36.902Q-31.246-36.660-30.894-36.660M-27.621-37.437L-27.621-39.179Q-27.621-39.394-27.683-39.490Q-27.746-39.586-27.865-39.607Q-27.984-39.629-28.230-39.629L-28.230-39.925L-26.984-40.011L-26.984-37.461L-26.984-37.437Q-26.984-37.125-26.930-36.963Q-26.875-36.800-26.724-36.730Q-26.574-36.660-26.254-36.660Q-25.824-36.660-25.551-36.998Q-25.277-37.336-25.277-37.781L-25.277-39.179Q-25.277-39.394-25.340-39.490Q-25.402-39.586-25.521-39.607Q-25.641-39.629-25.887-39.629L-25.887-39.925L-24.641-40.011L-24.641-37.226Q-24.641-37.015-24.578-36.920Q-24.516-36.824-24.396-36.802Q-24.277-36.781-24.031-36.781L-24.031-36.484L-25.254-36.406L-25.254-37.027Q-25.422-36.738-25.703-36.572Q-25.984-36.406-26.305-36.406Q-27.621-36.406-27.621-37.437M-23.586-38.238Q-23.586-38.718-23.353-39.134Q-23.121-39.550-22.711-39.800Q-22.301-40.050-21.824-40.050Q-21.094-40.050-20.695-39.609Q-20.297-39.168-20.297-38.437Q-20.297-38.332-20.391-38.308L-22.840-38.308L-22.840-38.238Q-22.840-37.828-22.719-37.472Q-22.598-37.117-22.326-36.900Q-22.055-36.683-21.625-36.683Q-21.262-36.683-20.965-36.912Q-20.668-37.140-20.566-37.492Q-20.558-37.539-20.473-37.554L-20.391-37.554Q-20.297-37.527-20.297-37.445Q-20.297-37.437-20.305-37.406Q-20.367-37.179-20.506-36.996Q-20.644-36.812-20.836-36.679Q-21.027-36.547-21.246-36.476Q-21.465-36.406-21.703-36.406Q-22.074-36.406-22.412-36.543Q-22.750-36.679-23.017-36.931Q-23.285-37.183-23.435-37.523Q-23.586-37.863-23.586-38.238M-22.832-38.547L-20.871-38.547Q-20.871-38.851-20.973-39.142Q-21.074-39.433-21.291-39.615Q-21.508-39.797-21.824-39.797Q-22.125-39.797-22.355-39.609Q-22.586-39.422-22.709-39.130Q-22.832-38.839-22.832-38.547M-19.125-37.437L-19.125-39.179Q-19.125-39.394-19.187-39.490Q-19.250-39.586-19.369-39.607Q-19.488-39.629-19.734-39.629L-19.734-39.925L-18.488-40.011L-18.488-37.461L-18.488-37.437Q-18.488-37.125-18.433-36.963Q-18.379-36.800-18.228-36.730Q-18.078-36.660-17.758-36.660Q-17.328-36.660-17.055-36.998Q-16.781-37.336-16.781-37.781L-16.781-39.179Q-16.781-39.394-16.844-39.490Q-16.906-39.586-17.025-39.607Q-17.144-39.629-17.391-39.629L-17.391-39.925L-16.144-40.011L-16.144-37.226Q-16.144-37.015-16.082-36.920Q-16.019-36.824-15.900-36.802Q-15.781-36.781-15.535-36.781L-15.535-36.484L-16.758-36.406L-16.758-37.027Q-16.926-36.738-17.207-36.572Q-17.488-36.406-17.808-36.406Q-19.125-36.406-19.125-37.437M-15.090-38.238Q-15.090-38.718-14.857-39.134Q-14.625-39.550-14.215-39.800Q-13.805-40.050-13.328-40.050Q-12.598-40.050-12.199-39.609Q-11.801-39.168-11.801-38.437Q-11.801-38.332-11.894-38.308L-14.344-38.308L-14.344-38.238Q-14.344-37.828-14.223-37.472Q-14.101-37.117-13.830-36.900Q-13.558-36.683-13.129-36.683Q-12.766-36.683-12.469-36.912Q-12.172-37.140-12.070-37.492Q-12.062-37.539-11.976-37.554L-11.894-37.554Q-11.801-37.527-11.801-37.445Q-11.801-37.437-11.808-37.406Q-11.871-37.179-12.010-36.996Q-12.148-36.812-12.340-36.679Q-12.531-36.547-12.750-36.476Q-12.969-36.406-13.207-36.406Q-13.578-36.406-13.916-36.543Q-14.254-36.679-14.521-36.931Q-14.789-37.183-14.939-37.523Q-15.090-37.863-15.090-38.238M-14.336-38.547L-12.375-38.547Q-12.375-38.851-12.476-39.142Q-12.578-39.433-12.795-39.615Q-13.012-39.797-13.328-39.797Q-13.629-39.797-13.859-39.609Q-14.090-39.422-14.213-39.130Q-14.336-38.839-14.336-38.547M-10.910-34.484L-10.992-34.484Q-11.027-34.484-11.053-34.513Q-11.078-34.543-11.078-34.582Q-11.078-34.632-11.047-34.652Q-10.660-34.988-10.377-35.437Q-10.094-35.886-9.928-36.386Q-9.762-36.886-9.687-37.404Q-9.613-37.922-9.613-38.484Q-9.613-39.054-9.687-39.570Q-9.762-40.086-9.928-40.582Q-10.094-41.078-10.373-41.525Q-10.652-41.972-11.047-42.316Q-11.078-42.336-11.078-42.386Q-11.078-42.425-11.053-42.455Q-11.027-42.484-10.992-42.484L-10.910-42.484Q-10.898-42.484-10.889-42.482Q-10.879-42.480-10.871-42.476Q-10.258-42.019-9.855-41.384Q-9.453-40.750-9.258-40.004Q-9.062-39.257-9.062-38.484Q-9.062-37.711-9.258-36.964Q-9.453-36.218-9.855-35.584Q-10.258-34.949-10.871-34.492Q-10.883-34.492-10.891-34.490Q-10.898-34.488-10.910-34.484",[2533],[1260,4796,4799,4802],{"fill":3868,"stroke":4797,"style":4798},"var(--tk-accent)","stroke-width:1.2",[2255,4800],{"d":4801},"M-5.653-36.484c0-5.5-4.458-9.959-9.958-9.959s-9.959 4.459-9.959 9.959 4.459 9.958 9.959 9.958 9.958-4.458 9.958-9.958Zm-9.958 0",[1260,4803,4805],{"transform":4804},"translate(37.68 1.937)",[2255,4806],{"d":4807,"fill":2520,"stroke":2520,"className":4808,"style":2534},"M-54.610-37.033Q-54.390-36.647-53.634-36.647Q-53.336-36.647-53.041-36.748Q-52.747-36.849-52.553-37.062Q-52.360-37.275-52.360-37.583Q-52.360-37.811-52.538-37.958Q-52.716-38.106-52.962-38.158L-53.472-38.255Q-53.687-38.295-53.863-38.418Q-54.039-38.541-54.144-38.727Q-54.250-38.914-54.250-39.130Q-54.250-39.529-54.026-39.835Q-53.801-40.140-53.443-40.301Q-53.085-40.461-52.681-40.461Q-52.417-40.461-52.169-40.382Q-51.921-40.303-51.751-40.123Q-51.582-39.942-51.582-39.679Q-51.582-39.472-51.703-39.314Q-51.824-39.156-52.035-39.156Q-52.158-39.156-52.244-39.237Q-52.329-39.318-52.329-39.437Q-52.329-39.600-52.206-39.734Q-52.083-39.868-51.925-39.868Q-52.013-40.048-52.230-40.125Q-52.448-40.202-52.698-40.202Q-52.940-40.202-53.166-40.114Q-53.393-40.026-53.538-39.857Q-53.683-39.688-53.683-39.437Q-53.683-39.261-53.551-39.143Q-53.419-39.024-53.221-38.976L-52.716-38.879Q-52.329-38.800-52.061-38.530Q-51.793-38.259-51.793-37.877Q-51.793-37.547-51.982-37.227Q-52.171-36.906-52.448-36.708Q-52.949-36.383-53.643-36.383Q-53.955-36.383-54.256-36.469Q-54.557-36.554-54.762-36.752Q-54.966-36.950-54.966-37.257Q-54.966-37.508-54.823-37.692Q-54.680-37.877-54.439-37.877Q-54.285-37.877-54.186-37.785Q-54.087-37.692-54.087-37.547Q-54.087-37.337-54.239-37.185Q-54.390-37.033-54.610-37.033",[2533],[2255,4810],{"fill":2524,"d":4811},"M-45.486 3.35c0-5.5-4.459-9.96-9.959-9.96s-9.958 4.46-9.958 9.96 4.458 9.958 9.958 9.958 9.959-4.459 9.959-9.959Zm-9.959 0",[1260,4813,4815],{"transform":4814},"translate(-2.45 41.771)",[2255,4816],{"d":4817,"fill":2520,"stroke":2520,"className":4818,"style":2534},"M-53.823-36.383Q-54.219-36.383-54.505-36.587Q-54.790-36.792-54.937-37.126Q-55.085-37.460-55.085-37.851Q-55.085-38.286-54.911-38.747Q-54.737-39.209-54.425-39.600Q-54.113-39.991-53.703-40.226Q-53.292-40.461-52.852-40.461Q-52.584-40.461-52.367-40.323Q-52.149-40.184-52.017-39.938Q-51.978-40.088-51.870-40.184Q-51.762-40.281-51.622-40.281Q-51.499-40.281-51.415-40.208Q-51.332-40.136-51.332-40.013Q-51.332-39.960-51.341-39.929L-51.960-37.438Q-52.017-37.240-52.017-37.042Q-52.017-36.647-51.754-36.647Q-51.468-36.647-51.334-36.970Q-51.200-37.293-51.081-37.798Q-51.072-37.829-51.048-37.853Q-51.024-37.877-50.989-37.877L-50.883-37.877Q-50.835-37.877-50.813-37.844Q-50.791-37.811-50.791-37.763Q-50.905-37.332-50.996-37.079Q-51.086-36.827-51.279-36.605Q-51.472-36.383-51.771-36.383Q-52.079-36.383-52.327-36.554Q-52.575-36.726-52.646-37.016Q-52.901-36.730-53.197-36.557Q-53.494-36.383-53.823-36.383M-53.806-36.647Q-53.476-36.647-53.166-36.888Q-52.857-37.130-52.646-37.446Q-52.637-37.455-52.637-37.473L-52.140-39.437Q-52.197-39.754-52.389-39.978Q-52.580-40.202-52.870-40.202Q-53.239-40.202-53.538-39.883Q-53.837-39.565-54.004-39.156Q-54.140-38.809-54.265-38.299Q-54.390-37.789-54.390-37.464Q-54.390-37.139-54.252-36.893Q-54.113-36.647-53.806-36.647",[2533],[2255,4820],{"fill":2524,"d":4821},"M-5.653 3.35c0-5.5-4.458-9.96-9.958-9.96s-9.959 4.46-9.959 9.96 4.459 9.958 9.959 9.958 9.958-4.459 9.958-9.959Zm-9.958 0",[1260,4823,4825],{"transform":4824},"translate(37.852 42.959)",[2255,4826],{"d":4827,"fill":2520,"stroke":2520,"className":4828,"style":2534},"M-53.823-36.383Q-54.399-36.383-54.720-36.814Q-55.041-37.244-55.041-37.824Q-55.041-38.229-54.957-38.457L-54.078-41.955Q-54.043-42.105-54.043-42.179Q-54.043-42.316-54.610-42.316Q-54.707-42.316-54.707-42.434Q-54.707-42.491-54.676-42.562Q-54.645-42.632-54.579-42.632L-53.358-42.729Q-53.305-42.729-53.272-42.700Q-53.239-42.672-53.239-42.623L-53.239-42.588L-53.898-39.978Q-53.375-40.461-52.852-40.461Q-52.466-40.461-52.175-40.257Q-51.885-40.052-51.738-39.718Q-51.591-39.384-51.591-38.993Q-51.591-38.409-51.894-37.800Q-52.197-37.192-52.718-36.787Q-53.239-36.383-53.823-36.383M-53.806-36.647Q-53.437-36.647-53.133-36.970Q-52.830-37.293-52.672-37.688Q-52.527-38.044-52.406-38.552Q-52.285-39.059-52.285-39.380Q-52.285-39.705-52.430-39.953Q-52.575-40.202-52.870-40.202Q-53.472-40.202-54.043-39.402L-54.285-38.409Q-54.430-37.785-54.430-37.521Q-54.430-37.178-54.278-36.912Q-54.127-36.647-53.806-36.647",[2533],[2255,4830],{"fill":2524,"d":4831},"M34.181 3.35c0-5.5-4.458-9.96-9.958-9.96s-9.959 4.46-9.959 9.96 4.459 9.958 9.959 9.958 9.958-4.459 9.958-9.959Zm-9.958 0",[1260,4833,4835],{"transform":4834},"translate(77.666 41.771)",[2255,4836],{"d":4837,"fill":2520,"stroke":2520,"className":4838,"style":2534},"M-54.355-37.591Q-54.355-37.196-54.142-36.921Q-53.929-36.647-53.547-36.647Q-53.002-36.647-52.496-36.882Q-51.991-37.117-51.674-37.539Q-51.653-37.574-51.591-37.574Q-51.534-37.574-51.488-37.523Q-51.442-37.473-51.442-37.420Q-51.442-37.385-51.468-37.359Q-51.815-36.884-52.378-36.633Q-52.940-36.383-53.564-36.383Q-53.995-36.383-54.344-36.585Q-54.694-36.787-54.885-37.143Q-55.076-37.499-55.076-37.925Q-55.076-38.387-54.874-38.844Q-54.672-39.301-54.316-39.670Q-53.960-40.039-53.516-40.250Q-53.072-40.461-52.602-40.461Q-52.334-40.461-52.085-40.380Q-51.837-40.298-51.670-40.120Q-51.503-39.942-51.503-39.679Q-51.503-39.442-51.653-39.264Q-51.802-39.086-52.035-39.086Q-52.175-39.086-52.281-39.180Q-52.386-39.275-52.386-39.420Q-52.386-39.622-52.239-39.776Q-52.092-39.929-51.890-39.929Q-51.995-40.070-52.200-40.136Q-52.404-40.202-52.611-40.202Q-53.147-40.202-53.544-39.773Q-53.942-39.345-54.149-38.725Q-54.355-38.106-54.355-37.591",[2533],[2255,4840],{"fill":2524,"d":4841},"M-5.653 43.183c0-5.5-4.458-9.958-9.958-9.958s-9.959 4.459-9.959 9.958 4.459 9.959 9.959 9.959 9.958-4.459 9.958-9.959Zm-9.958 0",[1260,4843,4845],{"transform":4844},"translate(37.437 82.793)",[2255,4846],{"d":4847,"fill":2520,"stroke":2520,"className":4848,"style":2534},"M-53.823-36.383Q-54.219-36.383-54.505-36.587Q-54.790-36.792-54.937-37.126Q-55.085-37.460-55.085-37.851Q-55.085-38.286-54.911-38.747Q-54.737-39.209-54.425-39.600Q-54.113-39.991-53.703-40.226Q-53.292-40.461-52.852-40.461Q-52.584-40.461-52.367-40.323Q-52.149-40.184-52.017-39.938L-51.512-41.955Q-51.477-42.105-51.477-42.179Q-51.477-42.316-52.044-42.316Q-52.140-42.316-52.140-42.434Q-52.140-42.491-52.110-42.562Q-52.079-42.632-52.017-42.632L-50.791-42.729Q-50.738-42.729-50.708-42.700Q-50.677-42.672-50.677-42.623L-50.677-42.588L-51.960-37.438Q-51.960-37.380-51.989-37.249Q-52.017-37.117-52.017-37.042Q-52.017-36.647-51.754-36.647Q-51.468-36.647-51.334-36.970Q-51.200-37.293-51.081-37.798Q-51.072-37.829-51.048-37.853Q-51.024-37.877-50.989-37.877L-50.883-37.877Q-50.835-37.877-50.813-37.844Q-50.791-37.811-50.791-37.763Q-50.905-37.332-50.996-37.079Q-51.086-36.827-51.279-36.605Q-51.472-36.383-51.771-36.383Q-52.079-36.383-52.327-36.554Q-52.575-36.726-52.646-37.016Q-52.901-36.730-53.197-36.557Q-53.494-36.383-53.823-36.383M-53.806-36.647Q-53.476-36.647-53.166-36.888Q-52.857-37.130-52.646-37.446Q-52.637-37.455-52.637-37.482L-52.140-39.437Q-52.197-39.754-52.389-39.978Q-52.580-40.202-52.870-40.202Q-53.239-40.202-53.538-39.883Q-53.837-39.565-54.004-39.156Q-54.140-38.809-54.265-38.299Q-54.390-37.789-54.390-37.464Q-54.390-37.139-54.252-36.893Q-54.113-36.647-53.806-36.647",[2533],[1260,4850,4851,4854],{"style":4798},[2255,4852],{"fill":2524,"d":4853},"M-23.077-29.018-44.602-7.494",[2255,4855],{"d":4856,"style":4857},"m-47.053-5.042 4.635-2.087-2.396-.153-.153-2.396Z","stroke-width:1.199988",[1260,4859,4860,4863],{"style":4798},[2255,4861],{"fill":2524,"d":4862},"M-15.611-25.926v13.94",[2255,4864],{"d":4865},"m-15.611-8.518 1.802-4.753-1.802 1.586-1.803-1.586Z",[1260,4867,4868,4871],{"style":4798},[2255,4869],{"fill":2524,"d":4870},"M-8.145-29.018 13.38-7.494",[2255,4872],{"d":4873,"style":4874},"m15.831-5.042-2.086-4.635-.153 2.396-2.396.152Z","stroke-width:1.199976",[1260,4876,4877,4880],{"style":4798},[2255,4878],{"fill":2524,"d":4879},"M-15.611 13.508v14.341",[2255,4881],{"d":4882},"m-15.611 31.316 1.802-4.753-1.802 1.586-1.803-1.586Z",[1260,4884,4885,4892,4898],{"stroke":2524,"fontFamily":4781,"fontSize":3851},[1260,4886,4888],{"transform":4887},"translate(182.291 -26.453)",[2255,4889],{"d":4890,"fill":2520,"stroke":2520,"className":4891,"style":3859},"M-52.031-36.484L-55.093-36.484L-55.093-36.781Q-54.769-36.781-54.527-36.828Q-54.285-36.875-54.285-37.043L-54.285-41.386Q-54.285-41.558-54.527-41.605Q-54.769-41.652-55.093-41.652L-55.093-41.949L-52.031-41.949Q-51.480-41.949-51.002-41.722Q-50.523-41.496-50.170-41.101Q-49.816-40.707-49.627-40.207Q-49.437-39.707-49.437-39.164Q-49.437-38.457-49.781-37.839Q-50.125-37.222-50.720-36.853Q-51.316-36.484-52.031-36.484M-53.543-41.386L-53.543-37.043Q-53.543-36.871-53.451-36.826Q-53.359-36.781-53.140-36.781L-52.246-36.781Q-51.800-36.781-51.408-36.951Q-51.015-37.121-50.744-37.445Q-50.472-37.769-50.375-38.189Q-50.277-38.609-50.277-39.164Q-50.277-39.519-50.314-39.832Q-50.351-40.144-50.457-40.439Q-50.562-40.734-50.742-40.957Q-50.925-41.191-51.164-41.341Q-51.402-41.492-51.683-41.572Q-51.965-41.652-52.246-41.652L-53.140-41.652Q-53.359-41.652-53.451-41.609Q-53.543-41.566-53.543-41.386M-46.035-36.484L-48.621-36.484L-48.621-36.781Q-48.300-36.781-48.056-36.828Q-47.812-36.875-47.812-37.043L-47.812-41.386Q-47.812-41.558-48.056-41.605Q-48.300-41.652-48.621-41.652L-48.621-41.949L-44.004-41.949L-43.773-40.101L-44.054-40.101Q-44.140-40.785-44.302-41.105Q-44.465-41.425-44.804-41.539Q-45.144-41.652-45.836-41.652L-46.644-41.652Q-46.863-41.652-46.955-41.609Q-47.047-41.566-47.047-41.386L-47.047-39.363L-46.437-39.363Q-46.011-39.363-45.814-39.429Q-45.617-39.496-45.535-39.689Q-45.453-39.882-45.453-40.300L-45.172-40.300L-45.172-38.132L-45.453-38.132Q-45.453-38.550-45.535-38.744Q-45.617-38.937-45.814-39.004Q-46.011-39.070-46.437-39.070L-47.047-39.070L-47.047-37.043Q-47.047-36.879-46.728-36.830Q-46.410-36.781-46.035-36.781L-46.035-36.484M-42.941-36.406L-42.941-38.211Q-42.941-38.238-42.910-38.269Q-42.879-38.300-42.855-38.300L-42.750-38.300Q-42.718-38.300-42.689-38.271Q-42.660-38.242-42.660-38.211Q-42.660-37.429-42.144-37.021Q-41.629-36.613-40.820-36.613Q-40.523-36.613-40.267-36.763Q-40.011-36.914-39.861-37.170Q-39.711-37.425-39.711-37.722Q-39.711-38.121-39.957-38.425Q-40.203-38.730-40.574-38.812L-41.695-39.070Q-42.035-39.144-42.322-39.365Q-42.609-39.586-42.775-39.904Q-42.941-40.222-42.941-40.574Q-42.941-41.004-42.711-41.359Q-42.480-41.714-42.099-41.916Q-41.718-42.117-41.293-42.117Q-41.043-42.117-40.797-42.058Q-40.550-42-40.332-41.877Q-40.113-41.754-39.949-41.574L-39.621-42.070Q-39.590-42.117-39.550-42.117L-39.504-42.117Q-39.476-42.117-39.445-42.086Q-39.414-42.054-39.414-42.027L-39.414-40.218Q-39.414-40.195-39.445-40.164Q-39.476-40.132-39.504-40.132L-39.605-40.132Q-39.636-40.132-39.666-40.162Q-39.695-40.191-39.695-40.218Q-39.695-40.351-39.738-40.537Q-39.781-40.722-39.845-40.877Q-39.910-41.031-40.009-41.189Q-40.109-41.347-40.199-41.437Q-40.629-41.843-41.293-41.843Q-41.570-41.843-41.830-41.711Q-42.090-41.578-42.248-41.343Q-42.406-41.109-42.406-40.828Q-42.406-40.472-42.166-40.201Q-41.925-39.929-41.558-39.843L-40.445-39.589Q-40.168-39.523-39.935-39.369Q-39.703-39.214-39.533-38.996Q-39.363-38.777-39.269-38.519Q-39.175-38.261-39.175-37.972Q-39.175-37.644-39.300-37.341Q-39.425-37.039-39.660-36.802Q-39.894-36.566-40.187-36.441Q-40.480-36.316-40.820-36.316Q-41.836-36.316-42.406-36.859L-42.734-36.363Q-42.765-36.316-42.804-36.316L-42.855-36.316Q-42.879-36.316-42.910-36.347Q-42.941-36.379-42.941-36.406",[2533],[1260,4893,4894],{"transform":4887},[2255,4895],{"d":4896,"fill":2520,"stroke":2520,"className":4897,"style":3859},"M-33.239-34.492Q-33.852-34.949-34.254-35.584Q-34.657-36.218-34.852-36.964Q-35.047-37.711-35.047-38.484Q-35.047-39.257-34.852-40.004Q-34.657-40.750-34.254-41.384Q-33.852-42.019-33.239-42.476Q-33.227-42.480-33.219-42.482Q-33.211-42.484-33.200-42.484L-33.122-42.484Q-33.083-42.484-33.057-42.457Q-33.032-42.429-33.032-42.386Q-33.032-42.336-33.063-42.316Q-33.571-41.863-33.893-41.240Q-34.215-40.617-34.356-39.922Q-34.497-39.226-34.497-38.484Q-34.497-37.750-34.358-37.050Q-34.219-36.351-33.895-35.726Q-33.571-35.101-33.063-34.652Q-33.032-34.632-33.032-34.582Q-33.032-34.539-33.057-34.511Q-33.083-34.484-33.122-34.484L-33.200-34.484Q-33.208-34.488-33.217-34.490Q-33.227-34.492-33.239-34.492M-32.270-36.492L-32.270-37.714Q-32.270-37.742-32.239-37.773Q-32.208-37.804-32.184-37.804L-32.079-37.804Q-32.008-37.804-31.993-37.742Q-31.930-37.422-31.792-37.181Q-31.653-36.941-31.420-36.800Q-31.188-36.660-30.879-36.660Q-30.641-36.660-30.432-36.720Q-30.223-36.781-30.086-36.929Q-29.950-37.078-29.950-37.324Q-29.950-37.578-30.161-37.744Q-30.372-37.910-30.641-37.964L-31.262-38.078Q-31.669-38.156-31.969-38.412Q-32.270-38.668-32.270-39.043Q-32.270-39.410-32.069-39.632Q-31.868-39.855-31.544-39.953Q-31.219-40.050-30.879-40.050Q-30.415-40.050-30.118-39.843L-29.895-40.027Q-29.872-40.050-29.840-40.050L-29.790-40.050Q-29.758-40.050-29.731-40.023Q-29.704-39.996-29.704-39.964L-29.704-38.980Q-29.704-38.949-29.729-38.920Q-29.754-38.890-29.790-38.890L-29.895-38.890Q-29.930-38.890-29.958-38.918Q-29.985-38.945-29.985-38.980Q-29.985-39.379-30.237-39.599Q-30.489-39.820-30.887-39.820Q-31.243-39.820-31.526-39.697Q-31.809-39.574-31.809-39.269Q-31.809-39.050-31.608-38.918Q-31.407-38.785-31.161-38.742L-30.536-38.629Q-30.106-38.539-29.797-38.242Q-29.489-37.945-29.489-37.531Q-29.489-36.961-29.887-36.683Q-30.286-36.406-30.879-36.406Q-31.430-36.406-31.782-36.742L-32.079-36.429Q-32.102-36.406-32.137-36.406L-32.184-36.406Q-32.208-36.406-32.239-36.437Q-32.270-36.468-32.270-36.492M-28.336-37.445L-28.336-39.636L-29.040-39.636L-29.040-39.890Q-28.684-39.890-28.442-40.123Q-28.200-40.355-28.088-40.703Q-27.977-41.050-27.977-41.406L-27.696-41.406L-27.696-39.933L-26.520-39.933L-26.520-39.636L-27.696-39.636L-27.696-37.461Q-27.696-37.140-27.577-36.912Q-27.458-36.683-27.176-36.683Q-26.997-36.683-26.879-36.806Q-26.762-36.929-26.710-37.109Q-26.657-37.289-26.657-37.461L-26.657-37.933L-26.376-37.933L-26.376-37.445Q-26.376-37.191-26.481-36.951Q-26.586-36.711-26.784-36.558Q-26.981-36.406-27.239-36.406Q-27.555-36.406-27.807-36.529Q-28.059-36.652-28.198-36.886Q-28.336-37.121-28.336-37.445M-25.559-37.316Q-25.559-37.800-25.157-38.095Q-24.754-38.390-24.204-38.509Q-23.653-38.629-23.161-38.629L-23.161-38.918Q-23.161-39.144-23.276-39.351Q-23.391-39.558-23.588-39.677Q-23.786-39.797-24.016-39.797Q-24.442-39.797-24.727-39.691Q-24.657-39.664-24.610-39.609Q-24.563-39.554-24.538-39.484Q-24.512-39.414-24.512-39.339Q-24.512-39.234-24.563-39.142Q-24.614-39.050-24.706-39Q-24.797-38.949-24.903-38.949Q-25.008-38.949-25.100-39Q-25.192-39.050-25.243-39.142Q-25.294-39.234-25.294-39.339Q-25.294-39.757-24.905-39.904Q-24.516-40.050-24.016-40.050Q-23.684-40.050-23.331-39.920Q-22.977-39.789-22.749-39.535Q-22.520-39.281-22.520-38.933L-22.520-37.132Q-22.520-37-22.448-36.890Q-22.376-36.781-22.247-36.781Q-22.122-36.781-22.053-36.886Q-21.985-36.992-21.985-37.132L-21.985-37.644L-21.704-37.644L-21.704-37.132Q-21.704-36.929-21.821-36.771Q-21.938-36.613-22.120-36.529Q-22.301-36.445-22.504-36.445Q-22.735-36.445-22.887-36.617Q-23.040-36.789-23.071-37.019Q-23.231-36.738-23.540-36.572Q-23.848-36.406-24.200-36.406Q-24.711-36.406-25.135-36.629Q-25.559-36.851-25.559-37.316M-24.872-37.316Q-24.872-37.031-24.645-36.845Q-24.419-36.660-24.126-36.660Q-23.879-36.660-23.655-36.777Q-23.430-36.894-23.295-37.097Q-23.161-37.300-23.161-37.554L-23.161-38.386Q-23.426-38.386-23.711-38.332Q-23.997-38.277-24.268-38.148Q-24.540-38.019-24.706-37.812Q-24.872-37.605-24.872-37.316M-21.368-38.211Q-21.368-38.707-21.118-39.132Q-20.868-39.558-20.448-39.804Q-20.028-40.050-19.528-40.050Q-18.989-40.050-18.598-39.925Q-18.208-39.800-18.208-39.386Q-18.208-39.281-18.258-39.189Q-18.309-39.097-18.401-39.047Q-18.493-38.996-18.602-38.996Q-18.708-38.996-18.799-39.047Q-18.891-39.097-18.942-39.189Q-18.993-39.281-18.993-39.386Q-18.993-39.609-18.825-39.714Q-19.047-39.773-19.520-39.773Q-19.817-39.773-20.032-39.634Q-20.247-39.496-20.377-39.265Q-20.508-39.035-20.567-38.765Q-20.626-38.496-20.626-38.211Q-20.626-37.816-20.493-37.466Q-20.360-37.117-20.088-36.900Q-19.817-36.683-19.419-36.683Q-19.044-36.683-18.768-36.900Q-18.493-37.117-18.391-37.476Q-18.376-37.539-18.313-37.539L-18.208-37.539Q-18.172-37.539-18.147-37.511Q-18.122-37.484-18.122-37.445L-18.122-37.422Q-18.254-36.941-18.639-36.673Q-19.024-36.406-19.528-36.406Q-19.891-36.406-20.225-36.543Q-20.559-36.679-20.819-36.929Q-21.079-37.179-21.223-37.515Q-21.368-37.851-21.368-38.211",[2533],[1260,4899,4900],{"transform":4887},[2255,4901],{"d":4902,"fill":2520,"stroke":2520,"className":4903,"style":3859},"M-16.038-36.484L-17.834-36.484L-17.834-36.781Q-17.565-36.781-17.397-36.826Q-17.229-36.871-17.229-37.043L-17.229-41.203Q-17.229-41.418-17.291-41.513Q-17.354-41.609-17.471-41.630Q-17.588-41.652-17.834-41.652L-17.834-41.949L-16.612-42.035L-16.612-38.269L-15.514-39.156Q-15.307-39.336-15.307-39.484Q-15.307-39.550-15.360-39.593Q-15.413-39.636-15.483-39.636L-15.483-39.933L-13.948-39.933L-13.948-39.636Q-14.479-39.636-15.077-39.156L-15.686-38.660L-14.612-37.261Q-14.475-37.086-14.368-36.978Q-14.260-36.871-14.125-36.826Q-13.991-36.781-13.764-36.781L-13.764-36.484L-15.389-36.484L-15.389-36.781Q-15.147-36.781-15.147-36.933Q-15.147-37.011-15.190-37.082Q-15.233-37.152-15.315-37.261L-16.116-38.308L-16.643-37.882L-16.643-37.043Q-16.643-36.875-16.475-36.828Q-16.307-36.781-16.038-36.781L-16.038-36.484M-12.979-34.484L-13.061-34.484Q-13.096-34.484-13.121-34.513Q-13.147-34.543-13.147-34.582Q-13.147-34.632-13.116-34.652Q-12.729-34.988-12.446-35.437Q-12.163-35.886-11.996-36.386Q-11.830-36.886-11.756-37.404Q-11.682-37.922-11.682-38.484Q-11.682-39.054-11.756-39.570Q-11.830-40.086-11.996-40.582Q-12.163-41.078-12.442-41.525Q-12.721-41.972-13.116-42.316Q-13.147-42.336-13.147-42.386Q-13.147-42.425-13.121-42.455Q-13.096-42.484-13.061-42.484L-12.979-42.484Q-12.967-42.484-12.957-42.482Q-12.948-42.480-12.940-42.476Q-12.327-42.019-11.924-41.384Q-11.522-40.750-11.327-40.004Q-11.131-39.257-11.131-38.484Q-11.131-37.711-11.327-36.964Q-11.522-36.218-11.924-35.584Q-12.327-34.949-12.940-34.492Q-12.952-34.492-12.959-34.490Q-12.967-34.488-12.979-34.484",[2533],[1260,4905,4906,4909],{"fill":3868,"stroke":4797,"style":4798},[2255,4907],{"d":4908},"M159.373-36.484c0-5.5-4.458-9.959-9.958-9.959s-9.959 4.459-9.959 9.959 4.459 9.958 9.959 9.958 9.958-4.458 9.958-9.958Zm-9.958 0",[1260,4910,4912],{"transform":4911},"translate(202.705 1.937)",[2255,4913],{"d":4807,"fill":2520,"stroke":2520,"className":4914,"style":2534},[2533],[2255,4916],{"fill":2524,"d":4917},"M139.456 3.35c0-5.5-4.458-9.96-9.958-9.96s-9.959 4.46-9.959 9.96 4.459 9.958 9.959 9.958 9.958-4.459 9.958-9.959Zm-9.958 0",[1260,4919,4921],{"transform":4920},"translate(182.493 41.771)",[2255,4922],{"d":4817,"fill":2520,"stroke":2520,"className":4923,"style":2534},[2533],[2255,4925],{"fill":2524,"d":4926},"M119.54 43.183c0-5.5-4.459-9.958-9.959-9.958s-9.958 4.459-9.958 9.958 4.458 9.959 9.958 9.959 9.959-4.459 9.959-9.959Zm-9.959 0",[1260,4928,4930],{"transform":4929},"translate(163.044 82.793)",[2255,4931],{"d":4827,"fill":2520,"stroke":2520,"className":4932,"style":2534},[2533],[2255,4934],{"fill":2524,"d":4935},"M139.456 83.017c0-5.5-4.458-9.958-9.958-9.958s-9.959 4.458-9.959 9.958 4.459 9.959 9.959 9.959 9.958-4.459 9.958-9.959Zm-9.958 0",[1260,4937,4939],{"transform":4938},"translate(182.546 122.626)",[2255,4940],{"d":4847,"fill":2520,"stroke":2520,"className":4941,"style":2534},[2533],[2255,4943],{"fill":2524,"d":4944},"M179.29 3.35c0-5.5-4.458-9.96-9.958-9.96s-9.958 4.46-9.958 9.96 4.458 9.958 9.958 9.958 9.958-4.459 9.958-9.959Zm-9.958 0",[1260,4946,4948],{"transform":4947},"translate(222.775 41.771)",[2255,4949],{"d":4837,"fill":2520,"stroke":2520,"className":4950,"style":2534},[2533],[1260,4952,4953,4956],{"style":4798},[2255,4954],{"fill":2524,"d":4955},"m144.693-27.041-8.338 16.676",[2255,4957],{"d":4958,"style":4959},"m134.805-7.264 3.737-3.446-2.321.613-.903-2.225Z","stroke-width:1.199904",[1260,4961,4962,4965],{"style":4798},[2255,4963],{"fill":2524,"d":4964},"m124.955 12.435-8.517 17.034",[2255,4966],{"d":4967,"style":4959},"m114.888 32.57 3.737-3.446-2.32.613-.903-2.225Z",[1260,4969,4970,4973],{"style":4798},[2255,4971],{"fill":2524,"d":4972},"m114.124 52.269 8.516 17.033",[2255,4974],{"d":4975,"style":4976},"m124.19 72.403-.513-5.057-.902 2.225-2.322-.613Z","stroke-width:1.199928",[1260,4978,4979,4982],{"style":4798},[2255,4980],{"fill":2524,"d":4981},"m154.136-27.041 8.339 16.676",[2255,4983],{"d":4984,"style":4959},"m164.025-7.264-.514-5.058-.902 2.225-2.322-.613Z",[2579,4986,4988],{"className":4987},[2582],"Same graph, same source: the queue (BFS) builds a shallow bushy tree, the stack (DFS) a deep spine.",[414,4990,4992],{"id":4991},"breadth-first-search","Breadth-first search",[381,4994,4995,4996,658,5015,5017,5018,5021,5022,5037,5038,5053],{},"The most basic question we can ask is: ",[385,4997,4998,4999,5014],{},"starting from a source ",[429,5000,5002],{"className":5001},[432],[429,5003,5005],{"className":5004,"ariaHidden":437},[436],[429,5006,5008,5011],{"className":5007},[441],[429,5009],{"className":5010,"style":599},[445],[429,5012,4589],{"className":5013},[450,451],", which\nvertices can I reach, and how far away is each?",[394,5016,4992],{}," (BFS)\nis Whatever-First-Search with a ",[394,5019,5020],{},"queue",". It explores in rings of increasing\ndistance: first ",[429,5023,5025],{"className":5024},[432],[429,5026,5028],{"className":5027,"ariaHidden":437},[436],[429,5029,5031,5034],{"className":5030},[441],[429,5032],{"className":5033,"style":599},[445],[429,5035,4589],{"className":5036},[450,451]," itself, then all neighbors of ",[429,5039,5041],{"className":5040},[432],[429,5042,5044],{"className":5043,"ariaHidden":437},[436],[429,5045,5047,5050],{"className":5046},[441],[429,5048],{"className":5049,"style":599},[445],[429,5051,4589],{"className":5052},[450,451],", then everything new one\nstep beyond them, and so on. The first-in-first-out discipline is exactly what\nenforces this level-by-level order; the oldest-discovered vertex always sits at\nthe shallowest depth still unfinished.",[381,5055,5056,5057,5072,5073,5094,5095,5098,5099,2395,5114,5129,5130,5151,5152,5167,5168,5171,5172,5175,5176,5243,5244,5247,5248,5251,5252,5255],{},"As it runs, BFS computes for each vertex ",[429,5058,5060],{"className":5059},[432],[429,5061,5063],{"className":5062,"ariaHidden":437},[436],[429,5064,5066,5069],{"className":5065},[441],[429,5067],{"className":5068,"style":599},[445],[429,5070,581],{"className":5071,"style":580},[450,451]," a distance ",[429,5074,5076],{"className":5075},[432],[429,5077,5079],{"className":5078,"ariaHidden":437},[436],[429,5080,5082,5085,5088,5091],{"className":5081},[441],[429,5083],{"className":5084,"style":2135},[445],[429,5086,581],{"className":5087,"style":580},[450,451],[429,5089,871],{"className":5090},[450],[429,5092,2360],{"className":5093},[450,451],", the fewest edges\n(",[2321,5096,5097],{},"hops",") on any path from ",[429,5100,5102],{"className":5101},[432],[429,5103,5105],{"className":5104,"ariaHidden":437},[436],[429,5106,5108,5111],{"className":5107},[441],[429,5109],{"className":5110,"style":599},[445],[429,5112,4589],{"className":5113},[450,451],[429,5115,5117],{"className":5116},[432],[429,5118,5120],{"className":5119,"ariaHidden":437},[436],[429,5121,5123,5126],{"className":5122},[441],[429,5124],{"className":5125,"style":599},[445],[429,5127,581],{"className":5128,"style":580},[450,451],", and a predecessor ",[429,5131,5133],{"className":5132},[432],[429,5134,5136],{"className":5135,"ariaHidden":437},[436],[429,5137,5139,5142,5145,5148],{"className":5138},[441],[429,5140],{"className":5141,"style":599},[445],[429,5143,581],{"className":5144,"style":580},[450,451],[429,5146,871],{"className":5147},[450],[429,5149,4572],{"className":5150,"style":580},[450,451],", the vertex from\nwhich ",[429,5153,5155],{"className":5154},[432],[429,5156,5158],{"className":5157,"ariaHidden":437},[436],[429,5159,5161,5164],{"className":5160},[441],[429,5162],{"className":5163,"style":599},[445],[429,5165,581],{"className":5166,"style":580},[450,451]," was discovered. The predecessors form the ",[394,5169,5170],{},"breadth-first tree"," (or\n",[394,5173,5174],{},"shortest-path tree",") ",[429,5177,5179],{"className":5178},[432],[429,5180,5182],{"className":5181,"ariaHidden":437},[436],[429,5183,5185,5188],{"className":5184},[441],[429,5186],{"className":5187,"style":472},[445],[429,5189,5191,5194,5197,5200,5203,5206,5209,5212,5215,5218,5221,5224,5227,5230,5233,5240],{"className":5190},[560],[429,5192,566],{"className":5193,"style":565},[476,564],[429,5195,477],{"className":5196},[476],[429,5198,581],{"className":5199,"style":580},[450,451],[429,5201,871],{"className":5202},[450],[429,5204,4572],{"className":5205,"style":580},[450,451],[429,5207,487],{"className":5208},[486],[429,5210],{"className":5211,"style":491},[456],[429,5213],{"className":5214,"style":491},[456],[429,5216,581],{"className":5217,"style":580},[450,451],[429,5219,501],{"className":5220},[500],[429,5222],{"className":5223,"style":457},[456],[429,5225,1306],{"className":5226},[461],[429,5228],{"className":5229,"style":457},[456],[429,5231,581],{"className":5232,"style":580},[450,451],[429,5234,5236],{"className":5235},[450,1316],[429,5237,5239],{"className":5238},[450]," visited",[429,5241,585],{"className":5242,"style":565},[500,564],". We refine the\nsingle visited flag of the skeleton into three colors: ",[394,5245,5246],{},"white"," vertices are\nundiscovered, ",[394,5249,5250],{},"gray"," ones are discovered but still in the queue, and ",[394,5253,5254],{},"black","\nones are finished.",[4474,5257,5259],{"className":4476,"code":5258,"language":4478,"meta":376,"style":376},"caption: $\\textsc{BFS}(G, s)$ — shortest distances in hops from $s$\nnumber: 2\nforeach vertex $u \\in V \\setminus \\set{s}$ do\n  $u.color \\gets \\text{white}$\n  $u.d \\gets \\infty$\n  $u.\\pi \\gets \\text{nil}$\n$s.color \\gets \\text{gray}$ \u002F\u002F discover source\n$s.d \\gets 0$\n$s.\\pi \\gets \\text{nil}$\n$Q \\gets \\emptyset$\nenqueue$(Q, s)$\nwhile $Q \\neq \\emptyset$ do\n  $u \\gets$ dequeue$(Q)$\n  foreach $v$ adjacent to $u$ do\n    if $v.color = \\text{white}$ then \u002F\u002F first time reaching v\n      $v.color \\gets \\text{gray}$\n      $v.d \\gets u.d + 1$\n      $v.\\pi \\gets u$\n      enqueue$(Q, v)$\n  $u.color \\gets \\text{black}$\nreturn $d$ and $\\pi$\n",[4480,5260,5261,5266,5271,5276,5281,5286,5291,5296,5301,5306,5311,5316,5321,5326,5330,5336,5342,5348,5353,5359,5365],{"__ignoreMap":376},[429,5262,5263],{"class":4484,"line":6},[429,5264,5265],{},"caption: $\\textsc{BFS}(G, s)$ — shortest distances in hops from $s$\n",[429,5267,5268],{"class":4484,"line":18},[429,5269,5270],{},"number: 2\n",[429,5272,5273],{"class":4484,"line":24},[429,5274,5275],{},"foreach vertex $u \\in V \\setminus \\set{s}$ do\n",[429,5277,5278],{"class":4484,"line":73},[429,5279,5280],{},"  $u.color \\gets \\text{white}$\n",[429,5282,5283],{"class":4484,"line":102},[429,5284,5285],{},"  $u.d \\gets \\infty$\n",[429,5287,5288],{"class":4484,"line":108},[429,5289,5290],{},"  $u.\\pi \\gets \\text{nil}$\n",[429,5292,5293],{"class":4484,"line":116},[429,5294,5295],{},"$s.color \\gets \\text{gray}$ \u002F\u002F discover source\n",[429,5297,5298],{"class":4484,"line":196},[429,5299,5300],{},"$s.d \\gets 0$\n",[429,5302,5303],{"class":4484,"line":202},[429,5304,5305],{},"$s.\\pi \\gets \\text{nil}$\n",[429,5307,5308],{"class":4484,"line":283},[429,5309,5310],{},"$Q \\gets \\emptyset$\n",[429,5312,5313],{"class":4484,"line":333},[429,5314,5315],{},"enqueue$(Q, s)$\n",[429,5317,5318],{"class":4484,"line":354},[429,5319,5320],{},"while $Q \\neq \\emptyset$ do\n",[429,5322,5323],{"class":4484,"line":4545},[429,5324,5325],{},"  $u \\gets$ dequeue$(Q)$\n",[429,5327,5328],{"class":4484,"line":4551},[429,5329,4532],{},[429,5331,5333],{"class":4484,"line":5332},15,[429,5334,5335],{},"    if $v.color = \\text{white}$ then \u002F\u002F first time reaching v\n",[429,5337,5339],{"class":4484,"line":5338},16,[429,5340,5341],{},"      $v.color \\gets \\text{gray}$\n",[429,5343,5345],{"class":4484,"line":5344},17,[429,5346,5347],{},"      $v.d \\gets u.d + 1$\n",[429,5349,5351],{"class":4484,"line":5350},18,[429,5352,4548],{},[429,5354,5356],{"class":4484,"line":5355},19,[429,5357,5358],{},"      enqueue$(Q, v)$\n",[429,5360,5362],{"class":4484,"line":5361},20,[429,5363,5364],{},"  $u.color \\gets \\text{black}$\n",[429,5366,5368],{"class":4484,"line":5367},21,[429,5369,5370],{},"return $d$ and $\\pi$\n",[381,5372,5373,5376,5377,5414,5415,5417,5418,2395,5433,5448,5449,5527],{},[394,5374,5375],{},"Shortest hops, and why it is correct."," Write ",[429,5378,5380],{"className":5379},[432],[429,5381,5383],{"className":5382,"ariaHidden":437},[436],[429,5384,5386,5389,5396,5399,5402,5405,5408,5411],{"className":5385},[441],[429,5387],{"className":5388,"style":472},[445],[429,5390,5392],{"className":5391},[1255],[429,5393,5395],{"className":5394},[450,1458],"dist",[429,5397,3144],{"className":5398},[476],[429,5400,4589],{"className":5401},[450,451],[429,5403,3151],{"className":5404},[500],[429,5406,3144],{"className":5407},[476],[429,5409,581],{"className":5410,"style":580},[450,451],[429,5412,3151],{"className":5413},[500]," for the\n",[385,5416,437],{}," distance from ",[429,5419,5421],{"className":5420},[432],[429,5422,5424],{"className":5423,"ariaHidden":437},[436],[429,5425,5427,5430],{"className":5426},[441],[429,5428],{"className":5429,"style":599},[445],[429,5431,4589],{"className":5432},[450,451],[429,5434,5436],{"className":5435},[432],[429,5437,5439],{"className":5438,"ariaHidden":437},[436],[429,5440,5442,5445],{"className":5441},[441],[429,5443],{"className":5444,"style":599},[445],[429,5446,581],{"className":5447,"style":580},[450,451],", the length of the shortest directed path. The\nclaim BFS delivers is the cleanest possible: ",[394,5450,5451,5511,5512,871],{},[429,5452,5454],{"className":5453},[432],[429,5455,5457,5481],{"className":5456,"ariaHidden":437},[436],[429,5458,5460,5463,5466,5469,5472,5475,5478],{"className":5459},[441],[429,5461],{"className":5462,"style":2135},[445],[429,5464,581],{"className":5465,"style":580},[450,451],[429,5467,871],{"className":5468},[450],[429,5470,2360],{"className":5471},[450,451],[429,5473],{"className":5474,"style":457},[456],[429,5476,462],{"className":5477},[461],[429,5479],{"className":5480,"style":457},[456],[429,5482,5484,5487,5493,5496,5499,5502,5505,5508],{"className":5483},[441],[429,5485],{"className":5486,"style":472},[445],[429,5488,5490],{"className":5489},[1255],[429,5491,5395],{"className":5492},[450,1458],[429,5494,3144],{"className":5495},[476],[429,5497,4589],{"className":5498},[450,451],[429,5500,3151],{"className":5501},[500],[429,5503,3144],{"className":5504},[476],[429,5506,581],{"className":5507,"style":580},[450,451],[429,5509,3151],{"className":5510},[500],"\nfor every ",[429,5513,5515],{"className":5514},[432],[429,5516,5518],{"className":5517,"ariaHidden":437},[436],[429,5519,5521,5524],{"className":5520},[441],[429,5522],{"className":5523,"style":599},[445],[429,5525,581],{"className":5526,"style":580},[450,451]," Two facts drive the proof:",[1134,5529,5530,5672],{},[1137,5531,5532,5535,5536,5551,5552,5569,5570,5606,5607,5671],{},[385,5533,5534],{},"The queue is sorted by depth."," At every moment the ",[429,5537,5539],{"className":5538},[432],[429,5540,5542],{"className":5541,"ariaHidden":437},[436],[429,5543,5545,5548],{"className":5544},[441],[429,5546],{"className":5547,"style":2135},[445],[429,5549,2360],{"className":5550},[450,451],"-values in ",[429,5553,5555],{"className":5554},[432],[429,5556,5558],{"className":5557,"ariaHidden":437},[436],[429,5559,5561,5565],{"className":5560},[441],[429,5562],{"className":5563,"style":5564},[445],"height:0.8778em;vertical-align:-0.1944em;",[429,5566,5568],{"className":5567},[450,451],"Q"," span at\nmost two consecutive layers ",[429,5571,5573],{"className":5572},[432],[429,5574,5576],{"className":5575,"ariaHidden":437},[436],[429,5577,5579,5583,5588,5591,5594,5597,5603],{"className":5578},[441],[429,5580],{"className":5581,"style":5582},[445],"height:0.8889em;vertical-align:-0.1944em;",[429,5584,5587],{"className":5585,"style":5586},[450,451],"margin-right:0.0315em;","k",[429,5589,487],{"className":5590},[486],[429,5592],{"className":5593,"style":491},[456],[429,5595,5587],{"className":5596,"style":5586},[450,451],[429,5598,5600],{"className":5599},[450],[429,5601,855],{"className":5602},[450],[429,5604,412],{"className":5605},[450],", and never decrease as we dequeue. (BFS\nonly ever appends ",[429,5608,5610],{"className":5609},[432],[429,5611,5613,5637,5662],{"className":5612,"ariaHidden":437},[436],[429,5614,5616,5619,5622,5625,5628,5631,5634],{"className":5615},[441],[429,5617],{"className":5618,"style":2135},[445],[429,5620,581],{"className":5621,"style":580},[450,451],[429,5623,871],{"className":5624},[450],[429,5626,2360],{"className":5627},[450,451],[429,5629],{"className":5630,"style":457},[456],[429,5632,462],{"className":5633},[461],[429,5635],{"className":5636,"style":457},[456],[429,5638,5640,5644,5647,5650,5653,5656,5659],{"className":5639},[441],[429,5641],{"className":5642,"style":5643},[445],"height:0.7778em;vertical-align:-0.0833em;",[429,5645,570],{"className":5646},[450,451],[429,5648,871],{"className":5649},[450],[429,5651,2360],{"className":5652},[450,451],[429,5654],{"className":5655,"style":481},[456],[429,5657,855],{"className":5658},[854],[429,5660],{"className":5661,"style":481},[456],[429,5663,5665,5668],{"className":5664},[441],[429,5666],{"className":5667,"style":985},[445],[429,5669,412],{"className":5670},[450]," to the back.)",[1137,5673,5674,5738,5739,5760,5761,5802,5803,5818],{},[385,5675,5676,5737],{},[429,5677,5679],{"className":5678},[432],[429,5680,5682,5707],{"className":5681,"ariaHidden":437},[436],[429,5683,5685,5689,5692,5695,5698,5701,5704],{"className":5684},[441],[429,5686],{"className":5687,"style":5688},[445],"height:0.8304em;vertical-align:-0.136em;",[429,5690,581],{"className":5691,"style":580},[450,451],[429,5693,871],{"className":5694},[450],[429,5696,2360],{"className":5697},[450,451],[429,5699],{"className":5700,"style":457},[456],[429,5702,2277],{"className":5703},[461],[429,5705],{"className":5706,"style":457},[456],[429,5708,5710,5713,5719,5722,5725,5728,5731,5734],{"className":5709},[441],[429,5711],{"className":5712,"style":472},[445],[429,5714,5716],{"className":5715},[1255],[429,5717,5395],{"className":5718},[450,1458],[429,5720,3144],{"className":5721},[476],[429,5723,4589],{"className":5724},[450,451],[429,5726,3151],{"className":5727},[500],[429,5729,3144],{"className":5730},[476],[429,5732,581],{"className":5733,"style":580},[450,451],[429,5735,3151],{"className":5736},[500]," always",", because ",[429,5740,5742],{"className":5741},[432],[429,5743,5745],{"className":5744,"ariaHidden":437},[436],[429,5746,5748,5751,5754,5757],{"className":5747},[441],[429,5749],{"className":5750,"style":2135},[445],[429,5752,581],{"className":5753,"style":580},[450,451],[429,5755,871],{"className":5756},[450],[429,5758,2360],{"className":5759},[450,451]," is the length of an\nactual ",[429,5762,5764],{"className":5763},[432],[429,5765,5767,5793],{"className":5766,"ariaHidden":437},[436],[429,5768,5770,5773,5776,5780,5783,5787,5790],{"className":5769},[441],[429,5771],{"className":5772,"style":599},[445],[429,5774,4589],{"className":5775},[450,451],[429,5777],{"className":5778,"style":5779},[456],"margin-right:-0.1667em;",[429,5781],{"className":5782,"style":457},[456],[429,5784,5786],{"className":5785},[461],"→",[429,5788],{"className":5789,"style":5779},[456],[429,5791],{"className":5792,"style":457},[456],[429,5794,5796,5799],{"className":5795},[441],[429,5797],{"className":5798,"style":599},[445],[429,5800,581],{"className":5801,"style":580},[450,451]," path (trace the ",[429,5804,5806],{"className":5805},[432],[429,5807,5809],{"className":5808,"ariaHidden":437},[436],[429,5810,5812,5815],{"className":5811},[441],[429,5813],{"className":5814,"style":599},[445],[429,5816,4572],{"className":5817,"style":580},[450,451]," pointers), and no path beats the\nshortest one.",[381,5820,5821,5822,5876,5877,5892,5893,5908,5909,5942,5943,6000,6001,6031,6032,6047,6048,6063,6064,6079,6080,6161,6162,6222,6223,6238,6239,6254,6255,6270,6271,6274,6275,6290,6291,6306],{},"For the reverse inequality, induct on ",[429,5823,5825],{"className":5824},[432],[429,5826,5828,5867],{"className":5827,"ariaHidden":437},[436],[429,5829,5831,5834,5840,5843,5846,5849,5852,5855,5858,5861,5864],{"className":5830},[441],[429,5832],{"className":5833,"style":472},[445],[429,5835,5837],{"className":5836},[1255],[429,5838,5395],{"className":5839},[450,1458],[429,5841,3144],{"className":5842},[476],[429,5844,4589],{"className":5845},[450,451],[429,5847,3151],{"className":5848},[500],[429,5850,3144],{"className":5851},[476],[429,5853,581],{"className":5854,"style":580},[450,451],[429,5856,3151],{"className":5857},[500],[429,5859],{"className":5860,"style":457},[456],[429,5862,462],{"className":5863},[461],[429,5865],{"className":5866,"style":457},[456],[429,5868,5870,5873],{"className":5869},[441],[429,5871],{"className":5872,"style":2135},[445],[429,5874,5587],{"className":5875,"style":5586},[450,451],". A vertex\nat true distance ",[429,5878,5880],{"className":5879},[432],[429,5881,5883],{"className":5882,"ariaHidden":437},[436],[429,5884,5886,5889],{"className":5885},[441],[429,5887],{"className":5888,"style":2135},[445],[429,5890,5587],{"className":5891,"style":5586},[450,451]," has some neighbor ",[429,5894,5896],{"className":5895},[432],[429,5897,5899],{"className":5898,"ariaHidden":437},[436],[429,5900,5902,5905],{"className":5901},[441],[429,5903],{"className":5904,"style":599},[445],[429,5906,570],{"className":5907},[450,451]," at true distance ",[429,5910,5912],{"className":5911},[432],[429,5913,5915,5933],{"className":5914,"ariaHidden":437},[436],[429,5916,5918,5921,5924,5927,5930],{"className":5917},[441],[429,5919],{"className":5920,"style":5643},[445],[429,5922,5587],{"className":5923,"style":5586},[450,451],[429,5925],{"className":5926,"style":481},[456],[429,5928,2754],{"className":5929},[854],[429,5931],{"className":5932,"style":481},[456],[429,5934,5936,5939],{"className":5935},[441],[429,5937],{"className":5938,"style":985},[445],[429,5940,412],{"className":5941},[450],"; by induction\n",[429,5944,5946],{"className":5945},[432],[429,5947,5949,5973,5991],{"className":5948,"ariaHidden":437},[436],[429,5950,5952,5955,5958,5961,5964,5967,5970],{"className":5951},[441],[429,5953],{"className":5954,"style":2135},[445],[429,5956,570],{"className":5957},[450,451],[429,5959,871],{"className":5960},[450],[429,5962,2360],{"className":5963},[450,451],[429,5965],{"className":5966,"style":457},[456],[429,5968,462],{"className":5969},[461],[429,5971],{"className":5972,"style":457},[456],[429,5974,5976,5979,5982,5985,5988],{"className":5975},[441],[429,5977],{"className":5978,"style":5643},[445],[429,5980,5587],{"className":5981,"style":5586},[450,451],[429,5983],{"className":5984,"style":481},[456],[429,5986,2754],{"className":5987},[854],[429,5989],{"className":5990,"style":481},[456],[429,5992,5994,5997],{"className":5993},[441],[429,5995],{"className":5996,"style":985},[445],[429,5998,412],{"className":5999},[450],", and since all depth-",[429,6002,6004],{"className":6003},[432],[429,6005,6007],{"className":6006,"ariaHidden":437},[436],[429,6008,6010,6013,6016,6019,6025,6028],{"className":6009},[441],[429,6011],{"className":6012,"style":472},[445],[429,6014,477],{"className":6015},[476],[429,6017,5587],{"className":6018,"style":5586},[450,451],[429,6020,6022],{"className":6021},[450],[429,6023,2754],{"className":6024},[450],[429,6026,412],{"className":6027},[450],[429,6029,501],{"className":6030},[500]," vertices are dequeued before any\ndepth-",[429,6033,6035],{"className":6034},[432],[429,6036,6038],{"className":6037,"ariaHidden":437},[436],[429,6039,6041,6044],{"className":6040},[441],[429,6042],{"className":6043,"style":2135},[445],[429,6045,5587],{"className":6046,"style":5586},[450,451]," vertex is processed, ",[429,6049,6051],{"className":6050},[432],[429,6052,6054],{"className":6053,"ariaHidden":437},[436],[429,6055,6057,6060],{"className":6056},[441],[429,6058],{"className":6059,"style":599},[445],[429,6061,581],{"className":6062,"style":580},[450,451]," is white when BFS scans ",[429,6065,6067],{"className":6066},[432],[429,6068,6070],{"className":6069,"ariaHidden":437},[436],[429,6071,6073,6076],{"className":6072},[441],[429,6074],{"className":6075,"style":599},[445],[429,6077,570],{"className":6078},[450,451],"'s list and gets\n",[429,6081,6083],{"className":6082},[432],[429,6084,6086,6110,6134,6152],{"className":6085,"ariaHidden":437},[436],[429,6087,6089,6092,6095,6098,6101,6104,6107],{"className":6088},[441],[429,6090],{"className":6091,"style":2135},[445],[429,6093,581],{"className":6094,"style":580},[450,451],[429,6096,871],{"className":6097},[450],[429,6099,2360],{"className":6100},[450,451],[429,6102],{"className":6103,"style":457},[456],[429,6105,462],{"className":6106},[461],[429,6108],{"className":6109,"style":457},[456],[429,6111,6113,6116,6119,6122,6125,6128,6131],{"className":6112},[441],[429,6114],{"className":6115,"style":5643},[445],[429,6117,570],{"className":6118},[450,451],[429,6120,871],{"className":6121},[450],[429,6123,2360],{"className":6124},[450,451],[429,6126],{"className":6127,"style":481},[456],[429,6129,855],{"className":6130},[854],[429,6132],{"className":6133,"style":481},[456],[429,6135,6137,6140,6143,6146,6149],{"className":6136},[441],[429,6138],{"className":6139,"style":985},[445],[429,6141,412],{"className":6142},[450],[429,6144],{"className":6145,"style":457},[456],[429,6147,462],{"className":6148},[461],[429,6150],{"className":6151,"style":457},[456],[429,6153,6155,6158],{"className":6154},[441],[429,6156],{"className":6157,"style":2135},[445],[429,6159,5587],{"className":6160,"style":5586},[450,451],". Hence ",[429,6163,6165],{"className":6164},[432],[429,6166,6168,6192],{"className":6167,"ariaHidden":437},[436],[429,6169,6171,6174,6177,6180,6183,6186,6189],{"className":6170},[441],[429,6172],{"className":6173,"style":2135},[445],[429,6175,581],{"className":6176,"style":580},[450,451],[429,6178,871],{"className":6179},[450],[429,6181,2360],{"className":6182},[450,451],[429,6184],{"className":6185,"style":457},[456],[429,6187,462],{"className":6188},[461],[429,6190],{"className":6191,"style":457},[456],[429,6193,6195,6198,6204,6207,6210,6213,6216,6219],{"className":6194},[441],[429,6196],{"className":6197,"style":472},[445],[429,6199,6201],{"className":6200},[1255],[429,6202,5395],{"className":6203},[450,1458],[429,6205,3144],{"className":6206},[476],[429,6208,4589],{"className":6209},[450,451],[429,6211,3151],{"className":6212},[500],[429,6214,3144],{"className":6215},[476],[429,6217,581],{"className":6218,"style":580},[450,451],[429,6220,3151],{"className":6221},[500],", and following ",[429,6224,6226],{"className":6225},[432],[429,6227,6229],{"className":6228,"ariaHidden":437},[436],[429,6230,6232,6235],{"className":6231},[441],[429,6233],{"className":6234,"style":599},[445],[429,6236,4572],{"className":6237,"style":580},[450,451],"\npointers from ",[429,6240,6242],{"className":6241},[432],[429,6243,6245],{"className":6244,"ariaHidden":437},[436],[429,6246,6248,6251],{"className":6247},[441],[429,6249],{"className":6250,"style":599},[445],[429,6252,581],{"className":6253,"style":580},[450,451]," back to ",[429,6256,6258],{"className":6257},[432],[429,6259,6261],{"className":6260,"ariaHidden":437},[436],[429,6262,6264,6267],{"className":6263},[441],[429,6265],{"className":6266,"style":599},[445],[429,6268,4589],{"className":6269},[450,451]," traces an actual shortest path in reverse: ",[385,6272,6273],{},"the","\nunique ",[429,6276,6278],{"className":6277},[432],[429,6279,6281],{"className":6280,"ariaHidden":437},[436],[429,6282,6284,6287],{"className":6283},[441],[429,6285],{"className":6286,"style":599},[445],[429,6288,4589],{"className":6289},[450,451],"-to-",[429,6292,6294],{"className":6293},[432],[429,6295,6297],{"className":6296,"ariaHidden":437},[436],[429,6298,6300,6303],{"className":6299},[441],[429,6301],{"className":6302,"style":599},[445],[429,6304,581],{"className":6305,"style":580},[450,451]," path in the BFS tree.",[381,6308,6309,6312,6313,6337,6338,6353,6354,6378,6379,6421,6422],{},[394,6310,6311],{},"Running time."," Initialization touches every vertex once: ",[429,6314,6316],{"className":6315},[432],[429,6317,6319],{"className":6318,"ariaHidden":437},[436],[429,6320,6322,6325,6328,6331,6334],{"className":6321},[441],[429,6323],{"className":6324,"style":472},[445],[429,6326,3038],{"className":6327},[450],[429,6329,477],{"className":6330},[476],[429,6332,482],{"className":6333,"style":481},[450,451],[429,6335,501],{"className":6336},[500],". Each\nvertex is enqueued and dequeued exactly once (only white vertices are enqueued,\nand they are immediately grayed), and when we dequeue ",[429,6339,6341],{"className":6340},[432],[429,6342,6344],{"className":6343,"ariaHidden":437},[436],[429,6345,6347,6350],{"className":6346},[441],[429,6348],{"className":6349,"style":599},[445],[429,6351,570],{"className":6352},[450,451]," we scan its adjacency\nlist once. The scans together examine every edge a constant number of times, for\n",[429,6355,6357],{"className":6356},[432],[429,6358,6360],{"className":6359,"ariaHidden":437},[436],[429,6361,6363,6366,6369,6372,6375],{"className":6362},[441],[429,6364],{"className":6365,"style":472},[445],[429,6367,3038],{"className":6368},[450],[429,6370,477],{"className":6371},[476],[429,6373,496],{"className":6374,"style":495},[450,451],[429,6376,501],{"className":6377},[500]," total. Hence BFS runs in ",[429,6380,6382],{"className":6381},[432],[429,6383,6385,6409],{"className":6384,"ariaHidden":437},[436],[429,6386,6388,6391,6394,6397,6400,6403,6406],{"className":6387},[441],[429,6389],{"className":6390,"style":472},[445],[429,6392,841],{"className":6393,"style":840},[450,451],[429,6395,477],{"className":6396},[476],[429,6398,482],{"className":6399,"style":481},[450,451],[429,6401],{"className":6402,"style":481},[456],[429,6404,855],{"className":6405},[854],[429,6407],{"className":6408,"style":481},[456],[429,6410,6412,6415,6418],{"className":6411},[441],[429,6413],{"className":6414,"style":472},[445],[429,6416,496],{"className":6417,"style":495},[450,451],[429,6419,501],{"className":6420},[500],", linear in the size of the\ngraph, the gold standard for graph algorithms.",[403,6423,6424],{},[406,6425,2290],{"href":6426,"ariaDescribedBy":6427,"dataFootnoteRef":376,"id":6428},"#user-content-fn-clrs-bfs",[410],"user-content-fnref-clrs-bfs",[381,6430,6431,6434,6435,6450,6451,6707,6708,6777,6778,6793,6794,6797,6798,6813,6814,6817],{},[394,6432,6433],{},"A worked run."," Take this small digraph and run BFS from ",[429,6436,6438],{"className":6437},[432],[429,6439,6441],{"className":6440,"ariaHidden":437},[436],[429,6442,6444,6447],{"className":6443},[441],[429,6445],{"className":6446,"style":599},[445],[429,6448,4589],{"className":6449},[450,451],". The queue\nevolves ",[429,6452,6454],{"className":6453},[432],[429,6455,6457,6481,6525,6567,6600,6633,6668,6692],{"className":6456,"ariaHidden":437},[436],[429,6458,6460,6463,6466,6469,6472,6475,6478],{"className":6459},[441],[429,6461],{"className":6462,"style":472},[445],[429,6464,3144],{"className":6465},[476],[429,6467,4589],{"className":6468},[450,451],[429,6470,3151],{"className":6471},[500],[429,6473],{"className":6474,"style":457},[456],[429,6476,5786],{"className":6477},[461],[429,6479],{"className":6480,"style":457},[456],[429,6482,6484,6487,6490,6493,6496,6499,6503,6506,6509,6513,6516,6519,6522],{"className":6483},[441],[429,6485],{"className":6486,"style":472},[445],[429,6488,3144],{"className":6489},[476],[429,6491,406],{"className":6492},[450,451],[429,6494,487],{"className":6495},[486],[429,6497],{"className":6498,"style":491},[456],[429,6500,6502],{"className":6501},[450,451],"b",[429,6504,487],{"className":6505},[486],[429,6507],{"className":6508,"style":491},[456],[429,6510,6512],{"className":6511},[450,451],"c",[429,6514,3151],{"className":6515},[500],[429,6517],{"className":6518,"style":457},[456],[429,6520,5786],{"className":6521},[461],[429,6523],{"className":6524,"style":457},[456],[429,6526,6528,6531,6534,6537,6540,6543,6546,6549,6552,6555,6558,6561,6564],{"className":6527},[441],[429,6529],{"className":6530,"style":472},[445],[429,6532,3144],{"className":6533},[476],[429,6535,6502],{"className":6536},[450,451],[429,6538,487],{"className":6539},[486],[429,6541],{"className":6542,"style":491},[456],[429,6544,6512],{"className":6545},[450,451],[429,6547,487],{"className":6548},[486],[429,6550],{"className":6551,"style":491},[456],[429,6553,966],{"className":6554},[450,451],[429,6556,3151],{"className":6557},[500],[429,6559],{"className":6560,"style":457},[456],[429,6562,5786],{"className":6563},[461],[429,6565],{"className":6566,"style":457},[456],[429,6568,6570,6573,6576,6579,6582,6585,6588,6591,6594,6597],{"className":6569},[441],[429,6571],{"className":6572,"style":472},[445],[429,6574,3144],{"className":6575},[476],[429,6577,6512],{"className":6578},[450,451],[429,6580,487],{"className":6581},[486],[429,6583],{"className":6584,"style":491},[456],[429,6586,966],{"className":6587},[450,451],[429,6589,3151],{"className":6590},[500],[429,6592],{"className":6593,"style":457},[456],[429,6595,5786],{"className":6596},[461],[429,6598],{"className":6599,"style":457},[456],[429,6601,6603,6606,6609,6612,6615,6618,6621,6624,6627,6630],{"className":6602},[441],[429,6604],{"className":6605,"style":472},[445],[429,6607,3144],{"className":6608},[476],[429,6610,966],{"className":6611},[450,451],[429,6613,487],{"className":6614},[486],[429,6616],{"className":6617,"style":491},[456],[429,6619,1260],{"className":6620,"style":580},[450,451],[429,6622,3151],{"className":6623},[500],[429,6625],{"className":6626,"style":457},[456],[429,6628,5786],{"className":6629},[461],[429,6631],{"className":6632,"style":457},[456],[429,6634,6636,6639,6642,6645,6648,6651,6656,6659,6662,6665],{"className":6635},[441],[429,6637],{"className":6638,"style":472},[445],[429,6640,3144],{"className":6641},[476],[429,6643,1260],{"className":6644,"style":580},[450,451],[429,6646,487],{"className":6647},[486],[429,6649],{"className":6650,"style":491},[456],[429,6652,6655],{"className":6653,"style":6654},[450,451],"margin-right:0.1076em;","f",[429,6657,3151],{"className":6658},[500],[429,6660],{"className":6661,"style":457},[456],[429,6663,5786],{"className":6664},[461],[429,6666],{"className":6667,"style":457},[456],[429,6669,6671,6674,6677,6680,6683,6686,6689],{"className":6670},[441],[429,6672],{"className":6673,"style":472},[445],[429,6675,3144],{"className":6676},[476],[429,6678,6655],{"className":6679,"style":6654},[450,451],[429,6681,3151],{"className":6682},[500],[429,6684],{"className":6685,"style":457},[456],[429,6687,5786],{"className":6688},[461],[429,6690],{"className":6691,"style":457},[456],[429,6693,6695,6698,6701,6704],{"className":6694},[441],[429,6696],{"className":6697,"style":472},[445],[429,6699,3144],{"className":6700},[476],[429,6702],{"className":6703,"style":491},[456],[429,6705,3151],{"className":6706},[500],", discovering vertices in the order ",[429,6709,6711],{"className":6710},[432],[429,6712,6714],{"className":6713,"ariaHidden":437},[436],[429,6715,6717,6720,6723,6726,6729,6732,6735,6738,6741,6744,6747,6750,6753,6756,6759,6762,6765,6768,6771,6774],{"className":6716},[441],[429,6718],{"className":6719,"style":5582},[445],[429,6721,4589],{"className":6722},[450,451],[429,6724,487],{"className":6725},[486],[429,6727],{"className":6728,"style":491},[456],[429,6730,406],{"className":6731},[450,451],[429,6733,487],{"className":6734},[486],[429,6736],{"className":6737,"style":491},[456],[429,6739,6502],{"className":6740},[450,451],[429,6742,487],{"className":6743},[486],[429,6745],{"className":6746,"style":491},[456],[429,6748,6512],{"className":6749},[450,451],[429,6751,487],{"className":6752},[486],[429,6754],{"className":6755,"style":491},[456],[429,6757,966],{"className":6758},[450,451],[429,6760,487],{"className":6761},[486],[429,6763],{"className":6764,"style":491},[456],[429,6766,1260],{"className":6767,"style":580},[450,451],[429,6769,487],{"className":6770},[486],[429,6772],{"className":6773,"style":491},[456],[429,6775,6655],{"className":6776,"style":6654},[450,451],". The resulting\n",[429,6779,6781],{"className":6780},[432],[429,6782,6784],{"className":6783,"ariaHidden":437},[436],[429,6785,6787,6790],{"className":6786},[441],[429,6788],{"className":6789,"style":2135},[445],[429,6791,2360],{"className":6792},[450,451],"-values sort the vertices into ",[394,6795,6796],{},"layers"," by distance from ",[429,6799,6801],{"className":6800},[432],[429,6802,6804],{"className":6803,"ariaHidden":437},[436],[429,6805,6807,6810],{"className":6806},[441],[429,6808],{"className":6809,"style":599},[445],[429,6811,4589],{"className":6812},[450,451],", which let us\nread off shortest ",[406,6815,6816],{"href":175},"BFS distances"," directly:",[2506,6819,6821,7062],{"className":6820},[2509,2510],[2512,6822,6826],{"xmlns":2514,"width":6823,"height":6824,"viewBox":6825},"358.509","268.105","-75 -75 268.882 201.079",[1260,6827,6828,6831,6837,6840,6847,6850,6857,6860,6867,6870,6877,6880,6887,6890,6897,6900,6907,6916,6924,6932,6940,6948,6956,6966,6975,6984,7005,7024,7043],{"stroke":2520,"style":2521},[2255,6829],{"fill":2524,"d":6830},"M54.132-60.689c0-6.286-5.095-11.381-11.38-11.381S31.37-66.975 31.37-60.689s5.096 11.381 11.381 11.381 11.381-5.095 11.381-11.38Zm-11.38 0",[1260,6832,6833],{"transform":2528},[2255,6834],{"d":6835,"fill":2520,"stroke":2520,"className":6836,"style":2534},"M43.586-61.238Q43.806-60.852 44.562-60.852Q44.860-60.852 45.155-60.953Q45.449-61.054 45.643-61.267Q45.836-61.480 45.836-61.788Q45.836-62.016 45.658-62.163Q45.480-62.311 45.234-62.363L44.724-62.460Q44.509-62.500 44.333-62.623Q44.157-62.746 44.052-62.932Q43.946-63.119 43.946-63.335Q43.946-63.734 44.170-64.040Q44.395-64.345 44.753-64.506Q45.111-64.666 45.515-64.666Q45.779-64.666 46.027-64.587Q46.275-64.508 46.445-64.328Q46.614-64.147 46.614-63.884Q46.614-63.677 46.493-63.519Q46.372-63.361 46.161-63.361Q46.038-63.361 45.952-63.442Q45.867-63.523 45.867-63.642Q45.867-63.805 45.990-63.939Q46.113-64.073 46.271-64.073Q46.183-64.253 45.966-64.330Q45.748-64.407 45.498-64.407Q45.256-64.407 45.030-64.319Q44.803-64.231 44.658-64.062Q44.513-63.893 44.513-63.642Q44.513-63.466 44.645-63.348Q44.777-63.229 44.975-63.181L45.480-63.084Q45.867-63.005 46.135-62.735Q46.403-62.464 46.403-62.082Q46.403-61.752 46.214-61.432Q46.025-61.111 45.748-60.913Q45.247-60.588 44.553-60.588Q44.241-60.588 43.940-60.674Q43.639-60.759 43.434-60.957Q43.230-61.155 43.230-61.462Q43.230-61.713 43.373-61.897Q43.516-62.082 43.757-62.082Q43.911-62.082 44.010-61.990Q44.109-61.897 44.109-61.752Q44.109-61.542 43.957-61.390Q43.806-61.238 43.586-61.238",[2533],[2255,6838],{"fill":2524,"d":6839},"M-2.08-10.167c0-6.286-5.095-11.382-11.38-11.382s-11.382 5.096-11.382 11.382 5.096 11.38 11.381 11.38S-2.08-3.881-2.08-10.166Zm-11.38 0",[1260,6841,6843],{"transform":6842},"translate(-58.662 52.459)",[2255,6844],{"d":6845,"fill":2520,"stroke":2520,"className":6846,"style":2534},"M44.373-60.588Q43.977-60.588 43.691-60.792Q43.406-60.997 43.259-61.331Q43.111-61.665 43.111-62.056Q43.111-62.491 43.285-62.952Q43.459-63.414 43.771-63.805Q44.083-64.196 44.493-64.431Q44.904-64.666 45.344-64.666Q45.612-64.666 45.829-64.528Q46.047-64.389 46.179-64.143Q46.218-64.293 46.326-64.389Q46.434-64.486 46.574-64.486Q46.697-64.486 46.781-64.413Q46.864-64.341 46.864-64.218Q46.864-64.165 46.855-64.134L46.236-61.643Q46.179-61.445 46.179-61.247Q46.179-60.852 46.442-60.852Q46.728-60.852 46.862-61.175Q46.996-61.498 47.115-62.003Q47.124-62.034 47.148-62.058Q47.172-62.082 47.207-62.082L47.313-62.082Q47.361-62.082 47.383-62.049Q47.405-62.016 47.405-61.968Q47.291-61.537 47.200-61.284Q47.110-61.032 46.917-60.810Q46.724-60.588 46.425-60.588Q46.117-60.588 45.869-60.759Q45.621-60.931 45.550-61.221Q45.295-60.935 44.999-60.762Q44.702-60.588 44.373-60.588M44.390-60.852Q44.720-60.852 45.030-61.093Q45.339-61.335 45.550-61.651Q45.559-61.660 45.559-61.678L46.056-63.642Q45.999-63.959 45.807-64.183Q45.616-64.407 45.326-64.407Q44.957-64.407 44.658-64.088Q44.359-63.770 44.192-63.361Q44.056-63.014 43.931-62.504Q43.806-61.994 43.806-61.669Q43.806-61.344 43.944-61.098Q44.083-60.852 44.390-60.852",[2533],[2255,6848],{"fill":2524,"d":6849},"M54.132-3.383c0-6.286-5.095-11.382-11.38-11.382S31.37-9.669 31.37-3.383s5.096 11.38 11.381 11.38 11.381-5.095 11.381-11.38Zm-11.38 0",[1260,6851,6853],{"transform":6852},"translate(-1.982 60.43)",[2255,6854],{"d":6855,"fill":2520,"stroke":2520,"className":6856,"style":2534},"M44.373-60.588Q43.797-60.588 43.476-61.019Q43.155-61.449 43.155-62.029Q43.155-62.434 43.239-62.662L44.118-66.160Q44.153-66.310 44.153-66.384Q44.153-66.521 43.586-66.521Q43.489-66.521 43.489-66.639Q43.489-66.696 43.520-66.767Q43.551-66.837 43.617-66.837L44.838-66.934Q44.891-66.934 44.924-66.905Q44.957-66.876 44.957-66.828L44.957-66.793L44.298-64.183Q44.821-64.666 45.344-64.666Q45.730-64.666 46.021-64.462Q46.311-64.257 46.458-63.923Q46.605-63.589 46.605-63.198Q46.605-62.614 46.302-62.005Q45.999-61.397 45.478-60.992Q44.957-60.588 44.373-60.588M44.390-60.852Q44.759-60.852 45.063-61.175Q45.366-61.498 45.524-61.893Q45.669-62.249 45.790-62.757Q45.911-63.264 45.911-63.585Q45.911-63.910 45.766-64.158Q45.621-64.407 45.326-64.407Q44.724-64.407 44.153-63.607L43.911-62.614Q43.766-61.990 43.766-61.726Q43.766-61.383 43.918-61.117Q44.069-60.852 44.390-60.852",[2533],[2255,6858],{"fill":2524,"d":6859},"M110.344-10.167c0-6.286-5.095-11.382-11.38-11.382s-11.382 5.096-11.382 11.382 5.096 11.38 11.381 11.38 11.381-5.095 11.381-11.38Zm-11.38 0",[1260,6861,6863],{"transform":6862},"translate(54.21 52.459)",[2255,6864],{"d":6865,"fill":2520,"stroke":2520,"className":6866,"style":2534},"M43.841-61.796Q43.841-61.401 44.054-61.126Q44.267-60.852 44.649-60.852Q45.194-60.852 45.700-61.087Q46.205-61.322 46.522-61.744Q46.543-61.779 46.605-61.779Q46.662-61.779 46.708-61.728Q46.754-61.678 46.754-61.625Q46.754-61.590 46.728-61.564Q46.381-61.089 45.818-60.838Q45.256-60.588 44.632-60.588Q44.201-60.588 43.852-60.790Q43.502-60.992 43.311-61.348Q43.120-61.704 43.120-62.130Q43.120-62.592 43.322-63.049Q43.524-63.506 43.880-63.875Q44.236-64.244 44.680-64.455Q45.124-64.666 45.594-64.666Q45.862-64.666 46.111-64.585Q46.359-64.503 46.526-64.325Q46.693-64.147 46.693-63.884Q46.693-63.647 46.543-63.469Q46.394-63.291 46.161-63.291Q46.021-63.291 45.915-63.385Q45.810-63.480 45.810-63.625Q45.810-63.827 45.957-63.981Q46.104-64.134 46.306-64.134Q46.201-64.275 45.996-64.341Q45.792-64.407 45.585-64.407Q45.049-64.407 44.652-63.978Q44.254-63.550 44.047-62.930Q43.841-62.311 43.841-61.796",[2533],[2255,6868],{"fill":2524,"d":6869},"M54.132 53.922c0-6.286-5.095-11.381-11.38-11.381S31.37 47.636 31.37 53.922s5.096 11.381 11.381 11.381 11.381-5.095 11.381-11.381Zm-11.38 0",[1260,6871,6873],{"transform":6872},"translate(-2.15 116.548)",[2255,6874],{"d":6875,"fill":2520,"stroke":2520,"className":6876,"style":2534},"M43.867-61.867Q43.867-61.454 44.063-61.153Q44.258-60.852 44.649-60.852Q45.194-60.852 45.700-61.087Q46.205-61.322 46.522-61.744Q46.543-61.779 46.605-61.779Q46.662-61.779 46.708-61.728Q46.754-61.678 46.754-61.625Q46.754-61.590 46.728-61.564Q46.381-61.089 45.818-60.838Q45.256-60.588 44.632-60.588Q43.959-60.588 43.562-61.069Q43.164-61.550 43.164-62.236Q43.164-62.882 43.498-63.447Q43.832-64.011 44.392-64.339Q44.953-64.666 45.594-64.666Q45.999-64.666 46.306-64.464Q46.614-64.262 46.614-63.884Q46.614-63.484 46.348-63.244Q46.082-63.005 45.665-62.893Q45.247-62.781 44.871-62.757Q44.496-62.732 44.030-62.732L43.995-62.732Q43.867-62.170 43.867-61.867M44.065-62.992Q44.926-62.992 45.585-63.148Q46.245-63.304 46.245-63.875Q46.245-64.126 46.045-64.266Q45.845-64.407 45.585-64.407Q45.014-64.407 44.623-64Q44.232-63.594 44.065-62.992",[2533],[2255,6878],{"fill":2524,"d":6879},"M110.344 47.138c0-6.286-5.095-11.381-11.38-11.381s-11.382 5.095-11.382 11.381 5.096 11.381 11.381 11.381 11.381-5.095 11.381-11.381Zm-11.38 0",[1260,6881,6883],{"transform":6882},"translate(53.845 108.89)",[2255,6884],{"d":6885,"fill":2520,"stroke":2520,"className":6886,"style":2534},"M42.896-59.410Q42.896-59.630 43.048-59.795Q43.199-59.960 43.419-59.960Q43.560-59.960 43.663-59.867Q43.766-59.775 43.766-59.626Q43.766-59.309 43.472-59.160Q43.713-59.107 44.219-59.107Q44.636-59.107 44.992-59.410Q45.348-59.713 45.449-60.122L45.713-61.155Q45.190-60.689 44.676-60.689Q44.285-60.689 43.997-60.885Q43.709-61.080 43.553-61.418Q43.397-61.757 43.397-62.130Q43.397-62.706 43.702-63.299Q44.008-63.893 44.524-64.279Q45.041-64.666 45.621-64.666Q45.876-64.666 46.106-64.523Q46.337-64.380 46.460-64.152Q46.495-64.297 46.605-64.391Q46.715-64.486 46.855-64.486Q46.983-64.486 47.062-64.413Q47.141-64.341 47.141-64.218Q47.141-64.165 47.132-64.134L46.126-60.087Q46.025-59.696 45.726-59.417Q45.427-59.138 45.021-58.991Q44.614-58.843 44.219-58.843Q43.687-58.843 43.292-58.942Q42.896-59.041 42.896-59.410M44.693-60.948Q45.027-60.948 45.322-61.175Q45.616-61.401 45.849-61.735L46.333-63.668Q46.275-63.981 46.089-64.194Q45.902-64.407 45.603-64.407Q45.238-64.407 44.942-64.099Q44.645-63.792 44.469-63.378Q44.342-63.049 44.221-62.550Q44.100-62.051 44.100-61.752Q44.100-61.436 44.245-61.192Q44.390-60.948 44.693-60.948",[2533],[2255,6888],{"fill":2524,"d":6889},"M54.132 111.227c0-6.285-5.095-11.38-11.38-11.38s-11.382 5.095-11.382 11.38 5.096 11.382 11.381 11.382 11.381-5.096 11.381-11.382Zm-11.38 0",[1260,6891,6893],{"transform":6892},"translate(-2.734 174.166)",[2255,6894],{"d":6895,"fill":2520,"stroke":2520,"className":6896,"style":2534},"M43.687-59.212Q43.832-59.107 44.065-59.107Q44.346-59.107 44.535-59.608Q44.623-59.854 45.036-62.056L45.449-64.253L44.658-64.253Q44.562-64.253 44.562-64.372Q44.562-64.429 44.592-64.499Q44.623-64.569 44.685-64.569L45.506-64.569L45.612-65.163Q45.665-65.426 45.704-65.609Q45.744-65.791 45.814-66.004Q45.884-66.217 45.946-66.340Q46.104-66.644 46.374-66.839Q46.645-67.035 46.952-67.035Q47.291-67.035 47.545-66.870Q47.800-66.705 47.800-66.393Q47.800-66.165 47.649-65.995Q47.497-65.826 47.277-65.826Q47.128-65.826 47.022-65.921Q46.917-66.015 46.917-66.160Q46.917-66.340 47.042-66.485Q47.168-66.630 47.352-66.666Q47.207-66.771 46.952-66.771Q46.750-66.771 46.574-66.503Q46.513-66.336 46.297-65.154L46.188-64.569L47.132-64.569Q47.185-64.569 47.214-64.536Q47.242-64.503 47.242-64.460Q47.242-64.389 47.209-64.321Q47.176-64.253 47.115-64.253L46.135-64.253L45.722-62.047Q45.643-61.577 45.531-61.063Q45.418-60.548 45.234-60.045Q45.049-59.542 44.753-59.193Q44.456-58.843 44.056-58.843Q43.850-58.843 43.665-58.916Q43.480-58.988 43.360-59.133Q43.239-59.278 43.239-59.485Q43.239-59.713 43.390-59.883Q43.542-60.052 43.766-60.052Q43.911-60.052 44.014-59.960Q44.118-59.867 44.118-59.718Q44.118-59.538 43.995-59.390Q43.872-59.243 43.687-59.212",[2533],[2255,6898],{"fill":2524,"d":6899},"M190.412-10.167c0-6.286-5.095-11.382-11.381-11.382s-11.381 5.096-11.381 11.382 5.095 11.38 11.38 11.38c6.287 0 11.382-5.095 11.382-11.38Zm-11.381 0",[1260,6901,6903],{"transform":6902},"translate(133.883 53.646)",[2255,6904],{"d":6905,"fill":2520,"stroke":2520,"className":6906,"style":2534},"M44.373-60.588Q43.977-60.588 43.691-60.792Q43.406-60.997 43.259-61.331Q43.111-61.665 43.111-62.056Q43.111-62.491 43.285-62.952Q43.459-63.414 43.771-63.805Q44.083-64.196 44.493-64.431Q44.904-64.666 45.344-64.666Q45.612-64.666 45.829-64.528Q46.047-64.389 46.179-64.143L46.684-66.160Q46.719-66.310 46.719-66.384Q46.719-66.521 46.152-66.521Q46.056-66.521 46.056-66.639Q46.056-66.696 46.086-66.767Q46.117-66.837 46.179-66.837L47.405-66.934Q47.458-66.934 47.488-66.905Q47.519-66.876 47.519-66.828L47.519-66.793L46.236-61.643Q46.236-61.585 46.207-61.454Q46.179-61.322 46.179-61.247Q46.179-60.852 46.442-60.852Q46.728-60.852 46.862-61.175Q46.996-61.498 47.115-62.003Q47.124-62.034 47.148-62.058Q47.172-62.082 47.207-62.082L47.313-62.082Q47.361-62.082 47.383-62.049Q47.405-62.016 47.405-61.968Q47.291-61.537 47.200-61.284Q47.110-61.032 46.917-60.810Q46.724-60.588 46.425-60.588Q46.117-60.588 45.869-60.759Q45.621-60.931 45.550-61.221Q45.295-60.935 44.999-60.762Q44.702-60.588 44.373-60.588M44.390-60.852Q44.720-60.852 45.030-61.093Q45.339-61.335 45.550-61.651Q45.559-61.660 45.559-61.687L46.056-63.642Q45.999-63.959 45.807-64.183Q45.616-64.407 45.326-64.407Q44.957-64.407 44.658-64.088Q44.359-63.770 44.192-63.361Q44.056-63.014 43.931-62.504Q43.806-61.994 43.806-61.669Q43.806-61.344 43.944-61.098Q44.083-60.852 44.390-60.852",[2533],[1260,6908,6909,6912],{"style":4798},[2255,6910],{"fill":2524,"d":6911},"M34.138-52.948-.998-21.368",[2255,6913],{"d":6914,"style":6915},"m-3.577-19.051 4.74-1.837-2.384-.28-.025-2.4Z","stroke-width:1.199952",[1260,6917,6918,6921],{"style":4798},[2255,6919],{"fill":2524,"d":6920},"M42.751-49.108v28.967",[2255,6922],{"d":6923},"m42.751-16.673 1.802-4.754-1.802 1.586-1.802-1.586Z",[1260,6925,6926,6929],{"style":4798},[2255,6927],{"fill":2524,"d":6928},"m51.364-52.948 35.137 31.58",[2255,6930],{"d":6931,"style":6915},"m89.08-19.051-2.331-4.518-.025 2.4-2.385.28Z",[1260,6933,6934,6937],{"style":4798},[2255,6935],{"fill":2524,"d":6936},"M42.751 8.198v28.967",[2255,6938],{"d":6939},"m42.751 40.632 1.802-4.753-1.802 1.586-1.802-1.586Z",[1260,6941,6942,6945],{"style":4798},[2255,6943],{"fill":2524,"d":6944},"M98.963 1.414V30.38",[2255,6946],{"d":6947},"m98.963 33.848 1.802-4.753-1.802 1.586-1.802-1.586Z",[1260,6949,6950,6953],{"style":4798},[2255,6951],{"fill":2524,"d":6952},"M42.751 65.503V94.47",[2255,6954],{"d":6955},"m42.751 97.938 1.802-4.754-1.802 1.586-1.802-1.586Z",[1260,6957,6959,6962],{"fill":5250,"stroke":5250,"style":6958},"stroke-dasharray:3.0,3.0",[2255,6960],{"fill":2524,"d":6961},"M-1.963-8.78 28.2-5.14",[2255,6963],{"d":6964,"style":6965},"m30.688-4.84-3.396-1.77L28.3-5.127l-1.332 1.2Z","stroke-dasharray:none;stroke-width:.399988",[1260,6967,6968,6971],{"fill":5250,"stroke":5250,"style":6958},[2255,6969],{"fill":2524,"d":6970},"M91.327-1.461 52.415 42.904",[2255,6972],{"d":6973,"style":6974},"m50.763 44.788 3.379-1.804-1.793-.005-.238-1.777Z","stroke-dasharray:none;stroke-width:.399984",[1260,6976,6977,6980],{"fill":5250,"stroke":5250,"style":6958},[2255,6978],{"fill":2524,"d":6979},"M167.45-10.167h-53.83",[2255,6981],{"d":6982,"style":6983},"m111.114-10.167 3.584 1.35-1.178-1.35 1.178-1.351Z","stroke-dasharray:none",[1260,6985,6986,6993,6999],{"stroke":2524,"fontSize":3851},[1260,6987,6989],{"transform":6988},"translate(-52.143 2.778)",[2255,6990],{"d":6991,"fill":2520,"stroke":2520,"className":6992,"style":3859},"M44.255-60.611Q43.899-60.611 43.630-60.791Q43.360-60.970 43.220-61.265Q43.079-61.560 43.079-61.919Q43.079-62.306 43.241-62.720Q43.403-63.134 43.687-63.472Q43.970-63.810 44.339-64.013Q44.708-64.216 45.110-64.216Q45.603-64.216 45.880-63.767L46.317-65.537Q46.360-65.701 46.360-65.751Q46.360-65.857 45.864-65.857Q45.767-65.888 45.767-65.986L45.790-66.087Q45.821-66.142 45.880-66.154L46.981-66.240Q47.024-66.240 47.063-66.209Q47.103-66.177 47.103-66.123L45.950-61.521Q45.911-61.275 45.911-61.224Q45.911-60.865 46.157-60.865Q46.302-60.865 46.403-60.972Q46.505-61.080 46.569-61.234Q46.634-61.388 46.683-61.578Q46.731-61.767 46.751-61.865Q46.778-61.935 46.841-61.935L46.942-61.935Q46.981-61.935 47.007-61.902Q47.032-61.869 47.032-61.841Q47.032-61.826 47.024-61.810Q46.911-61.318 46.712-60.964Q46.513-60.611 46.142-60.611Q45.860-60.611 45.634-60.753Q45.407-60.896 45.325-61.154Q45.103-60.912 44.829-60.761Q44.556-60.611 44.255-60.611M44.271-60.865Q44.481-60.865 44.690-60.978Q44.899-61.091 45.069-61.265Q45.239-61.439 45.368-61.634Q45.356-61.619 45.347-61.605Q45.337-61.591 45.325-61.576L45.759-63.298Q45.720-63.478 45.634-63.628Q45.548-63.779 45.411-63.871Q45.274-63.962 45.095-63.962Q44.759-63.962 44.487-63.681Q44.216-63.400 44.056-63.025Q43.931-62.705 43.833-62.285Q43.735-61.865 43.735-61.584Q43.735-61.294 43.868-61.080Q44.001-60.865 44.271-60.865",[2533],[1260,6994,6995],{"transform":6988},[2255,6996],{"d":6997,"fill":2520,"stroke":2520,"className":6998,"style":3859},"M55.447-61.666L50.134-61.666Q50.056-61.673 50.007-61.722Q49.959-61.771 49.959-61.849Q49.959-61.919 50.006-61.970Q50.052-62.021 50.134-62.033L55.447-62.033Q55.521-62.021 55.568-61.970Q55.615-61.919 55.615-61.849Q55.615-61.771 55.566-61.722Q55.517-61.673 55.447-61.666M55.447-63.353L50.134-63.353Q50.056-63.361 50.007-63.410Q49.959-63.459 49.959-63.537Q49.959-63.607 50.006-63.658Q50.052-63.709 50.134-63.720L55.447-63.720Q55.521-63.709 55.568-63.658Q55.615-63.607 55.615-63.537Q55.615-63.459 55.566-63.410Q55.517-63.361 55.447-63.353",[2533],[1260,7000,7001],{"transform":6988},[2255,7002],{"d":7003,"fill":2520,"stroke":2520,"className":7004,"style":3859},"M60.579-60.521Q59.876-60.521 59.476-60.921Q59.075-61.322 58.931-61.931Q58.786-62.541 58.786-63.240Q58.786-63.763 58.856-64.226Q58.927-64.689 59.120-65.101Q59.313-65.513 59.671-65.761Q60.028-66.009 60.579-66.009Q61.130-66.009 61.487-65.761Q61.845-65.513 62.036-65.103Q62.228-64.693 62.298-64.224Q62.368-63.755 62.368-63.240Q62.368-62.541 62.226-61.933Q62.083-61.326 61.683-60.923Q61.282-60.521 60.579-60.521M60.579-60.779Q61.052-60.779 61.284-61.214Q61.517-61.650 61.571-62.189Q61.626-62.728 61.626-63.369Q61.626-64.365 61.442-65.058Q61.259-65.751 60.579-65.751Q60.212-65.751 59.991-65.513Q59.770-65.275 59.675-64.918Q59.579-64.560 59.554-64.189Q59.528-63.818 59.528-63.369Q59.528-62.728 59.583-62.189Q59.638-61.650 59.870-61.214Q60.103-60.779 60.579-60.779",[2533],[1260,7006,7007,7013,7018],{"stroke":2524,"fontSize":3851},[1260,7008,7010],{"transform":7009},"translate(-108.355 53.3)",[2255,7011],{"d":6991,"fill":2520,"stroke":2520,"className":7012,"style":3859},[2533],[1260,7014,7015],{"transform":7009},[2255,7016],{"d":6997,"fill":2520,"stroke":2520,"className":7017,"style":3859},[2533],[1260,7019,7020],{"transform":7009},[2255,7021],{"d":7022,"fill":2520,"stroke":2520,"className":7023,"style":3859},"M62.052-60.689L59.259-60.689L59.259-60.986Q60.321-60.986 60.321-61.248L60.321-65.416Q59.892-65.201 59.212-65.201L59.212-65.498Q60.231-65.498 60.747-66.009L60.892-66.009Q60.966-65.990 60.985-65.912L60.985-61.248Q60.985-60.986 62.052-60.986",[2533],[1260,7025,7026,7032,7037],{"stroke":2524,"fontSize":3851},[1260,7027,7029],{"transform":7028},"translate(-52.143 117.389)",[2255,7030],{"d":6991,"fill":2520,"stroke":2520,"className":7031,"style":3859},[2533],[1260,7033,7034],{"transform":7028},[2255,7035],{"d":6997,"fill":2520,"stroke":2520,"className":7036,"style":3859},[2533],[1260,7038,7039],{"transform":7028},[2255,7040],{"d":7041,"fill":2520,"stroke":2520,"className":7042,"style":3859},"M62.044-60.689L58.884-60.689L58.884-60.896Q58.884-60.923 58.907-60.955L60.259-62.353Q60.638-62.740 60.886-63.029Q61.134-63.318 61.308-63.675Q61.481-64.033 61.481-64.423Q61.481-64.771 61.349-65.064Q61.216-65.357 60.962-65.535Q60.708-65.712 60.353-65.712Q59.993-65.712 59.702-65.517Q59.411-65.322 59.267-64.994L59.321-64.994Q59.505-64.994 59.630-64.873Q59.755-64.751 59.755-64.560Q59.755-64.380 59.630-64.251Q59.505-64.123 59.321-64.123Q59.142-64.123 59.013-64.251Q58.884-64.380 58.884-64.560Q58.884-64.962 59.104-65.298Q59.325-65.634 59.690-65.822Q60.056-66.009 60.458-66.009Q60.938-66.009 61.354-65.822Q61.770-65.634 62.022-65.273Q62.274-64.912 62.274-64.423Q62.274-64.064 62.120-63.761Q61.966-63.459 61.714-63.199Q61.462-62.939 61.112-62.654Q60.763-62.369 60.595-62.216L59.665-61.377L60.380-61.377Q61.755-61.377 61.794-61.416Q61.864-61.494 61.907-61.679Q61.950-61.865 61.993-62.154L62.274-62.154",[2533],[1260,7044,7045,7051,7056],{"stroke":2524,"fontSize":3851},[1260,7046,7048],{"transform":7047},"translate(-52.143 174.694)",[2255,7049],{"d":6991,"fill":2520,"stroke":2520,"className":7050,"style":3859},[2533],[1260,7052,7053],{"transform":7047},[2255,7054],{"d":6997,"fill":2520,"stroke":2520,"className":7055,"style":3859},[2533],[1260,7057,7058],{"transform":7047},[2255,7059],{"d":7060,"fill":2520,"stroke":2520,"className":7061,"style":3859},"M59.251-61.322Q59.442-61.048 59.798-60.921Q60.153-60.794 60.536-60.794Q60.872-60.794 61.081-60.980Q61.290-61.166 61.386-61.459Q61.481-61.752 61.481-62.064Q61.481-62.388 61.384-62.683Q61.286-62.978 61.073-63.162Q60.860-63.345 60.528-63.345L59.962-63.345Q59.931-63.345 59.901-63.375Q59.872-63.404 59.872-63.431L59.872-63.513Q59.872-63.548 59.901-63.574Q59.931-63.599 59.962-63.599L60.442-63.634Q60.728-63.634 60.925-63.839Q61.122-64.044 61.218-64.339Q61.313-64.634 61.313-64.912Q61.313-65.291 61.114-65.529Q60.915-65.767 60.536-65.767Q60.216-65.767 59.927-65.660Q59.638-65.552 59.474-65.330Q59.653-65.330 59.776-65.203Q59.899-65.076 59.899-64.904Q59.899-64.732 59.774-64.607Q59.649-64.482 59.474-64.482Q59.302-64.482 59.177-64.607Q59.052-64.732 59.052-64.904Q59.052-65.271 59.276-65.519Q59.501-65.767 59.841-65.888Q60.181-66.009 60.536-66.009Q60.884-66.009 61.247-65.888Q61.610-65.767 61.858-65.517Q62.106-65.267 62.106-64.912Q62.106-64.427 61.788-64.044Q61.470-63.662 60.993-63.490Q61.544-63.380 61.944-62.994Q62.345-62.607 62.345-62.072Q62.345-61.615 62.081-61.259Q61.817-60.904 61.395-60.712Q60.974-60.521 60.536-60.521Q60.126-60.521 59.733-60.656Q59.341-60.791 59.075-61.076Q58.810-61.361 58.810-61.779Q58.810-61.974 58.942-62.103Q59.075-62.232 59.267-62.232Q59.392-62.232 59.495-62.173Q59.599-62.115 59.661-62.009Q59.724-61.904 59.724-61.779Q59.724-61.584 59.589-61.453Q59.454-61.322 59.251-61.322",[2533],[2579,7063,7065,7066,7081,7082,2395,7115,871],{"className":7064},[2582],"BFS tree from ",[429,7067,7069],{"className":7068},[432],[429,7070,7072],{"className":7071,"ariaHidden":437},[436],[429,7073,7075,7078],{"className":7074},[441],[429,7076],{"className":7077,"style":599},[445],[429,7079,4589],{"className":7080},[450,451]," with vertices sorted into distance layers ",[429,7083,7085],{"className":7084},[432],[429,7086,7088,7106],{"className":7087,"ariaHidden":437},[436],[429,7089,7091,7094,7097,7100,7103],{"className":7090},[441],[429,7092],{"className":7093,"style":2135},[445],[429,7095,2360],{"className":7096},[450,451],[429,7098],{"className":7099,"style":457},[456],[429,7101,462],{"className":7102},[461],[429,7104],{"className":7105,"style":457},[456],[429,7107,7109,7112],{"className":7108},[441],[429,7110],{"className":7111,"style":985},[445],[429,7113,1857],{"className":7114},[450],[429,7116,7118],{"className":7117},[432],[429,7119,7121],{"className":7120,"ariaHidden":437},[436],[429,7122,7124,7127],{"className":7123},[441],[429,7125],{"className":7126,"style":985},[445],[429,7128,2290],{"className":7129},[450],[381,7131,7132,7133,658,7136,7172,7173,7188,7189,7228,7229,7316,7317,7228,7380,7419,7420,7435,7436,658,7438,7453,7454,7493,7494,7509],{},"Thick edges are ",[394,7134,7135],{},"tree edges",[429,7137,7139],{"className":7138},[432],[429,7140,7142],{"className":7141,"ariaHidden":437},[436],[429,7143,7145,7148,7151,7154,7157,7160,7163,7166,7169],{"className":7144},[441],[429,7146],{"className":7147,"style":472},[445],[429,7149,477],{"className":7150},[476],[429,7152,581],{"className":7153,"style":580},[450,451],[429,7155,871],{"className":7156},[450],[429,7158,4572],{"className":7159,"style":580},[450,451],[429,7161,487],{"className":7162},[486],[429,7164],{"className":7165,"style":491},[456],[429,7167,581],{"className":7168,"style":580},[450,451],[429,7170,501],{"className":7171},[500],"; gray dashed edges point at vertices\nalready discovered, so BFS skips them. Reading off ",[429,7174,7176],{"className":7175},[432],[429,7177,7179],{"className":7178,"ariaHidden":437},[436],[429,7180,7182,7185],{"className":7181},[441],[429,7183],{"className":7184,"style":2135},[445],[429,7186,2360],{"className":7187},[450,451],": ",[429,7190,7192],{"className":7191},[432],[429,7193,7195,7219],{"className":7194,"ariaHidden":437},[436],[429,7196,7198,7201,7204,7207,7210,7213,7216],{"className":7197},[441],[429,7199],{"className":7200,"style":2135},[445],[429,7202,4589],{"className":7203},[450,451],[429,7205,871],{"className":7206},[450],[429,7208,2360],{"className":7209},[450,451],[429,7211],{"className":7212,"style":457},[456],[429,7214,462],{"className":7215},[461],[429,7217],{"className":7218,"style":457},[456],[429,7220,7222,7225],{"className":7221},[441],[429,7223],{"className":7224,"style":985},[445],[429,7226,1857],{"className":7227},[450],"; ",[429,7230,7232],{"className":7231},[432],[429,7233,7235,7259,7283,7307],{"className":7234,"ariaHidden":437},[436],[429,7236,7238,7241,7244,7247,7250,7253,7256],{"className":7237},[441],[429,7239],{"className":7240,"style":2135},[445],[429,7242,406],{"className":7243},[450,451],[429,7245,871],{"className":7246},[450],[429,7248,2360],{"className":7249},[450,451],[429,7251],{"className":7252,"style":457},[456],[429,7254,462],{"className":7255},[461],[429,7257],{"className":7258,"style":457},[456],[429,7260,7262,7265,7268,7271,7274,7277,7280],{"className":7261},[441],[429,7263],{"className":7264,"style":2135},[445],[429,7266,6502],{"className":7267},[450,451],[429,7269,871],{"className":7270},[450],[429,7272,2360],{"className":7273},[450,451],[429,7275],{"className":7276,"style":457},[456],[429,7278,462],{"className":7279},[461],[429,7281],{"className":7282,"style":457},[456],[429,7284,7286,7289,7292,7295,7298,7301,7304],{"className":7285},[441],[429,7287],{"className":7288,"style":2135},[445],[429,7290,6512],{"className":7291},[450,451],[429,7293,871],{"className":7294},[450],[429,7296,2360],{"className":7297},[450,451],[429,7299],{"className":7300,"style":457},[456],[429,7302,462],{"className":7303},[461],[429,7305],{"className":7306,"style":457},[456],[429,7308,7310,7313],{"className":7309},[441],[429,7311],{"className":7312,"style":985},[445],[429,7314,412],{"className":7315},[450],";\n",[429,7318,7320],{"className":7319},[432],[429,7321,7323,7347,7371],{"className":7322,"ariaHidden":437},[436],[429,7324,7326,7329,7332,7335,7338,7341,7344],{"className":7325},[441],[429,7327],{"className":7328,"style":2135},[445],[429,7330,966],{"className":7331},[450,451],[429,7333,871],{"className":7334},[450],[429,7336,2360],{"className":7337},[450,451],[429,7339],{"className":7340,"style":457},[456],[429,7342,462],{"className":7343},[461],[429,7345],{"className":7346,"style":457},[456],[429,7348,7350,7353,7356,7359,7362,7365,7368],{"className":7349},[441],[429,7351],{"className":7352,"style":5582},[445],[429,7354,1260],{"className":7355,"style":580},[450,451],[429,7357,871],{"className":7358},[450],[429,7360,2360],{"className":7361},[450,451],[429,7363],{"className":7364,"style":457},[456],[429,7366,462],{"className":7367},[461],[429,7369],{"className":7370,"style":457},[456],[429,7372,7374,7377],{"className":7373},[441],[429,7375],{"className":7376,"style":985},[445],[429,7378,989],{"className":7379},[450],[429,7381,7383],{"className":7382},[432],[429,7384,7386,7410],{"className":7385,"ariaHidden":437},[436],[429,7387,7389,7392,7395,7398,7401,7404,7407],{"className":7388},[441],[429,7390],{"className":7391,"style":5582},[445],[429,7393,6655],{"className":7394,"style":6654},[450,451],[429,7396,871],{"className":7397},[450],[429,7399,2360],{"className":7400},[450,451],[429,7402],{"className":7403,"style":457},[456],[429,7405,462],{"className":7406},[461],[429,7408],{"className":7409,"style":457},[456],[429,7411,7413,7416],{"className":7412},[441],[429,7414],{"className":7415,"style":985},[445],[429,7417,2290],{"className":7418},[450],". Vertex ",[429,7421,7423],{"className":7422},[432],[429,7424,7426],{"className":7425,"ariaHidden":437},[436],[429,7427,7429,7432],{"className":7428},[441],[429,7430],{"className":7431,"style":2135},[445],[429,7433,2360],{"className":7434},[450,451]," has no path ",[385,7437,657],{},[429,7439,7441],{"className":7440},[432],[429,7442,7444],{"className":7443,"ariaHidden":437},[436],[429,7445,7447,7450],{"className":7446},[441],[429,7448],{"className":7449,"style":599},[445],[429,7451,4589],{"className":7452},[450,451],", so ",[429,7455,7457],{"className":7456},[432],[429,7458,7460,7484],{"className":7459,"ariaHidden":437},[436],[429,7461,7463,7466,7469,7472,7475,7478,7481],{"className":7462},[441],[429,7464],{"className":7465,"style":2135},[445],[429,7467,2360],{"className":7468},[450,451],[429,7470,871],{"className":7471},[450],[429,7473,2360],{"className":7474},[450,451],[429,7476],{"className":7477,"style":457},[456],[429,7479,462],{"className":7480},[461],[429,7482],{"className":7483,"style":457},[456],[429,7485,7487,7490],{"className":7486},[441],[429,7488],{"className":7489,"style":599},[445],[429,7491,2427],{"className":7492},[450],", and it\nnever enters the queue. The tree path from ",[429,7495,7497],{"className":7496},[432],[429,7498,7500],{"className":7499,"ariaHidden":437},[436],[429,7501,7503,7506],{"className":7502},[441],[429,7504],{"className":7505,"style":599},[445],[429,7507,4589],{"className":7508},[450,451]," down to any vertex spells out a\nshortest route in hops.",[381,7511,7512,7515,7516,7519],{},[394,7513,7514],{},"Reachability and components, for free."," The skeleton already solves more than\ndistances. To list the ",[394,7517,7518],{},"connected components"," of an undirected graph, loop over\nall vertices and start a fresh search from each still-unvisited one, tagging every\nvertex it reaches with the current component number:",[4474,7521,7523],{"className":4476,"code":7522,"language":4478,"meta":376,"style":376},"caption: $\\textsc{Connected-Components}(G)$ — label every vertex's component\nnumber: 3\n$c \\gets 0$\nforeach vertex $v \\in V$ do\n  if not $v.visited$ then\n    $c \\gets c + 1$\n    run $\\textsc{BFS}(G, v)$, marking each newly visited vertex with $c$\n",[4480,7524,7525,7530,7535,7540,7544,7549,7554],{"__ignoreMap":376},[429,7526,7527],{"class":4484,"line":6},[429,7528,7529],{},"caption: $\\textsc{Connected-Components}(G)$ — label every vertex's component\n",[429,7531,7532],{"class":4484,"line":18},[429,7533,7534],{},"number: 3\n",[429,7536,7537],{"class":4484,"line":24},[429,7538,7539],{},"$c \\gets 0$\n",[429,7541,7542],{"class":4484,"line":73},[429,7543,4497],{},[429,7545,7546],{"class":4484,"line":102},[429,7547,7548],{},"  if not $v.visited$ then\n",[429,7550,7551],{"class":4484,"line":108},[429,7552,7553],{},"    $c \\gets c + 1$\n",[429,7555,7556],{"class":4484,"line":116},[429,7557,7558],{},"    run $\\textsc{BFS}(G, v)$, marking each newly visited vertex with $c$\n",[381,7560,7561,7562,7604,7605,7608,7609,7612],{},"Each search marks exactly one component, and every vertex is visited once, so the\nwhole sweep is still ",[429,7563,7565],{"className":7564},[432],[429,7566,7568,7592],{"className":7567,"ariaHidden":437},[436],[429,7569,7571,7574,7577,7580,7583,7586,7589],{"className":7570},[441],[429,7572],{"className":7573,"style":472},[445],[429,7575,841],{"className":7576,"style":840},[450,451],[429,7578,477],{"className":7579},[476],[429,7581,482],{"className":7582,"style":481},[450,451],[429,7584],{"className":7585,"style":481},[456],[429,7587,855],{"className":7588},[854],[429,7590],{"className":7591,"style":481},[456],[429,7593,7595,7598,7601],{"className":7594},[441],[429,7596],{"className":7597,"style":472},[445],[429,7599,496],{"className":7600,"style":495},[450,451],[429,7602,501],{"className":7603},[500],". Because we only used the ",[385,7606,7607],{},"visited"," flag, ",[394,7610,7611],{},"any","\ninstantiation works here — swap in DFS and nothing changes. This is the payoff of\nthe unifying view: connectivity is a Whatever-First-Search property, not a BFS one.",[414,7614,7616],{"id":7615},"depth-first-search","Depth-first search",[381,7618,7619,7620,7623,7624,7627,7628,7631,7632,7635,7636,7638,7639,7642],{},"Where BFS fans out in rings, ",[394,7621,7622],{},"depth-first search"," (DFS) plunges. It is\nWhatever-First-Search with a ",[394,7625,7626],{},"stack",": pulling the ",[385,7629,7630],{},"newest"," discovered vertex\nmeans we always descend from where we just were. From a vertex it follows an edge\nto an unvisited neighbor, then a neighbor of ",[385,7633,7634],{},"that",", going as deep as possible\nbefore ",[394,7637,288],{}," to the most recent vertex with an unexplored edge. The\nLIFO stack is usually left implicit — it ",[385,7640,7641],{},"is"," the recursion call stack.",[381,7644,7645,7646,7649,7650,7665,7666,5171,7669,7672,7673,7726,7727,7742,7743,7746,7747,7726,7800,7815,7816,7840,7841,7856,7857,7906,7907,7910],{},"DFS's gift is a pair of ",[394,7647,7648],{},"timestamps"," on each vertex ",[429,7651,7653],{"className":7652},[432],[429,7654,7656],{"className":7655,"ariaHidden":437},[436],[429,7657,7659,7662],{"className":7658},[441],[429,7660],{"className":7661,"style":599},[445],[429,7663,581],{"className":7664,"style":580},[450,451],": a ",[385,7667,7668],{},"discovery",[385,7670,7671],{},"start",") time, which we write ",[429,7674,7676],{"className":7675},[432],[429,7677,7679],{"className":7678,"ariaHidden":437},[436],[429,7680,7682,7685],{"className":7681},[441],[429,7683],{"className":7684,"style":2152},[445],[429,7686,7688,7691],{"className":7687},[450],[429,7689,4589],{"className":7690},[450,451],[429,7692,7694],{"className":7693},[1529],[429,7695,7697,7718],{"className":7696},[1062,1063],[429,7698,7700,7715],{"className":7699},[1067],[429,7701,7704],{"className":7702,"style":7703},[1071],"height:0.1514em;",[429,7705,7706,7709],{"style":1896},[429,7707],{"className":7708,"style":1080},[1079],[429,7710,7712],{"className":7711},[1084,1085,1086,1087],[429,7713,581],{"className":7714,"style":580},[450,451,1087],[429,7716,1113],{"className":7717},[1112],[429,7719,7721],{"className":7720},[1067],[429,7722,7724],{"className":7723,"style":1867},[1071],[429,7725],{},", stamped when ",[429,7728,7730],{"className":7729},[432],[429,7731,7733],{"className":7732,"ariaHidden":437},[436],[429,7734,7736,7739],{"className":7735},[441],[429,7737],{"className":7738,"style":599},[445],[429,7740,581],{"className":7741,"style":580},[450,451]," first turns gray, and a\n",[385,7744,7745],{},"finish"," time ",[429,7748,7750],{"className":7749},[432],[429,7751,7753],{"className":7752,"ariaHidden":437},[436],[429,7754,7756,7759],{"className":7755},[441],[429,7757],{"className":7758,"style":5582},[445],[429,7760,7762,7765],{"className":7761},[450],[429,7763,6655],{"className":7764,"style":6654},[450,451],[429,7766,7768],{"className":7767},[1529],[429,7769,7771,7792],{"className":7770},[1062,1063],[429,7772,7774,7789],{"className":7773},[1067],[429,7775,7777],{"className":7776,"style":7703},[1071],[429,7778,7780,7783],{"style":7779},"top:-2.55em;margin-left:-0.1076em;margin-right:0.05em;",[429,7781],{"className":7782,"style":1080},[1079],[429,7784,7786],{"className":7785},[1084,1085,1086,1087],[429,7787,581],{"className":7788,"style":580},[450,451,1087],[429,7790,1113],{"className":7791},[1112],[429,7793,7795],{"className":7794},[1067],[429,7796,7798],{"className":7797,"style":1867},[1071],[429,7799],{},[429,7801,7803],{"className":7802},[432],[429,7804,7806],{"className":7805,"ariaHidden":437},[436],[429,7807,7809,7812],{"className":7808},[441],[429,7810],{"className":7811,"style":599},[445],[429,7813,581],{"className":7814,"style":580},[450,451]," turns black after all its descendants are\ndone. A single global clock ",[429,7817,7819],{"className":7818},[432],[429,7820,7822],{"className":7821,"ariaHidden":437},[436],[429,7823,7825,7829,7833,7837],{"className":7824},[441],[429,7826],{"className":7827,"style":7828},[445],"height:0.6595em;",[429,7830,7832],{"className":7831},[450,451],"t",[429,7834,7836],{"className":7835},[450,451],"im",[429,7838,966],{"className":7839},[450,451]," ticks once per stamp, so on ",[429,7842,7844],{"className":7843},[432],[429,7845,7847],{"className":7846,"ariaHidden":437},[436],[429,7848,7850,7853],{"className":7849},[441],[429,7851],{"className":7852,"style":599},[445],[429,7854,716],{"className":7855},[450,451]," vertices every\nvalue in ",[429,7858,7860],{"className":7859},[432],[429,7861,7863],{"className":7862,"ariaHidden":437},[436],[429,7864,7866,7870,7873,7876,7879,7882,7885,7888,7891,7894,7897,7900,7903],{"className":7865},[441],[429,7867],{"className":7868,"style":7869},[445],"height:0.8389em;vertical-align:-0.1944em;",[429,7871,412],{"className":7872},[450],[429,7874,487],{"className":7875},[486],[429,7877],{"className":7878,"style":491},[456],[429,7880,989],{"className":7881},[450],[429,7883,487],{"className":7884},[486],[429,7886],{"className":7887,"style":491},[456],[429,7889,2018],{"className":7890},[560],[429,7892],{"className":7893,"style":491},[456],[429,7895,487],{"className":7896},[486],[429,7898],{"className":7899,"style":491},[456],[429,7901,989],{"className":7902},[450],[429,7904,716],{"className":7905},[450,451]," is used exactly once. Unlike BFS, the outer driver\nrestarts DFS from any leftover white vertex, so it covers disconnected pieces too,\nproducing a ",[394,7908,7909],{},"depth-first forest"," rather than a single tree.",[4474,7912,7914],{"className":4476,"code":7913,"language":4478,"meta":376,"style":376},"caption: $\\textsc{DFS}(G)$ — discovery \u002F finish times for every vertex\nnumber: 4\nforeach vertex $u \\in V$ do\n  $u.color \\gets \\text{white}$\n  $u.\\pi \\gets \\text{nil}$\n$time \\gets 0$\nforeach vertex $u \\in V$ do\n  if $u.color = \\text{white}$ then\n    call $\\textsc{DFS-Visit}(G, u)$\n",[4480,7915,7916,7921,7926,7931,7935,7939,7944,7948,7953],{"__ignoreMap":376},[429,7917,7918],{"class":4484,"line":6},[429,7919,7920],{},"caption: $\\textsc{DFS}(G)$ — discovery \u002F finish times for every vertex\n",[429,7922,7923],{"class":4484,"line":18},[429,7924,7925],{},"number: 4\n",[429,7927,7928],{"class":4484,"line":24},[429,7929,7930],{},"foreach vertex $u \\in V$ do\n",[429,7932,7933],{"class":4484,"line":73},[429,7934,5280],{},[429,7936,7937],{"class":4484,"line":102},[429,7938,5290],{},[429,7940,7941],{"class":4484,"line":108},[429,7942,7943],{},"$time \\gets 0$\n",[429,7945,7946],{"class":4484,"line":116},[429,7947,7930],{},[429,7949,7950],{"class":4484,"line":196},[429,7951,7952],{},"  if $u.color = \\text{white}$ then\n",[429,7954,7955],{"class":4484,"line":202},[429,7956,7957],{},"    call $\\textsc{DFS-Visit}(G, u)$\n",[4474,7959,7961],{"className":4476,"code":7960,"language":4478,"meta":376,"style":376},"caption: $\\textsc{DFS-Visit}(G, u)$ — explore everything reachable from $u$\nnumber: 5\n$time \\gets time + 1$\n$u.s \\gets time$ \u002F\u002F discover u (turns gray)\n$u.color \\gets \\text{gray}$\nforeach $v$ adjacent to $u$ do\n  if $v.color = \\text{white}$ then\n    $v.\\pi \\gets u$\n    call $\\textsc{DFS-Visit}(G, v)$\n$u.color \\gets \\text{black}$\n$time \\gets time + 1$\n$u.f \\gets time$\n",[4480,7962,7963,7968,7973,7978,7983,7988,7993,7998,8003,8008,8013,8017],{"__ignoreMap":376},[429,7964,7965],{"class":4484,"line":6},[429,7966,7967],{},"caption: $\\textsc{DFS-Visit}(G, u)$ — explore everything reachable from $u$\n",[429,7969,7970],{"class":4484,"line":18},[429,7971,7972],{},"number: 5\n",[429,7974,7975],{"class":4484,"line":24},[429,7976,7977],{},"$time \\gets time + 1$\n",[429,7979,7980],{"class":4484,"line":73},[429,7981,7982],{},"$u.s \\gets time$ \u002F\u002F discover u (turns gray)\n",[429,7984,7985],{"class":4484,"line":102},[429,7986,7987],{},"$u.color \\gets \\text{gray}$\n",[429,7989,7990],{"class":4484,"line":108},[429,7991,7992],{},"foreach $v$ adjacent to $u$ do\n",[429,7994,7995],{"class":4484,"line":116},[429,7996,7997],{},"  if $v.color = \\text{white}$ then\n",[429,7999,8000],{"class":4484,"line":196},[429,8001,8002],{},"    $v.\\pi \\gets u$\n",[429,8004,8005],{"class":4484,"line":202},[429,8006,8007],{},"    call $\\textsc{DFS-Visit}(G, v)$\n",[429,8009,8010],{"class":4484,"line":283},[429,8011,8012],{},"$u.color \\gets \\text{black}$\n",[429,8014,8015],{"class":4484,"line":333},[429,8016,7977],{},[429,8018,8019],{"class":4484,"line":354},[429,8020,8021],{},"$u.f \\gets time$\n",[381,8023,8024,8025,8067,8068,8092,8093,8115,8116,8140],{},"Like BFS, DFS runs in ",[429,8026,8028],{"className":8027},[432],[429,8029,8031,8055],{"className":8030,"ariaHidden":437},[436],[429,8032,8034,8037,8040,8043,8046,8049,8052],{"className":8033},[441],[429,8035],{"className":8036,"style":472},[445],[429,8038,3038],{"className":8039},[450],[429,8041,477],{"className":8042},[476],[429,8044,482],{"className":8045,"style":481},[450,451],[429,8047],{"className":8048,"style":481},[456],[429,8050,855],{"className":8051},[854],[429,8053],{"className":8054,"style":481},[456],[429,8056,8058,8061,8064],{"className":8057},[441],[429,8059],{"className":8060,"style":472},[445],[429,8062,496],{"className":8063,"style":495},[450,451],[429,8065,501],{"className":8066},[500],": the initialization and the outer loop\ncost ",[429,8069,8071],{"className":8070},[432],[429,8072,8074],{"className":8073,"ariaHidden":437},[436],[429,8075,8077,8080,8083,8086,8089],{"className":8076},[441],[429,8078],{"className":8079,"style":472},[445],[429,8081,3038],{"className":8082},[450],[429,8084,477],{"className":8085},[476],[429,8087,482],{"className":8088,"style":481},[450,451],[429,8090,501],{"className":8091},[500],", and ",[429,8094,8096],{"className":8095},[432],[429,8097,8099],{"className":8098,"ariaHidden":437},[436],[429,8100,8102,8105],{"className":8101},[441],[429,8103],{"className":8104,"style":446},[445],[429,8106,8108],{"className":8107},[4661,4662],[429,8109,8111],{"className":8110},[450,1316],[429,8112,8114],{"className":8113},[450],"DFS-Visit"," is called exactly once per vertex (only on\nwhite vertices, which it immediately grays), scanning each adjacency list once\nfor ",[429,8117,8119],{"className":8118},[432],[429,8120,8122],{"className":8121,"ariaHidden":437},[436],[429,8123,8125,8128,8131,8134,8137],{"className":8124},[441],[429,8126],{"className":8127,"style":472},[445],[429,8129,3038],{"className":8130},[450],[429,8132,477],{"className":8133},[476],[429,8135,496],{"className":8136,"style":495},[450,451],[429,8138,501],{"className":8139},[500]," total.",[8142,8143,8145],"h3",{"id":8144},"a-worked-dfs-and-the-nesting-structure","A worked DFS, and the nesting structure",[381,8147,8148,8149,8170,8171,8186,8187,8283,8284,8286],{},"Run ",[429,8150,8152],{"className":8151},[432],[429,8153,8155],{"className":8154,"ariaHidden":437},[436],[429,8156,8158,8161],{"className":8157},[441],[429,8159],{"className":8160,"style":446},[445],[429,8162,8164],{"className":8163},[4661,4662],[429,8165,8167],{"className":8166},[450,1316],[429,8168,4705],{"className":8169},[450]," on the digraph below, starting at ",[429,8172,8174],{"className":8173},[432],[429,8175,8177],{"className":8176,"ariaHidden":437},[436],[429,8178,8180,8183],{"className":8179},[441],[429,8181],{"className":8182,"style":599},[445],[429,8184,4589],{"className":8185},[450,451]," and breaking ties\nalphabetically. Each vertex is labeled ",[429,8188,8190],{"className":8189},[432],[429,8191,8193],{"className":8192,"ariaHidden":437},[436],[429,8194,8196,8199,8239,8243],{"className":8195},[441],[429,8197],{"className":8198,"style":472},[445],[429,8200,8202,8205],{"className":8201},[450],[429,8203,4589],{"className":8204},[450,451],[429,8206,8208],{"className":8207},[1529],[429,8209,8211,8231],{"className":8210},[1062,1063],[429,8212,8214,8228],{"className":8213},[1067],[429,8215,8217],{"className":8216,"style":7703},[1071],[429,8218,8219,8222],{"style":1896},[429,8220],{"className":8221,"style":1080},[1079],[429,8223,8225],{"className":8224},[1084,1085,1086,1087],[429,8226,581],{"className":8227,"style":580},[450,451,1087],[429,8229,1113],{"className":8230},[1112],[429,8232,8234],{"className":8233},[1067],[429,8235,8237],{"className":8236,"style":1867},[1071],[429,8238],{},[429,8240,8242],{"className":8241},[450],"\u002F",[429,8244,8246,8249],{"className":8245},[450],[429,8247,6655],{"className":8248,"style":6654},[450,451],[429,8250,8252],{"className":8251},[1529],[429,8253,8255,8275],{"className":8254},[1062,1063],[429,8256,8258,8272],{"className":8257},[1067],[429,8259,8261],{"className":8260,"style":7703},[1071],[429,8262,8263,8266],{"style":7779},[429,8264],{"className":8265,"style":1080},[1079],[429,8267,8269],{"className":8268},[1084,1085,1086,1087],[429,8270,581],{"className":8271,"style":580},[450,451,1087],[429,8273,1113],{"className":8274},[1112],[429,8276,8278],{"className":8277},[1067],[429,8279,8281],{"className":8280,"style":1867},[1071],[429,8282],{},". Thick edges are ",[394,8285,7135],{},"\n(the depth-first forest); the dashed edges are non-tree edges, classified next.",[2506,8288,8290,8620],{"className":8289},[2509,2510],[2512,8291,8295],{"xmlns":2514,"width":8292,"height":8293,"viewBox":8294},"390.845","296.996","-75 -75 293.134 222.747",[1260,8296,8297,8300,8328,8331,8358,8361,8388,8391,8418,8421,8448,8451,8478,8481,8508,8511,8538,8546,8555,8563,8571,8579,8587,8596,8604,8612],{"stroke":2520,"style":2521},[2255,8298],{"fill":2524,"d":8299},"M16.488-60.689c0-6.286-9.643-11.381-21.54-11.381-11.895 0-21.538 5.095-21.538 11.381s9.643 11.381 21.539 11.381 21.539-5.095 21.539-11.38Zm-21.54 0",[1260,8301,8303,8310,8316,8322],{"stroke":2524,"fontSize":8302},"9",[1260,8304,8306],{"transform":8305},"translate(-14.23 2.25)",[2255,8307],{"d":8308,"fill":2520,"stroke":2520,"className":8309,"style":2534},"M-4.216-61.238Q-3.996-60.852-3.240-60.852Q-2.942-60.852-2.647-60.953Q-2.353-61.054-2.159-61.267Q-1.966-61.480-1.966-61.788Q-1.966-62.016-2.144-62.163Q-2.322-62.311-2.568-62.363L-3.078-62.460Q-3.293-62.500-3.469-62.623Q-3.645-62.746-3.750-62.932Q-3.856-63.119-3.856-63.335Q-3.856-63.734-3.632-64.040Q-3.407-64.345-3.049-64.506Q-2.691-64.666-2.287-64.666Q-2.023-64.666-1.775-64.587Q-1.527-64.508-1.357-64.328Q-1.188-64.147-1.188-63.884Q-1.188-63.677-1.309-63.519Q-1.430-63.361-1.641-63.361Q-1.764-63.361-1.850-63.442Q-1.935-63.523-1.935-63.642Q-1.935-63.805-1.812-63.939Q-1.689-64.073-1.531-64.073Q-1.619-64.253-1.836-64.330Q-2.054-64.407-2.304-64.407Q-2.546-64.407-2.772-64.319Q-2.999-64.231-3.144-64.062Q-3.289-63.893-3.289-63.642Q-3.289-63.466-3.157-63.348Q-3.025-63.229-2.827-63.181L-2.322-63.084Q-1.935-63.005-1.667-62.735Q-1.399-62.464-1.399-62.082Q-1.399-61.752-1.588-61.432Q-1.777-61.111-2.054-60.913Q-2.555-60.588-3.249-60.588Q-3.561-60.588-3.862-60.674Q-4.163-60.759-4.368-60.957Q-4.572-61.155-4.572-61.462Q-4.572-61.713-4.429-61.897Q-4.286-62.082-4.045-62.082Q-3.891-62.082-3.792-61.990Q-3.693-61.897-3.693-61.752Q-3.693-61.542-3.845-61.390Q-3.996-61.238-4.216-61.238",[2533],[1260,8311,8312],{"transform":8305},[2255,8313],{"d":8314,"fill":2520,"stroke":2520,"className":8315,"style":2534},"M8.817-60.689L5.785-60.689L5.785-61.005Q6.936-61.005 6.936-61.300L6.936-66.024Q6.448-65.791 5.727-65.791L5.727-66.107Q6.857-66.107 7.419-66.683L7.564-66.683Q7.599-66.683 7.632-66.650Q7.665-66.617 7.665-66.582L7.665-61.300Q7.665-61.005 8.817-61.005",[2533],[1260,8317,8318],{"transform":8305},[2255,8319],{"d":8320,"fill":2520,"stroke":2520,"className":8321,"style":2534},"M10.049-58.628Q10.049-58.672 10.058-58.689L13.270-67.320Q13.314-67.439 13.451-67.439Q13.525-67.439 13.582-67.382Q13.639-67.325 13.639-67.250Q13.639-67.206 13.631-67.189L10.427-58.558Q10.370-58.439 10.247-58.439Q10.163-58.439 10.106-58.496Q10.049-58.553 10.049-58.628",[2533],[1260,8323,8324],{"transform":8305},[2255,8325],{"d":8326,"fill":2520,"stroke":2520,"className":8327,"style":2534},"M18.067-60.689L15.035-60.689L15.035-61.005Q16.186-61.005 16.186-61.300L16.186-66.024Q15.698-65.791 14.977-65.791L14.977-66.107Q16.107-66.107 16.669-66.683L16.814-66.683Q16.849-66.683 16.882-66.650Q16.915-66.617 16.915-66.582L16.915-61.300Q16.915-61.005 18.067-61.005L18.067-60.689M21.090-60.491Q19.965-60.491 19.552-61.388Q19.139-62.284 19.139-63.559Q19.139-64.332 19.288-65.031Q19.438-65.730 19.873-66.206Q20.308-66.683 21.090-66.683Q21.868-66.683 22.303-66.204Q22.738-65.725 22.888-65.029Q23.037-64.332 23.037-63.559Q23.037-62.280 22.624-61.386Q22.211-60.491 21.090-60.491M21.090-60.751Q21.609-60.751 21.859-61.262Q22.110-61.774 22.167-62.385Q22.224-62.996 22.224-63.704Q22.224-64.389 22.167-64.949Q22.110-65.510 21.857-65.967Q21.604-66.424 21.090-66.424Q20.686-66.424 20.449-66.147Q20.211-65.870 20.104-65.429Q19.996-64.987 19.972-64.594Q19.948-64.200 19.948-63.704Q19.948-63.198 19.972-62.770Q19.996-62.341 20.104-61.858Q20.211-61.375 20.451-61.063Q20.690-60.751 21.090-60.751",[2533],[2255,8329],{"fill":2524,"d":8330},"M15.03 13.688c0-6.285-8.99-11.38-20.081-11.38s-20.08 5.095-20.08 11.38 8.99 11.381 20.08 11.381 20.08-5.095 20.08-11.38Zm-20.081 0",[1260,8332,8333,8340,8346,8352],{"stroke":2524,"fontSize":8302},[1260,8334,8336],{"transform":8335},"translate(-13.2 76.627)",[2255,8337],{"d":8338,"fill":2520,"stroke":2520,"className":8339,"style":2534},"M-4.045-61.752Q-4.045-62.025-3.966-62.330Q-3.886-62.636-3.759-62.970Q-3.632-63.304-3.513-63.616Q-3.394-63.901-3.394-64.134Q-3.394-64.253-3.440-64.330Q-3.487-64.407-3.592-64.407Q-3.944-64.407-4.179-64.046Q-4.414-63.686-4.519-63.255Q-4.537-63.172-4.612-63.172L-4.717-63.172Q-4.765-63.172-4.787-63.211Q-4.809-63.251-4.809-63.291Q-4.721-63.633-4.561-63.939Q-4.401-64.244-4.150-64.455Q-3.900-64.666-3.574-64.666Q-3.236-64.666-3.005-64.457Q-2.775-64.249-2.775-63.910Q-2.775-63.730-2.836-63.576Q-2.841-63.559-2.979-63.198Q-3.117-62.838-3.199-62.592Q-3.280-62.346-3.333-62.102Q-3.385-61.858-3.385-61.643Q-3.385-61.278-3.199-61.065Q-3.012-60.852-2.656-60.852Q-2.173-60.852-1.865-61.564L-1.865-61.735Q-1.865-62.021-1.803-62.262L-1.307-64.253Q-1.272-64.394-1.157-64.481Q-1.043-64.569-0.903-64.569Q-0.780-64.569-0.700-64.495Q-0.621-64.420-0.621-64.297Q-0.621-64.244-0.630-64.218L-1.127-62.227Q-1.219-61.792-1.219-61.616Q-1.219-61.282-1.052-61.067Q-0.885-60.852-0.551-60.852Q-0.169-60.852 0.093-61.148Q0.354-61.445 0.530-61.884Q0.666-62.236 0.778-62.612Q0.890-62.987 0.890-63.207Q0.890-63.462 0.811-63.605Q0.732-63.748 0.581-63.928Q0.429-64.108 0.429-64.200Q0.429-64.385 0.578-64.530Q0.728-64.675 0.908-64.675Q1.132-64.675 1.231-64.468Q1.330-64.262 1.330-64.002Q1.330-63.730 1.249-63.335Q1.167-62.939 1.046-62.537Q0.926-62.135 0.833-61.915Q0.693-61.564 0.506-61.269Q0.319-60.975 0.051-60.781Q-0.217-60.588-0.569-60.588Q-0.999-60.588-1.259-60.711Q-1.518-60.834-1.746-61.177Q-2.120-60.588-2.674-60.588Q-3.069-60.588-3.377-60.709Q-3.684-60.830-3.864-61.091Q-4.045-61.353-4.045-61.752",[2533],[1260,8341,8342],{"transform":8335},[2255,8343],{"d":8344,"fill":2520,"stroke":2520,"className":8345,"style":2534},"M11.379-60.689L7.929-60.689L7.929-60.922Q7.929-60.935 7.960-60.966L9.414-62.543Q9.880-63.040 10.133-63.345Q10.386-63.651 10.577-64.062Q10.768-64.473 10.768-64.912Q10.768-65.501 10.445-65.934Q10.122-66.367 9.542-66.367Q9.278-66.367 9.032-66.257Q8.786-66.147 8.610-65.960Q8.434-65.773 8.338-65.523L8.417-65.523Q8.619-65.523 8.762-65.387Q8.905-65.251 8.905-65.035Q8.905-64.829 8.762-64.690Q8.619-64.552 8.417-64.552Q8.215-64.552 8.072-64.695Q7.929-64.837 7.929-65.035Q7.929-65.497 8.166-65.870Q8.404-66.244 8.804-66.463Q9.203-66.683 9.652-66.683Q10.175-66.683 10.629-66.468Q11.084-66.252 11.357-65.853Q11.629-65.453 11.629-64.912Q11.629-64.517 11.458-64.163Q11.286-63.809 11.021-63.530Q10.755-63.251 10.304-62.866Q9.854-62.482 9.775-62.407L8.751-61.445L9.568-61.445Q10.219-61.445 10.656-61.456Q11.093-61.467 11.124-61.489Q11.194-61.572 11.249-61.812Q11.304-62.051 11.344-62.319L11.629-62.319",[2533],[1260,8347,8348],{"transform":8335},[2255,8349],{"d":8350,"fill":2520,"stroke":2520,"className":8351,"style":2534},"M12.611-58.628Q12.611-58.672 12.620-58.689L15.832-67.320Q15.876-67.439 16.013-67.439Q16.087-67.439 16.144-67.382Q16.201-67.325 16.201-67.250Q16.201-67.206 16.193-67.189L12.989-58.558Q12.932-58.439 12.809-58.439Q12.725-58.439 12.668-58.496Q12.611-58.553 12.611-58.628",[2533],[1260,8353,8354],{"transform":8335},[2255,8355],{"d":8356,"fill":2520,"stroke":2520,"className":8357,"style":2534},"M17.785-61.076Q18.032-60.777 18.638-60.777Q18.919-60.777 19.159-60.915Q19.398-61.054 19.576-61.276Q19.754-61.498 19.864-61.761Q20.097-62.337 20.097-63.453Q19.930-63.088 19.625-62.864Q19.319-62.640 18.937-62.640Q18.401-62.640 17.985-62.919Q17.570-63.198 17.339-63.664Q17.109-64.130 17.109-64.657Q17.109-65.070 17.256-65.439Q17.403-65.809 17.667-66.085Q17.930-66.362 18.300-66.523Q18.669-66.683 19.082-66.683Q19.640-66.683 20.014-66.391Q20.387-66.099 20.591-65.635Q20.796-65.171 20.875-64.655Q20.954-64.139 20.954-63.607Q20.954-62.891 20.686-62.168Q20.418-61.445 19.895-60.968Q19.372-60.491 18.647-60.491Q18.097-60.491 17.720-60.740Q17.342-60.988 17.342-61.506Q17.342-61.625 17.399-61.728Q17.456-61.832 17.557-61.891Q17.658-61.950 17.785-61.950Q17.970-61.950 18.093-61.818Q18.216-61.687 18.216-61.506Q18.216-61.331 18.089-61.203Q17.961-61.076 17.785-61.076M18.981-62.904Q19.350-62.904 19.598-63.146Q19.847-63.387 19.963-63.745Q20.079-64.104 20.079-64.477Q20.079-64.587 20.071-64.640Q20.075-64.653 20.077-64.664Q20.079-64.675 20.079-64.692Q20.079-65.347 19.864-65.886Q19.649-66.424 19.082-66.424Q18.722-66.424 18.493-66.274Q18.264-66.125 18.148-65.868Q18.032-65.611 17.999-65.330Q17.966-65.048 17.966-64.675L17.966-64.640Q17.966-64.314 17.992-64.027Q18.018-63.739 18.117-63.480Q18.216-63.220 18.427-63.062Q18.638-62.904 18.981-62.904",[2533],[2255,8359],{"fill":2524,"d":8360},"M161.876-60.689c0-6.286-10.8-11.381-24.124-11.381s-24.125 5.095-24.125 11.381 10.801 11.381 24.125 11.381 24.124-5.095 24.124-11.38Zm-24.124 0",[1260,8362,8363,8370,8376,8382],{"stroke":2524,"fontSize":8302},[1260,8364,8366],{"transform":8365},"translate(126.744 2.25)",[2255,8367],{"d":8368,"fill":2520,"stroke":2520,"className":8369,"style":2534},"M-4.467-61.427Q-4.467-61.559-4.440-61.678L-3.790-64.253L-4.735-64.253Q-4.844-64.253-4.844-64.372Q-4.844-64.433-4.811-64.501Q-4.779-64.569-4.717-64.569L-3.719-64.569L-3.359-66.006Q-3.324-66.147-3.212-66.235Q-3.100-66.323-2.964-66.323Q-2.841-66.323-2.757-66.248Q-2.674-66.173-2.674-66.055Q-2.674-65.998-2.682-65.971L-3.034-64.569L-2.107-64.569Q-2.058-64.569-2.030-64.536Q-2.001-64.503-2.001-64.460Q-2.001-64.394-2.034-64.323Q-2.067-64.253-2.124-64.253L-3.109-64.253L-3.763-61.643Q-3.816-61.440-3.816-61.247Q-3.816-60.852-3.557-60.852Q-3.276-60.852-3.045-61.032Q-2.814-61.212-2.643-61.484Q-2.471-61.757-2.370-62.021Q-2.362-62.047-2.340-62.064Q-2.318-62.082-2.287-62.082L-2.181-62.082Q-2.133-62.082-2.111-62.049Q-2.089-62.016-2.089-61.968Q-2.230-61.625-2.441-61.311Q-2.652-60.997-2.937-60.792Q-3.223-60.588-3.574-60.588Q-3.825-60.588-4.027-60.693Q-4.229-60.799-4.348-60.990Q-4.467-61.181-4.467-61.427",[2533],[1260,8371,8372],{"transform":8365},[2255,8373],{"d":8374,"fill":2520,"stroke":2520,"className":8375,"style":2534},"M7.848-60.689L4.816-60.689L4.816-61.005Q5.967-61.005 5.967-61.300L5.967-66.024Q5.479-65.791 4.758-65.791L4.758-66.107Q5.888-66.107 6.450-66.683L6.595-66.683Q6.630-66.683 6.663-66.650Q6.696-66.617 6.696-66.582L6.696-61.300Q6.696-61.005 7.848-61.005L7.848-60.689M12.466-60.689L9.434-60.689L9.434-61.005Q10.586-61.005 10.586-61.300L10.586-66.024Q10.098-65.791 9.377-65.791L9.377-66.107Q10.506-66.107 11.069-66.683L11.214-66.683Q11.249-66.683 11.282-66.650Q11.315-66.617 11.315-66.582L11.315-61.300Q11.315-61.005 12.466-61.005",[2533],[1260,8377,8378],{"transform":8365},[2255,8379],{"d":8380,"fill":2520,"stroke":2520,"className":8381,"style":2534},"M13.705-58.628Q13.705-58.672 13.714-58.689L16.926-67.320Q16.970-67.439 17.107-67.439Q17.181-67.439 17.238-67.382Q17.295-67.325 17.295-67.250Q17.295-67.206 17.287-67.189L14.083-58.558Q14.026-58.439 13.903-58.439Q13.819-58.439 13.762-58.496Q13.705-58.553 13.705-58.628",[2533],[1260,8383,8384],{"transform":8365},[2255,8385],{"d":8386,"fill":2520,"stroke":2520,"className":8387,"style":2534},"M21.723-60.689L18.691-60.689L18.691-61.005Q19.842-61.005 19.842-61.300L19.842-66.024Q19.354-65.791 18.633-65.791L18.633-66.107Q19.763-66.107 20.325-66.683L20.470-66.683Q20.505-66.683 20.538-66.650Q20.571-66.617 20.571-66.582L20.571-61.300Q20.571-61.005 21.723-61.005L21.723-60.689M24.746-60.491Q24.012-60.491 23.582-60.972Q23.151-61.454 22.986-62.146Q22.821-62.838 22.821-63.585Q22.821-64.314 23.114-65.037Q23.406-65.760 23.960-66.222Q24.513-66.683 25.260-66.683Q25.757-66.683 26.093-66.417Q26.429-66.151 26.429-65.668Q26.429-65.488 26.302-65.360Q26.174-65.233 25.999-65.233Q25.818-65.233 25.689-65.358Q25.559-65.483 25.559-65.668Q25.559-65.782 25.616-65.886Q25.673-65.989 25.774-66.048Q25.876-66.107 25.999-66.107Q26.003-66.107 26.007-66.105Q26.012-66.103 26.016-66.099Q25.902-66.266 25.693-66.345Q25.484-66.424 25.260-66.424Q24.816-66.424 24.458-66.123Q24.100-65.822 23.911-65.369Q23.678-64.763 23.678-63.730Q23.850-64.095 24.151-64.323Q24.452-64.552 24.838-64.552Q25.243-64.552 25.588-64.385Q25.933-64.218 26.170-63.937Q26.407-63.655 26.537-63.293Q26.667-62.930 26.667-62.526Q26.667-61.981 26.423-61.515Q26.179-61.049 25.739-60.770Q25.300-60.491 24.746-60.491M24.746-60.777Q25.208-60.777 25.443-61.034Q25.678-61.291 25.744-61.665Q25.810-62.038 25.810-62.508L25.810-62.543Q25.810-63.031 25.753-63.396Q25.695-63.761 25.467-64.024Q25.238-64.288 24.795-64.288Q24.425-64.288 24.175-64.044Q23.924-63.800 23.810-63.436Q23.696-63.071 23.696-62.724Q23.696-62.605 23.705-62.543Q23.705-62.526 23.702-62.515Q23.700-62.504 23.696-62.491Q23.696-61.840 23.933-61.309Q24.170-60.777 24.746-60.777",[2533],[2255,8389],{"fill":2524,"d":8390},"M110.636-4.477c0-6.286-11.154-11.381-24.914-11.381S60.81-10.763 60.81-4.477 71.963 6.904 85.722 6.904s24.914-5.095 24.914-11.38Zm-24.914 0",[1260,8392,8393,8400,8406,8412],{"stroke":2524,"fontSize":8302},[1260,8394,8396],{"transform":8395},"translate(74.157 58.462)",[2255,8397],{"d":8398,"fill":2520,"stroke":2520,"className":8399,"style":2534},"M-3.649-59.050Q-3.649-59.120-3.616-59.188Q-3.583-59.256-3.522-59.256Q-3.161-59.256-3.008-59.287Q-2.924-59.305-2.880-59.344Q-2.836-59.384-2.814-59.432Q-2.792-59.481-2.766-59.590L-2.397-61.076Q-2.920-60.588-3.429-60.588Q-3.825-60.588-4.111-60.792Q-4.396-60.997-4.543-61.331Q-4.691-61.665-4.691-62.056Q-4.691-62.491-4.517-62.952Q-4.343-63.414-4.031-63.805Q-3.719-64.196-3.309-64.431Q-2.898-64.666-2.458-64.666Q-2.181-64.666-1.948-64.503Q-1.716-64.341-1.597-64.082Q-1.505-64.227-1.283-64.446Q-1.061-64.666-0.955-64.666Q-0.911-64.666-0.881-64.635Q-0.850-64.605-0.850-64.561L-0.850-64.521L-2.098-59.529Q-2.107-59.476-2.115-59.434Q-2.124-59.393-2.124-59.366Q-2.124-59.256-1.549-59.256Q-1.505-59.256-1.478-59.226Q-1.452-59.195-1.452-59.142Q-1.452-58.944-1.614-58.944L-3.548-58.944Q-3.583-58.944-3.616-58.982Q-3.649-59.019-3.649-59.050M-3.412-60.852Q-3.078-60.852-2.772-61.089Q-2.467-61.326-2.252-61.651L-1.746-63.642Q-1.803-63.959-1.995-64.183Q-2.186-64.407-2.476-64.407Q-2.845-64.407-3.144-64.088Q-3.443-63.770-3.610-63.361Q-3.746-63.014-3.871-62.504Q-3.996-61.994-3.996-61.669Q-3.996-61.344-3.858-61.098Q-3.719-60.852-3.412-60.852",[2533],[1260,8401,8402],{"transform":8395},[2255,8403],{"d":8404,"fill":2520,"stroke":2520,"className":8405,"style":2534},"M8.964-60.689L5.932-60.689L5.932-61.005Q7.083-61.005 7.083-61.300L7.083-66.024Q6.595-65.791 5.874-65.791L5.874-66.107Q7.004-66.107 7.566-66.683L7.711-66.683Q7.746-66.683 7.779-66.650Q7.812-66.617 7.812-66.582L7.812-61.300Q7.812-61.005 8.964-61.005L8.964-60.689M13.582-60.689L10.133-60.689L10.133-60.922Q10.133-60.935 10.163-60.966L11.618-62.543Q12.084-63.040 12.337-63.345Q12.589-63.651 12.780-64.062Q12.972-64.473 12.972-64.912Q12.972-65.501 12.649-65.934Q12.326-66.367 11.745-66.367Q11.482-66.367 11.236-66.257Q10.990-66.147 10.814-65.960Q10.638-65.773 10.541-65.523L10.620-65.523Q10.823-65.523 10.965-65.387Q11.108-65.251 11.108-65.035Q11.108-64.829 10.965-64.690Q10.823-64.552 10.620-64.552Q10.418-64.552 10.276-64.695Q10.133-64.837 10.133-65.035Q10.133-65.497 10.370-65.870Q10.607-66.244 11.007-66.463Q11.407-66.683 11.855-66.683Q12.378-66.683 12.833-66.468Q13.288-66.252 13.560-65.853Q13.833-65.453 13.833-64.912Q13.833-64.517 13.661-64.163Q13.490-63.809 13.224-63.530Q12.958-63.251 12.508-62.866Q12.057-62.482 11.978-62.407L10.954-61.445L11.772-61.445Q12.422-61.445 12.859-61.456Q13.297-61.467 13.328-61.489Q13.398-61.572 13.453-61.812Q13.508-62.051 13.547-62.319L13.833-62.319",[2533],[1260,8407,8408],{"transform":8395},[2255,8409],{"d":8410,"fill":2520,"stroke":2520,"className":8411,"style":2534},"M14.821-58.628Q14.821-58.672 14.830-58.689L18.042-67.320Q18.086-67.439 18.223-67.439Q18.297-67.439 18.354-67.382Q18.411-67.325 18.411-67.250Q18.411-67.206 18.403-67.189L15.199-58.558Q15.142-58.439 15.019-58.439Q14.935-58.439 14.878-58.496Q14.821-58.553 14.821-58.628",[2533],[1260,8413,8414],{"transform":8395},[2255,8415],{"d":8416,"fill":2520,"stroke":2520,"className":8417,"style":2534},"M22.839-60.689L19.807-60.689L19.807-61.005Q20.958-61.005 20.958-61.300L20.958-66.024Q20.470-65.791 19.749-65.791L19.749-66.107Q20.879-66.107 21.441-66.683L21.586-66.683Q21.621-66.683 21.654-66.650Q21.687-66.617 21.687-66.582L21.687-61.300Q21.687-61.005 22.839-61.005L22.839-60.689M24.452-61.410L24.408-61.410Q24.610-61.093 24.996-60.935Q25.383-60.777 25.809-60.777Q26.346-60.777 26.585-61.212Q26.825-61.647 26.825-62.227Q26.825-62.807 26.578-63.247Q26.332-63.686 25.801-63.686L25.181-63.686Q25.155-63.686 25.122-63.715Q25.089-63.743 25.089-63.765L25.089-63.866Q25.089-63.897 25.117-63.921Q25.146-63.945 25.181-63.945L25.700-63.985Q26.165-63.985 26.411-64.457Q26.658-64.930 26.658-65.448Q26.658-65.875 26.444-66.149Q26.231-66.424 25.809-66.424Q25.467-66.424 25.141-66.294Q24.816-66.165 24.632-65.910L24.658-65.910Q24.860-65.910 24.996-65.769Q25.133-65.628 25.133-65.431Q25.133-65.233 24.999-65.099Q24.865-64.965 24.667-64.965Q24.465-64.965 24.326-65.099Q24.188-65.233 24.188-65.431Q24.188-66.020 24.691-66.351Q25.194-66.683 25.809-66.683Q26.187-66.683 26.589-66.543Q26.992-66.402 27.260-66.123Q27.528-65.844 27.528-65.448Q27.528-64.899 27.174-64.462Q26.820-64.024 26.280-63.840Q26.671-63.761 27.016-63.537Q27.361-63.313 27.572-62.972Q27.783-62.631 27.783-62.236Q27.783-61.854 27.620-61.531Q27.457-61.208 27.165-60.972Q26.873-60.737 26.526-60.614Q26.179-60.491 25.809-60.491Q25.361-60.491 24.931-60.652Q24.500-60.812 24.219-61.139Q23.937-61.467 23.937-61.924Q23.937-62.139 24.085-62.282Q24.232-62.425 24.452-62.425Q24.662-62.425 24.807-62.280Q24.953-62.135 24.953-61.924Q24.953-61.713 24.805-61.561Q24.658-61.410 24.452-61.410",[2533],[2255,8419],{"fill":2524,"d":8420},"M-31.136 69.9c0-6.285-8.36-11.38-18.671-11.38-10.313 0-18.672 5.095-18.672 11.38s8.36 11.381 18.672 11.381 18.67-5.095 18.67-11.38Zm-18.671 0",[1260,8422,8423,8430,8436,8442],{"stroke":2524,"fontSize":8302},[1260,8424,8426],{"transform":8425},"translate(-56.959 132.84)",[2255,8427],{"d":8428,"fill":2520,"stroke":2520,"className":8429,"style":2534},"M-4.194-59.393Q-4.106-59.239-3.933-59.173Q-3.759-59.107-3.557-59.107Q-3.232-59.107-2.968-59.283Q-2.704-59.459-2.522-59.729Q-2.340-59.999-2.208-60.329Q-2.076-60.658-2.001-60.957Q-2.401-60.588-2.871-60.588Q-3.236-60.588-3.500-60.715Q-3.763-60.843-3.908-61.089Q-4.053-61.335-4.053-61.687Q-4.053-61.972-3.977-62.291Q-3.900-62.609-3.785-62.910Q-3.671-63.211-3.513-63.616Q-3.394-63.901-3.394-64.134Q-3.394-64.253-3.440-64.330Q-3.487-64.407-3.592-64.407Q-3.944-64.407-4.179-64.046Q-4.414-63.686-4.519-63.255Q-4.537-63.172-4.612-63.172L-4.717-63.172Q-4.765-63.172-4.787-63.211Q-4.809-63.251-4.809-63.291Q-4.721-63.633-4.561-63.939Q-4.401-64.244-4.150-64.455Q-3.900-64.666-3.574-64.666Q-3.236-64.666-3.005-64.460Q-2.775-64.253-2.775-63.910Q-2.775-63.730-2.836-63.576Q-2.867-63.488-3.019-63.093Q-3.170-62.697-3.240-62.467Q-3.311-62.236-3.357-62.012Q-3.403-61.788-3.403-61.564Q-3.403-61.265-3.273-61.058Q-3.144-60.852-2.863-60.852Q-2.287-60.852-1.856-61.546L-1.179-64.253Q-1.144-64.394-1.030-64.481Q-0.916-64.569-0.775-64.569Q-0.661-64.569-0.580-64.492Q-0.498-64.416-0.498-64.297Q-0.498-64.244-0.507-64.218L-1.386-60.671Q-1.513-60.184-1.839-59.766Q-2.164-59.349-2.621-59.096Q-3.078-58.843-3.566-58.843Q-3.816-58.843-4.047-58.933Q-4.278-59.023-4.420-59.204Q-4.563-59.384-4.563-59.634Q-4.563-59.885-4.416-60.063Q-4.269-60.241-4.036-60.241Q-3.891-60.241-3.788-60.148Q-3.684-60.056-3.684-59.907Q-3.684-59.705-3.836-59.549Q-3.988-59.393-4.194-59.393",[2533],[1260,8431,8432],{"transform":8425},[2255,8433],{"d":8434,"fill":2520,"stroke":2520,"className":8435,"style":2534},"M6.380-61.410L6.336-61.410Q6.538-61.093 6.925-60.935Q7.312-60.777 7.738-60.777Q8.274-60.777 8.513-61.212Q8.753-61.647 8.753-62.227Q8.753-62.807 8.507-63.247Q8.261-63.686 7.729-63.686L7.109-63.686Q7.083-63.686 7.050-63.715Q7.017-63.743 7.017-63.765L7.017-63.866Q7.017-63.897 7.046-63.921Q7.074-63.945 7.109-63.945L7.628-63.985Q8.094-63.985 8.340-64.457Q8.586-64.930 8.586-65.448Q8.586-65.875 8.373-66.149Q8.160-66.424 7.738-66.424Q7.395-66.424 7.070-66.294Q6.745-66.165 6.560-65.910L6.586-65.910Q6.789-65.910 6.925-65.769Q7.061-65.628 7.061-65.431Q7.061-65.233 6.927-65.099Q6.793-64.965 6.595-64.965Q6.393-64.965 6.255-65.099Q6.116-65.233 6.116-65.431Q6.116-66.020 6.619-66.351Q7.123-66.683 7.738-66.683Q8.116-66.683 8.518-66.543Q8.920-66.402 9.188-66.123Q9.456-65.844 9.456-65.448Q9.456-64.899 9.102-64.462Q8.749-64.024 8.208-63.840Q8.599-63.761 8.944-63.537Q9.289-63.313 9.500-62.972Q9.711-62.631 9.711-62.236Q9.711-61.854 9.548-61.531Q9.386-61.208 9.094-60.972Q8.801-60.737 8.454-60.614Q8.107-60.491 7.738-60.491Q7.290-60.491 6.859-60.652Q6.428-60.812 6.147-61.139Q5.866-61.467 5.866-61.924Q5.866-62.139 6.013-62.282Q6.160-62.425 6.380-62.425Q6.591-62.425 6.736-62.280Q6.881-62.135 6.881-61.924Q6.881-61.713 6.734-61.561Q6.586-61.410 6.380-61.410",[2533],[1260,8437,8438],{"transform":8425},[2255,8439],{"d":8440,"fill":2520,"stroke":2520,"className":8441,"style":2534},"M10.618-58.628Q10.618-58.672 10.627-58.689L13.839-67.320Q13.883-67.439 14.020-67.439Q14.094-67.439 14.151-67.382Q14.208-67.325 14.208-67.250Q14.208-67.206 14.200-67.189L10.996-58.558Q10.939-58.439 10.816-58.439Q10.732-58.439 10.675-58.496Q10.618-58.553 10.618-58.628",[2533],[1260,8443,8444],{"transform":8425},[2255,8445],{"d":8446,"fill":2520,"stroke":2520,"className":8447,"style":2534},"M17.041-60.491Q16.307-60.491 15.876-60.972Q15.445-61.454 15.281-62.146Q15.116-62.838 15.116-63.585Q15.116-64.314 15.408-65.037Q15.700-65.760 16.254-66.222Q16.808-66.683 17.555-66.683Q18.051-66.683 18.387-66.417Q18.724-66.151 18.724-65.668Q18.724-65.488 18.596-65.360Q18.469-65.233 18.293-65.233Q18.113-65.233 17.983-65.358Q17.854-65.483 17.854-65.668Q17.854-65.782 17.911-65.886Q17.968-65.989 18.069-66.048Q18.170-66.107 18.293-66.107Q18.297-66.107 18.302-66.105Q18.306-66.103 18.311-66.099Q18.196-66.266 17.988-66.345Q17.779-66.424 17.555-66.424Q17.111-66.424 16.753-66.123Q16.395-65.822 16.206-65.369Q15.973-64.763 15.973-63.730Q16.144-64.095 16.445-64.323Q16.746-64.552 17.133-64.552Q17.537-64.552 17.882-64.385Q18.227-64.218 18.464-63.937Q18.702-63.655 18.831-63.293Q18.961-62.930 18.961-62.526Q18.961-61.981 18.717-61.515Q18.473-61.049 18.034-60.770Q17.594-60.491 17.041-60.491M17.041-60.777Q17.502-60.777 17.737-61.034Q17.972-61.291 18.038-61.665Q18.104-62.038 18.104-62.508L18.104-62.543Q18.104-63.031 18.047-63.396Q17.990-63.761 17.761-64.024Q17.533-64.288 17.089-64.288Q16.720-64.288 16.469-64.044Q16.219-63.800 16.104-63.436Q15.990-63.071 15.990-62.724Q15.990-62.605 15.999-62.543Q15.999-62.526 15.997-62.515Q15.995-62.504 15.990-62.491Q15.990-61.840 16.228-61.309Q16.465-60.777 17.041-60.777",[2533],[2255,8449],{"fill":2524,"d":8450},"M58.15 69.9c0-6.285-8.3-11.38-18.539-11.38-10.238 0-18.538 5.095-18.538 11.38s8.3 11.381 18.538 11.381c10.24 0 18.54-5.095 18.54-11.38Zm-18.539 0",[1260,8452,8453,8460,8466,8472],{"stroke":2524,"fontSize":8302},[1260,8454,8456],{"transform":8455},"translate(32.554 132.84)",[2255,8457],{"d":8458,"fill":2520,"stroke":2520,"className":8459,"style":2534},"M-4.484-60.588L-4.594-60.588Q-4.634-60.588-4.658-60.619Q-4.682-60.649-4.682-60.689Q-4.682-60.724-4.664-60.742Q-4.409-61.172-4.064-61.546Q-3.719-61.919-3.284-62.300Q-2.849-62.680-2.408-63.066Q-1.966-63.453-1.685-63.756Q-1.812-63.756-2.008-63.803Q-2.203-63.849-2.355-63.893Q-2.507-63.937-2.638-63.965Q-2.770-63.994-2.920-63.994Q-3.161-63.994-3.385-63.899Q-3.610-63.805-3.667-63.598Q-3.684-63.515-3.755-63.515L-3.864-63.515Q-3.952-63.515-3.952-63.633Q-3.891-63.875-3.717-64.121Q-3.544-64.367-3.304-64.517Q-3.065-64.666-2.792-64.666Q-2.612-64.666-2.471-64.574Q-2.331-64.481-2.181-64.325Q-2.032-64.169-1.926-64.095Q-1.821-64.020-1.676-64.020Q-1.509-64.020-1.393-64.137Q-1.276-64.253-1.140-64.455Q-1.004-64.657-0.947-64.666L-0.841-64.666Q-0.806-64.666-0.777-64.637Q-0.749-64.609-0.749-64.569Q-0.749-64.539-0.766-64.521Q-1.092-63.976-1.529-63.541Q-1.966-63.106-2.678-62.497Q-3.390-61.889-3.763-61.480L-3.746-61.480Q-3.640-61.498-3.592-61.498Q-3.416-61.498-3.199-61.440Q-2.981-61.383-2.766-61.324Q-2.551-61.265-2.370-61.265Q-2.010-61.265-1.685-61.476Q-1.360-61.687-1.280-62.012Q-1.272-62.043-1.248-62.067Q-1.223-62.091-1.188-62.091L-1.083-62.091Q-1.034-62.091-1.012-62.058Q-0.990-62.025-0.990-61.977Q-1.070-61.634-1.285-61.313Q-1.500-60.992-1.817-60.790Q-2.133-60.588-2.485-60.588Q-2.665-60.588-2.792-60.669Q-2.920-60.751-3.069-60.909Q-3.218-61.067-3.335-61.153Q-3.451-61.238-3.601-61.238Q-3.821-61.238-3.990-61.106Q-4.159-60.975-4.308-60.783Q-4.458-60.592-4.484-60.588",[2533],[1260,8461,8462],{"transform":8455},[2255,8463],{"d":8464,"fill":2520,"stroke":2520,"className":8465,"style":2534},"M6.914-60.931Q6.914-61.568 7.070-62.214Q7.226-62.860 7.518-63.466Q7.810-64.073 8.219-64.622L9.036-65.730L8.008-65.730Q6.364-65.730 6.316-65.686Q6.210-65.558 6.092-64.855L5.806-64.855L6.101-66.771L6.391-66.771L6.391-66.745Q6.391-66.582 6.955-66.534Q7.520-66.485 8.065-66.485L9.783-66.485L9.783-66.279Q9.783-66.261 9.781-66.252Q9.779-66.244 9.774-66.235L8.487-64.486Q8.236-64.134 8.089-63.708Q7.942-63.282 7.876-62.818Q7.810-62.355 7.797-61.944Q7.784-61.533 7.784-60.931Q7.784-60.751 7.658-60.621Q7.533-60.491 7.353-60.491Q7.234-60.491 7.131-60.548Q7.028-60.606 6.971-60.709Q6.914-60.812 6.914-60.931",[2533],[1260,8467,8468],{"transform":8455},[2255,8469],{"d":8470,"fill":2520,"stroke":2520,"className":8471,"style":2534},"M10.431-58.628Q10.431-58.672 10.440-58.689L13.652-67.320Q13.696-67.439 13.833-67.439Q13.907-67.439 13.964-67.382Q14.021-67.325 14.021-67.250Q14.021-67.206 14.013-67.189L10.809-58.558Q10.752-58.439 10.629-58.439Q10.545-58.439 10.488-58.496Q10.431-58.553 10.431-58.628",[2533],[1260,8473,8474],{"transform":8455},[2255,8475],{"d":8476,"fill":2520,"stroke":2520,"className":8477,"style":2534},"M14.929-62.056Q14.929-62.614 15.289-63.027Q15.649-63.440 16.225-63.712L15.856-63.945Q15.553-64.147 15.366-64.477Q15.179-64.807 15.179-65.163Q15.179-65.817 15.685-66.250Q16.190-66.683 16.854-66.683Q17.253-66.683 17.638-66.523Q18.022-66.362 18.271-66.057Q18.519-65.751 18.519-65.334Q18.519-64.503 17.451-63.945L18.005-63.598Q18.352-63.370 18.563-63.001Q18.774-62.631 18.774-62.218Q18.774-61.840 18.616-61.522Q18.458-61.203 18.181-60.970Q17.904-60.737 17.561-60.614Q17.218-60.491 16.854-60.491Q16.388-60.491 15.942-60.678Q15.496-60.865 15.212-61.219Q14.929-61.572 14.929-62.056M15.452-62.056Q15.452-61.511 15.871-61.144Q16.291-60.777 16.854-60.777Q17.183-60.777 17.508-60.909Q17.834-61.041 18.042-61.295Q18.251-61.550 18.251-61.893Q18.251-62.157 18.115-62.381Q17.979-62.605 17.746-62.759L16.502-63.541Q16.041-63.304 15.746-62.917Q15.452-62.530 15.452-62.056M16.063-64.811L17.179-64.108Q17.403-64.231 17.607-64.420Q17.812-64.609 17.932-64.842Q18.053-65.075 18.053-65.334Q18.053-65.642 17.882-65.892Q17.710-66.143 17.434-66.283Q17.157-66.424 16.845-66.424Q16.396-66.424 16.023-66.178Q15.649-65.932 15.649-65.505Q15.649-65.101 16.063-64.811",[2533],[2255,8479],{"fill":2524,"d":8480},"M-30.878 132.896c0-6.285-8.475-11.38-18.93-11.38s-18.929 5.095-18.929 11.38 8.475 11.381 18.93 11.381 18.929-5.095 18.929-11.38Zm-18.93 0",[1260,8482,8483,8490,8496,8502],{"stroke":2524,"fontSize":8302},[1260,8484,8486],{"transform":8485},"translate(-57.141 195.835)",[2255,8487],{"d":8488,"fill":2520,"stroke":2520,"className":8489,"style":2534},"M-4.322-60.979Q-4.146-60.852-3.873-60.852Q-3.583-60.852-3.370-61.106Q-3.157-61.361-3.078-61.678L-2.674-63.291Q-2.586-63.668-2.586-63.857Q-2.586-64.082-2.713-64.244Q-2.841-64.407-3.060-64.407Q-3.478-64.407-3.810-64.057Q-4.141-63.708-4.260-63.255Q-4.278-63.172-4.348-63.172L-4.458-63.172Q-4.546-63.172-4.546-63.291Q-4.414-63.831-3.992-64.249Q-3.570-64.666-3.043-64.666Q-2.709-64.666-2.434-64.495Q-2.159-64.323-2.045-64.029Q-1.887-64.301-1.641-64.484Q-1.395-64.666-1.109-64.666Q-0.771-64.666-0.498-64.499Q-0.226-64.332-0.226-64.011Q-0.226-63.783-0.369-63.614Q-0.511-63.444-0.749-63.444Q-0.889-63.444-0.995-63.537Q-1.100-63.629-1.100-63.774Q-1.100-63.959-0.977-64.101Q-0.854-64.244-0.670-64.279Q-0.850-64.407-1.127-64.407Q-1.417-64.407-1.628-64.150Q-1.839-63.893-1.918-63.576L-2.322-61.968Q-2.414-61.607-2.414-61.410Q-2.414-61.177-2.285-61.014Q-2.155-60.852-1.926-60.852Q-1.641-60.852-1.393-61.021Q-1.144-61.190-0.971-61.462Q-0.797-61.735-0.731-62.003Q-0.722-62.034-0.698-62.058Q-0.674-62.082-0.639-62.082L-0.533-62.082Q-0.494-62.082-0.468-62.045Q-0.441-62.007-0.441-61.968Q-0.529-61.621-0.749-61.302Q-0.968-60.983-1.285-60.786Q-1.601-60.588-1.944-60.588Q-2.282-60.588-2.557-60.757Q-2.832-60.926-2.955-61.230Q-3.104-60.961-3.353-60.775Q-3.601-60.588-3.882-60.588Q-4.225-60.588-4.499-60.755Q-4.774-60.922-4.774-61.247Q-4.774-61.471-4.625-61.643Q-4.475-61.814-4.242-61.814Q-4.097-61.814-3.994-61.722Q-3.891-61.629-3.891-61.480Q-3.891-61.304-4.014-61.157Q-4.137-61.010-4.322-60.979",[2533],[1260,8491,8492],{"transform":8485},[2255,8493],{"d":8494,"fill":2520,"stroke":2520,"className":8495,"style":2534},"M8.542-62.166L6.103-62.166L6.103-62.482L8.929-66.630Q8.973-66.683 9.039-66.683L9.193-66.683Q9.232-66.683 9.265-66.650Q9.298-66.617 9.298-66.573L9.298-62.482L10.199-62.482L10.199-62.166L9.298-62.166L9.298-61.300Q9.298-61.005 10.199-61.005L10.199-60.689L7.646-60.689L7.646-61.005Q8.006-61.005 8.274-61.060Q8.542-61.115 8.542-61.300L8.542-62.166M8.599-65.655L6.437-62.482L8.599-62.482",[2533],[1260,8497,8498],{"transform":8485},[2255,8499],{"d":8500,"fill":2520,"stroke":2520,"className":8501,"style":2534},"M10.983-58.628Q10.983-58.672 10.992-58.689L14.204-67.320Q14.248-67.439 14.385-67.439Q14.459-67.439 14.516-67.382Q14.573-67.325 14.573-67.250Q14.573-67.206 14.565-67.189L11.361-58.558Q11.304-58.439 11.181-58.439Q11.097-58.439 11.040-58.496Q10.983-58.553 10.983-58.628",[2533],[1260,8503,8504],{"transform":8485},[2255,8505],{"d":8506,"fill":2520,"stroke":2520,"className":8507,"style":2534},"M15.920-61.695Q16.061-61.282 16.421-61.030Q16.782-60.777 17.217-60.777Q17.669-60.777 17.935-61.030Q18.201-61.282 18.304-61.667Q18.407-62.051 18.407-62.508Q18.407-64.209 17.498-64.209Q17.177-64.209 16.948-64.115Q16.720-64.020 16.590-63.901Q16.461-63.783 16.349-63.644Q16.237-63.506 16.201-63.497L16.118-63.497Q16.074-63.497 16.043-63.528Q16.012-63.559 16.012-63.607L16.012-66.604Q16.012-66.635 16.048-66.659Q16.083-66.683 16.109-66.683L16.149-66.683Q16.782-66.393 17.454-66.393Q18.126-66.393 18.768-66.683L18.794-66.683Q18.825-66.683 18.858-66.661Q18.891-66.639 18.891-66.604L18.891-66.503Q18.891-66.499 18.882-66.481Q18.873-66.463 18.873-66.459Q18.557-66.064 18.087-65.842Q17.616-65.620 17.120-65.620Q16.711-65.620 16.329-65.730L16.329-64.011Q16.786-64.468 17.498-64.468Q18.008-64.468 18.407-64.187Q18.807-63.906 19.029-63.451Q19.251-62.996 19.251-62.491Q19.251-61.941 18.972-61.482Q18.693-61.023 18.227-60.757Q17.761-60.491 17.217-60.491Q16.777-60.491 16.393-60.718Q16.008-60.944 15.780-61.324Q15.551-61.704 15.551-62.148Q15.551-62.341 15.683-62.473Q15.815-62.605 16.012-62.605Q16.144-62.605 16.248-62.546Q16.351-62.486 16.410-62.383Q16.469-62.280 16.469-62.148Q16.469-61.950 16.342-61.818Q16.215-61.687 16.012-61.687Q15.951-61.687 15.920-61.695",[2533],[2255,8509],{"fill":2524,"d":8510},"M214.664-4.477c0-6.286-11.146-11.381-24.896-11.381s-24.895 5.095-24.895 11.381 11.146 11.381 24.895 11.381c13.75 0 24.896-5.095 24.896-11.38Zm-24.896 0",[1260,8512,8513,8520,8526,8532],{"stroke":2524,"fontSize":8302},[1260,8514,8516],{"transform":8515},"translate(178.216 58.462)",[2255,8517],{"d":8518,"fill":2520,"stroke":2520,"className":8519,"style":2534},"M-4.313-60.860Q-4.313-60.913-4.304-60.948L-3.636-63.616Q-3.583-63.814-3.583-64.011Q-3.583-64.407-3.847-64.407Q-4.133-64.407-4.267-64.084Q-4.401-63.761-4.519-63.255Q-4.537-63.172-4.612-63.172L-4.717-63.172Q-4.765-63.172-4.787-63.211Q-4.809-63.251-4.809-63.291Q-4.647-63.910-4.447-64.288Q-4.247-64.666-3.825-64.666Q-3.517-64.666-3.271-64.492Q-3.025-64.319-2.955-64.029Q-2.454-64.666-1.786-64.666Q-1.487-64.666-1.267-64.490Q-1.048-64.314-1.048-64.020Q-1.048-63.787-1.195-63.616Q-1.342-63.444-1.566-63.444Q-1.707-63.444-1.812-63.537Q-1.918-63.629-1.918-63.774Q-1.918-63.972-1.784-64.119Q-1.650-64.266-1.452-64.288Q-1.588-64.407-1.803-64.407Q-2.480-64.407-2.999-63.462L-3.627-60.913Q-3.658-60.777-3.774-60.682Q-3.891-60.588-4.027-60.588Q-4.146-60.588-4.229-60.663Q-4.313-60.737-4.313-60.860",[2533],[1260,8521,8522],{"transform":8515},[2255,8523],{"d":8524,"fill":2520,"stroke":2520,"className":8525,"style":2534},"M8.938-60.689L5.906-60.689L5.906-61.005Q7.057-61.005 7.057-61.300L7.057-66.024Q6.569-65.791 5.848-65.791L5.848-66.107Q6.978-66.107 7.540-66.683L7.685-66.683Q7.720-66.683 7.753-66.650Q7.786-66.617 7.786-66.582L7.786-61.300Q7.786-61.005 8.938-61.005L8.938-60.689M12.348-62.166L9.909-62.166L9.909-62.482L12.735-66.630Q12.779-66.683 12.844-66.683L12.998-66.683Q13.038-66.683 13.071-66.650Q13.104-66.617 13.104-66.573L13.104-62.482L14.005-62.482L14.005-62.166L13.104-62.166L13.104-61.300Q13.104-61.005 14.005-61.005L14.005-60.689L11.451-60.689L11.451-61.005Q11.812-61.005 12.080-61.060Q12.348-61.115 12.348-61.300L12.348-62.166M12.405-65.655L10.243-62.482L12.405-62.482",[2533],[1260,8527,8528],{"transform":8515},[2255,8529],{"d":8530,"fill":2520,"stroke":2520,"className":8531,"style":2534},"M14.795-58.628Q14.795-58.672 14.804-58.689L18.016-67.320Q18.060-67.439 18.197-67.439Q18.271-67.439 18.328-67.382Q18.385-67.325 18.385-67.250Q18.385-67.206 18.377-67.189L15.173-58.558Q15.116-58.439 14.993-58.439Q14.909-58.439 14.852-58.496Q14.795-58.553 14.795-58.628",[2533],[1260,8533,8534],{"transform":8515},[2255,8535],{"d":8536,"fill":2520,"stroke":2520,"className":8537,"style":2534},"M22.813-60.689L19.781-60.689L19.781-61.005Q20.932-61.005 20.932-61.300L20.932-66.024Q20.444-65.791 19.723-65.791L19.723-66.107Q20.853-66.107 21.415-66.683L21.560-66.683Q21.595-66.683 21.628-66.650Q21.661-66.617 21.661-66.582L21.661-61.300Q21.661-61.005 22.813-61.005L22.813-60.689M24.351-61.695Q24.491-61.282 24.852-61.030Q25.212-60.777 25.647-60.777Q26.100-60.777 26.366-61.030Q26.632-61.282 26.735-61.667Q26.838-62.051 26.838-62.508Q26.838-64.209 25.928-64.209Q25.608-64.209 25.379-64.115Q25.151-64.020 25.021-63.901Q24.891-63.783 24.779-63.644Q24.667-63.506 24.632-63.497L24.549-63.497Q24.505-63.497 24.474-63.528Q24.443-63.559 24.443-63.607L24.443-66.604Q24.443-66.635 24.478-66.659Q24.513-66.683 24.540-66.683L24.579-66.683Q25.212-66.393 25.885-66.393Q26.557-66.393 27.198-66.683L27.225-66.683Q27.256-66.683 27.289-66.661Q27.322-66.639 27.322-66.604L27.322-66.503Q27.322-66.499 27.313-66.481Q27.304-66.463 27.304-66.459Q26.988-66.064 26.517-65.842Q26.047-65.620 25.551-65.620Q25.142-65.620 24.760-65.730L24.760-64.011Q25.217-64.468 25.928-64.468Q26.438-64.468 26.838-64.187Q27.238-63.906 27.460-63.451Q27.682-62.996 27.682-62.491Q27.682-61.941 27.403-61.482Q27.124-61.023 26.658-60.757Q26.192-60.491 25.647-60.491Q25.208-60.491 24.823-60.718Q24.439-60.944 24.210-61.324Q23.982-61.704 23.982-62.148Q23.982-62.341 24.114-62.473Q24.245-62.605 24.443-62.605Q24.575-62.605 24.678-62.546Q24.781-62.486 24.841-62.383Q24.900-62.280 24.900-62.148Q24.900-61.950 24.773-61.818Q24.645-61.687 24.443-61.687Q24.382-61.687 24.351-61.695",[2533],[1260,8539,8540,8543],{"style":4798},[2255,8541],{"fill":2524,"d":8542},"M-5.051-49.108v46.04",[2255,8544],{"d":8545},"m-5.051.398 1.802-4.753L-5.05-2.77l-1.802-1.586Z",[1260,8547,8548,8551],{"style":4798},[2255,8549],{"fill":2524,"d":8550},"M-13.445 24.23-38.3 55.446",[2255,8552],{"d":8553,"style":8554},"m-40.458 58.159 4.37-2.597-2.398.119-.422-2.364Z","stroke-width:1.19994",[1260,8556,8557,8560],{"style":4798},[2255,8558],{"fill":2524,"d":8559},"M-49.807 81.481v34.658",[2255,8561],{"d":8562},"m-49.807 119.606 1.802-4.753-1.802 1.586-1.803-1.586Z",[1260,8564,8565,8568],{"style":4798},[2255,8566],{"fill":2524,"d":8567},"m3.328 24.234 24.805 31.219",[2255,8569],{"d":8570,"style":4976},"m30.29 58.167-1.547-4.842-.424 2.363-2.398-.121Z",[1260,8572,8573,8576],{"style":4798},[2255,8574],{"fill":2524,"d":8575},"M127.942-50.092 99.096-18.926",[2255,8577],{"d":8578,"style":6915},"m96.741-16.382 4.552-2.264-2.4-.06-.246-2.389Z",[1260,8580,8581,8584],{"style":4798},[2255,8582],{"fill":2524,"d":8583},"m147.559-50.091 28.839 31.165",[2255,8585],{"d":8586,"style":6915},"m178.753-16.381-1.906-4.713-.246 2.388-2.4.06Z",[1260,8588,8589,8592],{"fill":5250,"stroke":5250,"style":6958},[2255,8590],{"fill":2524,"d":8591},"M2.271-49.785C26.999-12.681 35.964 13.833 38.629 55.261",[2255,8593],{"d":8594,"style":8595},"m38.79 57.762 1.118-3.664-1.272 1.263-1.424-1.09Z","stroke-dasharray:none;stroke-width:.39997600000000005",[1260,8597,8598,8601],{"fill":5250,"stroke":5250,"style":6958},[2255,8599],{"fill":2524,"d":8600},"M32.208 80.538c-17.372 26.165-34.43 38.75-61.607 46.758",[2255,8602],{"d":8603,"style":8595},"m-31.802 128.004 3.82.282-1.513-.962.75-1.629Z",[1260,8605,8606,8609],{"fill":5250,"stroke":5250,"style":6958},[2255,8607],{"fill":2524,"d":8608},"M33.565 58.939C12.085 19.877 3.578-5.096-2.777-46.11",[2255,8610],{"d":8611,"style":6974},"m-3.16-48.585-.787 3.748 1.155-1.371 1.515.958Z",[1260,8613,8614,8617],{"fill":5250,"stroke":5250,"style":6958},[2255,8615],{"fill":2524,"d":8616},"M164.673-4.477h-50.762",[2255,8618],{"d":8619,"style":6983},"m111.405-4.477 3.585 1.35-1.179-1.35 1.179-1.35Z",[2579,8621,8623],{"className":8622},[2582],"DFS forest on a digraph with start and finish times and classified non-tree edges.",[381,8625,8626,8627,658,8630,8737,8738,603,8753,8768,8769,8772],{},"The discovery and finish times nest like balanced parentheses. Write each\nvertex's ",[394,8628,8629],{},"interval",[429,8631,8633],{"className":8632},[432],[429,8634,8636],{"className":8635,"ariaHidden":437},[436],[429,8637,8639,8642,8645,8685,8688,8691,8694,8734],{"className":8638},[441],[429,8640],{"className":8641,"style":472},[445],[429,8643,3144],{"className":8644},[476],[429,8646,8648,8651],{"className":8647},[450],[429,8649,4589],{"className":8650},[450,451],[429,8652,8654],{"className":8653},[1529],[429,8655,8657,8677],{"className":8656},[1062,1063],[429,8658,8660,8674],{"className":8659},[1067],[429,8661,8663],{"className":8662,"style":7703},[1071],[429,8664,8665,8668],{"style":1896},[429,8666],{"className":8667,"style":1080},[1079],[429,8669,8671],{"className":8670},[1084,1085,1086,1087],[429,8672,581],{"className":8673,"style":580},[450,451,1087],[429,8675,1113],{"className":8676},[1112],[429,8678,8680],{"className":8679},[1067],[429,8681,8683],{"className":8682,"style":1867},[1071],[429,8684],{},[429,8686,487],{"className":8687},[486],[429,8689],{"className":8690,"style":491},[456],[429,8692],{"className":8693,"style":491},[456],[429,8695,8697,8700],{"className":8696},[450],[429,8698,6655],{"className":8699,"style":6654},[450,451],[429,8701,8703],{"className":8702},[1529],[429,8704,8706,8726],{"className":8705},[1062,1063],[429,8707,8709,8723],{"className":8708},[1067],[429,8710,8712],{"className":8711,"style":7703},[1071],[429,8713,8714,8717],{"style":7779},[429,8715],{"className":8716,"style":1080},[1079],[429,8718,8720],{"className":8719},[1084,1085,1086,1087],[429,8721,581],{"className":8722,"style":580},[450,451,1087],[429,8724,1113],{"className":8725},[1112],[429,8727,8729],{"className":8728},[1067],[429,8730,8732],{"className":8731,"style":1867},[1071],[429,8733],{},[429,8735,3151],{"className":8736},[500],". For any two vertices ",[429,8739,8741],{"className":8740},[432],[429,8742,8744],{"className":8743,"ariaHidden":437},[436],[429,8745,8747,8750],{"className":8746},[441],[429,8748],{"className":8749,"style":599},[445],[429,8751,570],{"className":8752},[450,451],[429,8754,8756],{"className":8755},[432],[429,8757,8759],{"className":8758,"ariaHidden":437},[436],[429,8760,8762,8765],{"className":8761},[441],[429,8763],{"className":8764,"style":599},[445],[429,8766,581],{"className":8767,"style":580},[450,451],", exactly\none of three things holds, since they can never ",[385,8770,8771],{},"partially"," overlap:",[1134,8774,8775,8786],{},[1137,8776,8777,8778,8781,8782,8785],{},"the intervals are ",[394,8779,8780],{},"disjoint",", and neither vertex is a descendant of the\nother (they are ",[385,8783,8784],{},"incomparable","), or",[1137,8787,8788,8789,8792,8793,8796],{},"one interval ",[394,8790,8791],{},"contains"," the other, and the contained vertex is a\n",[394,8794,8795],{},"descendant"," of the container in the DFS forest.",[381,8798,8799,8800,8803,8804,8812,8813,8917,8918,8921],{},"This is the ",[394,8801,8802],{},"nesting theorem"," (CLRS calls it the parenthesis theorem), and it\nmakes the recursion visible.",[403,8805,8806],{},[406,8807,8811],{"href":8808,"ariaDescribedBy":8809,"dataFootnoteRef":376,"id":8810},"#user-content-fn-erickson-dfs",[410],"user-content-fnref-erickson-dfs","4"," Drawing each interval ",[429,8814,8816],{"className":8815},[432],[429,8817,8819],{"className":8818,"ariaHidden":437},[436],[429,8820,8822,8825,8828,8868,8871,8874,8914],{"className":8821},[441],[429,8823],{"className":8824,"style":472},[445],[429,8826,3144],{"className":8827},[476],[429,8829,8831,8834],{"className":8830},[450],[429,8832,4589],{"className":8833},[450,451],[429,8835,8837],{"className":8836},[1529],[429,8838,8840,8860],{"className":8839},[1062,1063],[429,8841,8843,8857],{"className":8842},[1067],[429,8844,8846],{"className":8845,"style":7703},[1071],[429,8847,8848,8851],{"style":1896},[429,8849],{"className":8850,"style":1080},[1079],[429,8852,8854],{"className":8853},[1084,1085,1086,1087],[429,8855,581],{"className":8856,"style":580},[450,451,1087],[429,8858,1113],{"className":8859},[1112],[429,8861,8863],{"className":8862},[1067],[429,8864,8866],{"className":8865,"style":1867},[1071],[429,8867],{},[429,8869,487],{"className":8870},[486],[429,8872],{"className":8873,"style":491},[456],[429,8875,8877,8880],{"className":8876},[450],[429,8878,6655],{"className":8879,"style":6654},[450,451],[429,8881,8883],{"className":8882},[1529],[429,8884,8886,8906],{"className":8885},[1062,1063],[429,8887,8889,8903],{"className":8888},[1067],[429,8890,8892],{"className":8891,"style":7703},[1071],[429,8893,8894,8897],{"style":7779},[429,8895],{"className":8896,"style":1080},[1079],[429,8898,8900],{"className":8899},[1084,1085,1086,1087],[429,8901,581],{"className":8902,"style":580},[450,451,1087],[429,8904,1113],{"className":8905},[1112],[429,8907,8909],{"className":8908},[1067],[429,8910,8912],{"className":8911,"style":1867},[1071],[429,8913],{},[429,8915,3151],{"className":8916},[500]," as\na bar along the time axis turns the forest into a literal stack of nested\nbrackets — a bar sits ",[385,8919,8920],{},"strictly inside"," another exactly when the inner vertex is\na descendant of the outer:",[2506,8923,8925,9208],{"className":8924},[2509,2510],[2512,8926,8930],{"xmlns":2514,"width":8927,"height":8928,"viewBox":8929},"322.417","113.532","-75 -75 241.813 85.149",[1260,8931,8932,8942,8951,8960,8969,8978,8987,8996,9005,9014,9023,9032,9041,9050,9059,9068,9077,9095,9110,9124,9138,9152,9166,9180,9194],{"stroke":2520,"style":2521},[1260,8933,8934],{"fill":5250,"stroke":5250},[1260,8935,8937],{"transform":8936},"translate(10.526 2.256)",[2255,8938],{"d":8939,"fill":5250,"stroke":5250,"className":8940,"style":8941},"M-67.085 1.290L-69.615 1.290L-69.615 1.010Q-68.647 1.010-68.647 0.801L-68.647-2.818Q-69.040-2.630-69.662-2.630L-69.662-2.911Q-69.245-2.911-68.881-3.012Q-68.517-3.112-68.261-3.358L-68.135-3.358Q-68.070-3.341-68.053-3.273L-68.053 0.801Q-68.053 1.010-67.085 1.010",[2533],"stroke-width:0.210",[1260,8943,8944],{"fill":5250,"stroke":5250},[1260,8945,8947],{"transform":8946},"translate(23.045 2.256)",[2255,8948],{"d":8949,"fill":5250,"stroke":5250,"className":8950,"style":8941},"M-67.085 1.290L-69.970 1.290L-69.970 1.088Q-69.970 1.058-69.943 1.030L-68.695-0.187Q-68.623-0.262-68.581-0.304Q-68.538-0.347-68.459-0.426Q-68.046-0.839-67.815-1.197Q-67.584-1.554-67.584-1.978Q-67.584-2.210-67.663-2.413Q-67.742-2.617-67.883-2.767Q-68.025-2.918-68.220-2.998Q-68.415-3.078-68.647-3.078Q-68.958-3.078-69.216-2.919Q-69.474-2.760-69.604-2.483L-69.584-2.483Q-69.416-2.483-69.309-2.372Q-69.201-2.261-69.201-2.097Q-69.201-1.940-69.310-1.827Q-69.420-1.714-69.584-1.714Q-69.744-1.714-69.857-1.827Q-69.970-1.940-69.970-2.097Q-69.970-2.473-69.762-2.760Q-69.553-3.047-69.218-3.203Q-68.883-3.358-68.528-3.358Q-68.104-3.358-67.724-3.200Q-67.345-3.041-67.111-2.724Q-66.877-2.408-66.877-1.978Q-66.877-1.667-67.017-1.398Q-67.157-1.130-67.362-0.925Q-67.567-0.720-67.930-0.438Q-68.292-0.156-68.401-0.060L-69.256 0.668L-68.613 0.668Q-68.350 0.668-68.061 0.666Q-67.772 0.665-67.554 0.656Q-67.335 0.647-67.318 0.630Q-67.256 0.565-67.219 0.398Q-67.181 0.230-67.143-0.012L-66.877-0.012",[2533],[1260,8952,8953],{"fill":5250,"stroke":5250},[1260,8954,8956],{"transform":8955},"translate(35.564 2.256)",[2255,8957],{"d":8958,"fill":5250,"stroke":5250,"className":8959,"style":8941},"M-69.615 0.743Q-69.495 0.900-69.304 0.999Q-69.112 1.099-68.897 1.138Q-68.682 1.177-68.459 1.177Q-68.162 1.177-67.967 1.022Q-67.772 0.866-67.682 0.612Q-67.591 0.357-67.591 0.073Q-67.591-0.221-67.683-0.472Q-67.776-0.723-67.974-0.879Q-68.172-1.034-68.466-1.034L-68.982-1.034Q-69.010-1.034-69.035-1.060Q-69.061-1.085-69.061-1.109L-69.061-1.181Q-69.061-1.212-69.035-1.234Q-69.010-1.256-68.982-1.256L-68.541-1.287Q-68.179-1.287-67.959-1.644Q-67.738-2.002-67.738-2.391Q-67.738-2.719-67.933-2.923Q-68.128-3.126-68.459-3.126Q-68.746-3.126-68.999-3.042Q-69.252-2.959-69.416-2.771Q-69.269-2.771-69.169-2.656Q-69.068-2.542-69.068-2.391Q-69.068-2.241-69.174-2.131Q-69.280-2.022-69.437-2.022Q-69.598-2.022-69.707-2.131Q-69.816-2.241-69.816-2.391Q-69.816-2.716-69.608-2.935Q-69.399-3.153-69.083-3.256Q-68.767-3.358-68.459-3.358Q-68.141-3.358-67.813-3.254Q-67.485-3.150-67.258-2.928Q-67.031-2.706-67.031-2.391Q-67.031-1.957-67.318-1.632Q-67.605-1.308-68.039-1.161Q-67.728-1.096-67.448-0.930Q-67.167-0.764-66.990-0.506Q-66.812-0.248-66.812 0.073Q-66.812 0.483-67.056 0.793Q-67.301 1.102-67.682 1.266Q-68.063 1.430-68.459 1.430Q-68.828 1.430-69.186 1.317Q-69.543 1.205-69.787 0.955Q-70.032 0.706-70.032 0.336Q-70.032 0.165-69.915 0.053Q-69.799-0.060-69.628-0.060Q-69.519-0.060-69.428-0.009Q-69.338 0.042-69.283 0.135Q-69.228 0.227-69.228 0.336Q-69.228 0.504-69.341 0.623Q-69.454 0.743-69.615 0.743",[2533],[1260,8961,8962],{"fill":5250,"stroke":5250},[1260,8963,8965],{"transform":8964},"translate(48.084 2.256)",[2255,8966],{"d":8967,"fill":5250,"stroke":5250,"className":8968,"style":8941},"M-68.094 0.142L-70.138 0.142L-70.138-0.139L-67.807-3.311Q-67.772-3.358-67.707-3.358L-67.571-3.358Q-67.526-3.358-67.499-3.331Q-67.472-3.304-67.472-3.259L-67.472-0.139L-66.709-0.139L-66.709 0.142L-67.472 0.142L-67.472 0.801Q-67.472 1.010-66.716 1.010L-66.716 1.290L-68.849 1.290L-68.849 1.010Q-68.094 1.010-68.094 0.801L-68.094 0.142M-68.046-2.583L-69.837-0.139L-68.046-0.139",[2533],[1260,8970,8971],{"fill":5250,"stroke":5250},[1260,8972,8974],{"transform":8973},"translate(60.603 2.256)",[2255,8975],{"d":8976,"fill":5250,"stroke":5250,"className":8977,"style":8941},"M-69.604 0.528L-69.635 0.528Q-69.498 0.825-69.201 1.001Q-68.904 1.177-68.576 1.177Q-68.213 1.177-67.986 0.999Q-67.759 0.822-67.665 0.533Q-67.571 0.244-67.571-0.118Q-67.571-0.433-67.625-0.718Q-67.680-1.003-67.853-1.209Q-68.025-1.414-68.340-1.414Q-68.613-1.414-68.796-1.347Q-68.979-1.280-69.083-1.191Q-69.187-1.103-69.283-0.993Q-69.379-0.884-69.423-0.874L-69.502-0.874Q-69.574-0.891-69.591-0.962L-69.591-3.280Q-69.591-3.314-69.567-3.336Q-69.543-3.358-69.509-3.358L-69.481-3.358Q-69.194-3.242-68.926-3.188Q-68.658-3.133-68.381-3.133Q-68.104-3.133-67.834-3.188Q-67.564-3.242-67.284-3.358L-67.260-3.358Q-67.225-3.358-67.202-3.335Q-67.178-3.311-67.178-3.280L-67.178-3.211Q-67.178-3.184-67.198-3.164Q-67.472-2.849-67.856-2.673Q-68.241-2.497-68.654-2.497Q-68.993-2.497-69.310-2.583L-69.310-1.301Q-68.914-1.636-68.340-1.636Q-67.936-1.636-67.600-1.426Q-67.263-1.215-67.070-0.863Q-66.877-0.511-66.877-0.111Q-66.877 0.220-67.017 0.506Q-67.157 0.791-67.401 1.001Q-67.646 1.211-67.948 1.321Q-68.251 1.430-68.569 1.430Q-68.928 1.430-69.254 1.266Q-69.580 1.102-69.775 0.810Q-69.970 0.518-69.970 0.155Q-69.970 0.005-69.864-0.101Q-69.758-0.207-69.604-0.207Q-69.451-0.207-69.346-0.103Q-69.242 0.001-69.242 0.155Q-69.242 0.312-69.346 0.420Q-69.451 0.528-69.604 0.528",[2533],[1260,8979,8980],{"fill":5250,"stroke":5250},[1260,8981,8983],{"transform":8982},"translate(73.122 2.256)",[2255,8984],{"d":8985,"fill":5250,"stroke":5250,"className":8986,"style":8941},"M-68.422 1.430Q-68.880 1.430-69.198 1.215Q-69.515 0.999-69.697 0.647Q-69.878 0.295-69.955-0.125Q-70.032-0.545-70.032-0.973Q-70.032-1.557-69.779-2.113Q-69.526-2.668-69.056-3.013Q-68.586-3.358-67.988-3.358Q-67.578-3.358-67.294-3.160Q-67.010-2.962-67.010-2.559Q-67.010-2.463-67.056-2.384Q-67.102-2.306-67.183-2.261Q-67.263-2.217-67.352-2.217Q-67.499-2.217-67.600-2.314Q-67.701-2.412-67.701-2.559Q-67.701-2.689-67.610-2.796Q-67.519-2.904-67.386-2.904Q-67.574-3.126-67.988-3.126Q-68.302-3.126-68.576-2.962Q-68.849-2.798-69.016-2.524Q-69.204-2.234-69.269-1.868Q-69.334-1.502-69.334-1.048Q-69.184-1.342-68.919-1.520Q-68.654-1.697-68.340-1.697Q-67.909-1.697-67.560-1.491Q-67.212-1.284-67.012-0.928Q-66.812-0.573-66.812-0.146Q-66.812 0.299-67.029 0.659Q-67.246 1.020-67.619 1.225Q-67.991 1.430-68.422 1.430M-68.422 1.177Q-68.046 1.177-67.842 0.994Q-67.639 0.811-67.576 0.528Q-67.513 0.244-67.513-0.146Q-67.513-0.532-67.567-0.812Q-67.622-1.092-67.817-1.284Q-68.012-1.475-68.381-1.475Q-68.671-1.475-68.883-1.299Q-69.095-1.123-69.203-0.850Q-69.310-0.576-69.310-0.293L-69.310-0.152L-69.310-0.111Q-69.310 0.394-69.099 0.786Q-68.887 1.177-68.422 1.177",[2533],[1260,8988,8989],{"fill":5250,"stroke":5250},[1260,8990,8992],{"transform":8991},"translate(85.641 2.256)",[2255,8993],{"d":8994,"fill":5250,"stroke":5250,"className":8995,"style":8941},"M-68.975 1.082Q-68.975 0.576-68.846 0.068Q-68.716-0.439-68.478-0.901Q-68.241-1.362-67.906-1.783L-67.260-2.596L-68.073-2.596Q-68.658-2.596-69.054-2.588Q-69.451-2.579-69.474-2.559Q-69.577-2.442-69.656-1.916L-69.922-1.916L-69.676-3.440L-69.410-3.440L-69.410-3.420Q-69.410-3.352-69.334-3.309Q-69.259-3.266-69.181-3.259Q-68.989-3.235-68.794-3.229Q-68.599-3.222-68.408-3.220Q-68.217-3.218-68.018-3.218L-66.597-3.218L-66.597-3.030Q-66.607-2.982-66.617-2.972L-67.673-1.649Q-67.892-1.376-68.015-1.063Q-68.138-0.751-68.196-0.402Q-68.254-0.053-68.268 0.278Q-68.282 0.610-68.282 1.082Q-68.282 1.232-68.381 1.331Q-68.480 1.430-68.627 1.430Q-68.777 1.430-68.876 1.331Q-68.975 1.232-68.975 1.082",[2533],[1260,8997,8998],{"fill":5250,"stroke":5250},[1260,8999,9001],{"transform":9000},"translate(98.16 2.256)",[2255,9002],{"d":9003,"fill":5250,"stroke":5250,"className":9004,"style":8941},"M-70.032 0.213Q-70.032-0.228-69.729-0.549Q-69.427-0.870-68.975-1.062L-69.215-1.202Q-69.485-1.362-69.651-1.620Q-69.816-1.878-69.816-2.176Q-69.816-2.528-69.611-2.800Q-69.406-3.071-69.085-3.215Q-68.764-3.358-68.422-3.358Q-68.100-3.358-67.777-3.242Q-67.454-3.126-67.243-2.885Q-67.031-2.644-67.031-2.309Q-67.031-1.947-67.275-1.684Q-67.519-1.420-67.899-1.243L-67.499-1.007Q-67.304-0.894-67.145-0.725Q-66.986-0.556-66.899-0.347Q-66.812-0.139-66.812 0.094Q-66.812 0.497-67.046 0.801Q-67.280 1.105-67.654 1.268Q-68.029 1.430-68.422 1.430Q-68.808 1.430-69.177 1.293Q-69.546 1.157-69.789 0.880Q-70.032 0.603-70.032 0.213M-69.584 0.213Q-69.584 0.500-69.415 0.723Q-69.245 0.945-68.977 1.061Q-68.709 1.177-68.422 1.177Q-67.984 1.177-67.622 0.960Q-67.260 0.743-67.260 0.336Q-67.260 0.135-67.388-0.043Q-67.516-0.221-67.694-0.320L-68.716-0.915Q-68.955-0.805-69.153-0.639Q-69.351-0.474-69.468-0.258Q-69.584-0.043-69.584 0.213M-69.061-1.916L-68.141-1.383Q-67.834-1.543-67.632-1.776Q-67.431-2.008-67.431-2.309Q-67.431-2.548-67.576-2.738Q-67.721-2.928-67.953-3.027Q-68.186-3.126-68.422-3.126Q-68.644-3.126-68.873-3.056Q-69.102-2.986-69.259-2.829Q-69.416-2.671-69.416-2.442Q-69.416-2.128-69.061-1.916",[2533],[1260,9006,9007],{"fill":5250,"stroke":5250},[1260,9008,9010],{"transform":9009},"translate(110.68 2.256)",[2255,9011],{"d":9012,"fill":5250,"stroke":5250,"className":9013,"style":8941},"M-69.437 0.976Q-69.317 1.092-69.140 1.134Q-68.962 1.177-68.746 1.177Q-68.507 1.177-68.297 1.068Q-68.087 0.958-67.933 0.776Q-67.779 0.593-67.680 0.360Q-67.513-0.067-67.513-0.887Q-67.663-0.593-67.926-0.414Q-68.189-0.234-68.507-0.234Q-68.941-0.234-69.288-0.443Q-69.635-0.651-69.833-1.012Q-70.032-1.373-70.032-1.796Q-70.032-2.131-69.902-2.420Q-69.772-2.709-69.541-2.923Q-69.310-3.136-69.011-3.247Q-68.712-3.358-68.381-3.358Q-67.523-3.358-67.167-2.644Q-66.812-1.930-66.812-0.973Q-66.812-0.556-66.940-0.128Q-67.068 0.299-67.325 0.654Q-67.581 1.010-67.943 1.220Q-68.306 1.430-68.746 1.430Q-69.201 1.430-69.519 1.242Q-69.837 1.054-69.837 0.630Q-69.837 0.480-69.738 0.381Q-69.639 0.282-69.488 0.282Q-69.420 0.282-69.353 0.309Q-69.286 0.336-69.242 0.381Q-69.198 0.425-69.170 0.492Q-69.143 0.559-69.143 0.630Q-69.143 0.760-69.223 0.858Q-69.304 0.955-69.437 0.976M-68.466-0.460Q-68.172-0.460-67.957-0.638Q-67.742-0.815-67.634-1.091Q-67.526-1.366-67.526-1.656Q-67.526-1.701-67.528-1.728Q-67.530-1.755-67.533-1.790Q-67.530-1.800-67.528-1.807Q-67.526-1.814-67.526-1.824Q-67.526-2.326-67.724-2.726Q-67.923-3.126-68.381-3.126Q-68.948-3.126-69.141-2.767Q-69.334-2.408-69.334-1.796Q-69.334-1.410-69.280-1.127Q-69.225-0.843-69.030-0.651Q-68.835-0.460-68.466-0.460",[2533],[1260,9015,9016],{"fill":5250,"stroke":5250},[1260,9017,9019],{"transform":9018},"translate(121.206 2.256)",[2255,9020],{"d":9021,"fill":5250,"stroke":5250,"className":9022,"style":8941},"M-67.085 1.290L-69.615 1.290L-69.615 1.010Q-68.647 1.010-68.647 0.801L-68.647-2.818Q-69.040-2.630-69.662-2.630L-69.662-2.911Q-69.245-2.911-68.881-3.012Q-68.517-3.112-68.261-3.358L-68.135-3.358Q-68.070-3.341-68.053-3.273L-68.053 0.801Q-68.053 1.010-67.085 1.010L-67.085 1.290M-64.440 1.430Q-65.076 1.430-65.440 1.085Q-65.804 0.740-65.939 0.215Q-66.074-0.310-66.074-0.935Q-66.074-1.960-65.718-2.659Q-65.363-3.358-64.440-3.358Q-63.514-3.358-63.161-2.659Q-62.809-1.960-62.809-0.935Q-62.809-0.310-62.944 0.215Q-63.079 0.740-63.442 1.085Q-63.804 1.430-64.440 1.430M-64.440 1.205Q-64.002 1.205-63.789 0.830Q-63.575 0.456-63.526-0.011Q-63.476-0.477-63.476-1.055Q-63.476-1.608-63.526-2.036Q-63.575-2.463-63.787-2.798Q-63.999-3.133-64.440-3.133Q-64.782-3.133-64.985-2.926Q-65.188-2.719-65.276-2.407Q-65.363-2.094-65.385-1.778Q-65.407-1.461-65.407-1.055Q-65.407-0.638-65.385-0.296Q-65.363 0.046-65.274 0.394Q-65.185 0.743-64.980 0.974Q-64.775 1.205-64.440 1.205",[2533],[1260,9024,9025],{"fill":5250,"stroke":5250},[1260,9026,9028],{"transform":9027},"translate(133.725 2.256)",[2255,9029],{"d":9030,"fill":5250,"stroke":5250,"className":9031,"style":8941},"M-67.085 1.290L-69.615 1.290L-69.615 1.010Q-68.647 1.010-68.647 0.801L-68.647-2.818Q-69.040-2.630-69.662-2.630L-69.662-2.911Q-69.245-2.911-68.881-3.012Q-68.517-3.112-68.261-3.358L-68.135-3.358Q-68.070-3.341-68.053-3.273L-68.053 0.801Q-68.053 1.010-67.085 1.010L-67.085 1.290M-63.103 1.290L-65.633 1.290L-65.633 1.010Q-64.665 1.010-64.665 0.801L-64.665-2.818Q-65.058-2.630-65.681-2.630L-65.681-2.911Q-65.264-2.911-64.900-3.012Q-64.536-3.112-64.279-3.358L-64.153-3.358Q-64.088-3.341-64.071-3.273L-64.071 0.801Q-64.071 1.010-63.103 1.010",[2533],[1260,9033,9034],{"fill":5250,"stroke":5250},[1260,9035,9037],{"transform":9036},"translate(146.244 2.256)",[2255,9038],{"d":9039,"fill":5250,"stroke":5250,"className":9040,"style":8941},"M-67.085 1.290L-69.615 1.290L-69.615 1.010Q-68.647 1.010-68.647 0.801L-68.647-2.818Q-69.040-2.630-69.662-2.630L-69.662-2.911Q-69.245-2.911-68.881-3.012Q-68.517-3.112-68.261-3.358L-68.135-3.358Q-68.070-3.341-68.053-3.273L-68.053 0.801Q-68.053 1.010-67.085 1.010L-67.085 1.290M-63.103 1.290L-65.988 1.290L-65.988 1.088Q-65.988 1.058-65.961 1.030L-64.713-0.187Q-64.641-0.262-64.599-0.304Q-64.556-0.347-64.477-0.426Q-64.064-0.839-63.833-1.197Q-63.602-1.554-63.602-1.978Q-63.602-2.210-63.681-2.413Q-63.760-2.617-63.901-2.767Q-64.043-2.918-64.238-2.998Q-64.433-3.078-64.665-3.078Q-64.976-3.078-65.234-2.919Q-65.493-2.760-65.622-2.483L-65.602-2.483Q-65.434-2.483-65.327-2.372Q-65.219-2.261-65.219-2.097Q-65.219-1.940-65.328-1.827Q-65.438-1.714-65.602-1.714Q-65.763-1.714-65.875-1.827Q-65.988-1.940-65.988-2.097Q-65.988-2.473-65.780-2.760Q-65.571-3.047-65.236-3.203Q-64.901-3.358-64.546-3.358Q-64.122-3.358-63.743-3.200Q-63.363-3.041-63.129-2.724Q-62.895-2.408-62.895-1.978Q-62.895-1.667-63.035-1.398Q-63.175-1.130-63.380-0.925Q-63.585-0.720-63.948-0.438Q-64.310-0.156-64.419-0.060L-65.274 0.668L-64.631 0.668Q-64.368 0.668-64.079 0.666Q-63.790 0.665-63.572 0.656Q-63.353 0.647-63.336 0.630Q-63.274 0.565-63.237 0.398Q-63.199 0.230-63.161-0.012L-62.895-0.012",[2533],[1260,9042,9043],{"fill":5250,"stroke":5250},[1260,9044,9046],{"transform":9045},"translate(158.763 2.256)",[2255,9047],{"d":9048,"fill":5250,"stroke":5250,"className":9049,"style":8941},"M-67.085 1.290L-69.615 1.290L-69.615 1.010Q-68.647 1.010-68.647 0.801L-68.647-2.818Q-69.040-2.630-69.662-2.630L-69.662-2.911Q-69.245-2.911-68.881-3.012Q-68.517-3.112-68.261-3.358L-68.135-3.358Q-68.070-3.341-68.053-3.273L-68.053 0.801Q-68.053 1.010-67.085 1.010L-67.085 1.290M-65.633 0.743Q-65.513 0.900-65.322 0.999Q-65.130 1.099-64.915 1.138Q-64.700 1.177-64.477 1.177Q-64.180 1.177-63.985 1.022Q-63.790 0.866-63.700 0.612Q-63.609 0.357-63.609 0.073Q-63.609-0.221-63.702-0.472Q-63.794-0.723-63.992-0.879Q-64.190-1.034-64.484-1.034L-65-1.034Q-65.028-1.034-65.053-1.060Q-65.079-1.085-65.079-1.109L-65.079-1.181Q-65.079-1.212-65.053-1.234Q-65.028-1.256-65-1.256L-64.559-1.287Q-64.197-1.287-63.977-1.644Q-63.756-2.002-63.756-2.391Q-63.756-2.719-63.951-2.923Q-64.146-3.126-64.477-3.126Q-64.765-3.126-65.017-3.042Q-65.270-2.959-65.434-2.771Q-65.287-2.771-65.187-2.656Q-65.086-2.542-65.086-2.391Q-65.086-2.241-65.192-2.131Q-65.298-2.022-65.455-2.022Q-65.616-2.022-65.725-2.131Q-65.834-2.241-65.834-2.391Q-65.834-2.716-65.626-2.935Q-65.417-3.153-65.101-3.256Q-64.785-3.358-64.477-3.358Q-64.160-3.358-63.831-3.254Q-63.503-3.150-63.276-2.928Q-63.049-2.706-63.049-2.391Q-63.049-1.957-63.336-1.632Q-63.623-1.308-64.057-1.161Q-63.746-1.096-63.466-0.930Q-63.185-0.764-63.008-0.506Q-62.830-0.248-62.830 0.073Q-62.830 0.483-63.074 0.793Q-63.319 1.102-63.700 1.266Q-64.081 1.430-64.477 1.430Q-64.847 1.430-65.204 1.317Q-65.561 1.205-65.805 0.955Q-66.050 0.706-66.050 0.336Q-66.050 0.165-65.933 0.053Q-65.817-0.060-65.646-0.060Q-65.537-0.060-65.446-0.009Q-65.356 0.042-65.301 0.135Q-65.246 0.227-65.246 0.336Q-65.246 0.504-65.359 0.623Q-65.472 0.743-65.633 0.743",[2533],[1260,9051,9052],{"fill":5250,"stroke":5250},[1260,9053,9055],{"transform":9054},"translate(171.282 2.256)",[2255,9056],{"d":9057,"fill":5250,"stroke":5250,"className":9058,"style":8941},"M-67.085 1.290L-69.615 1.290L-69.615 1.010Q-68.647 1.010-68.647 0.801L-68.647-2.818Q-69.040-2.630-69.662-2.630L-69.662-2.911Q-69.245-2.911-68.881-3.012Q-68.517-3.112-68.261-3.358L-68.135-3.358Q-68.070-3.341-68.053-3.273L-68.053 0.801Q-68.053 1.010-67.085 1.010L-67.085 1.290M-64.112 0.142L-66.156 0.142L-66.156-0.139L-63.825-3.311Q-63.790-3.358-63.725-3.358L-63.589-3.358Q-63.544-3.358-63.517-3.331Q-63.490-3.304-63.490-3.259L-63.490-0.139L-62.727-0.139L-62.727 0.142L-63.490 0.142L-63.490 0.801Q-63.490 1.010-62.734 1.010L-62.734 1.290L-64.867 1.290L-64.867 1.010Q-64.112 1.010-64.112 0.801L-64.112 0.142M-64.064-2.583L-65.855-0.139L-64.064-0.139",[2533],[1260,9060,9061],{"fill":5250,"stroke":5250},[1260,9062,9064],{"transform":9063},"translate(183.802 2.256)",[2255,9065],{"d":9066,"fill":5250,"stroke":5250,"className":9067,"style":8941},"M-67.085 1.290L-69.615 1.290L-69.615 1.010Q-68.647 1.010-68.647 0.801L-68.647-2.818Q-69.040-2.630-69.662-2.630L-69.662-2.911Q-69.245-2.911-68.881-3.012Q-68.517-3.112-68.261-3.358L-68.135-3.358Q-68.070-3.341-68.053-3.273L-68.053 0.801Q-68.053 1.010-67.085 1.010L-67.085 1.290M-65.622 0.528L-65.653 0.528Q-65.516 0.825-65.219 1.001Q-64.922 1.177-64.594 1.177Q-64.231 1.177-64.004 0.999Q-63.777 0.822-63.683 0.533Q-63.589 0.244-63.589-0.118Q-63.589-0.433-63.643-0.718Q-63.698-1.003-63.871-1.209Q-64.043-1.414-64.358-1.414Q-64.631-1.414-64.814-1.347Q-64.997-1.280-65.101-1.191Q-65.205-1.103-65.301-0.993Q-65.397-0.884-65.441-0.874L-65.520-0.874Q-65.592-0.891-65.609-0.962L-65.609-3.280Q-65.609-3.314-65.585-3.336Q-65.561-3.358-65.527-3.358L-65.499-3.358Q-65.212-3.242-64.944-3.188Q-64.676-3.133-64.399-3.133Q-64.122-3.133-63.852-3.188Q-63.582-3.242-63.302-3.358L-63.278-3.358Q-63.244-3.358-63.220-3.335Q-63.196-3.311-63.196-3.280L-63.196-3.211Q-63.196-3.184-63.216-3.164Q-63.490-2.849-63.874-2.673Q-64.259-2.497-64.672-2.497Q-65.011-2.497-65.328-2.583L-65.328-1.301Q-64.932-1.636-64.358-1.636Q-63.954-1.636-63.618-1.426Q-63.281-1.215-63.088-0.863Q-62.895-0.511-62.895-0.111Q-62.895 0.220-63.035 0.506Q-63.175 0.791-63.420 1.001Q-63.664 1.211-63.966 1.321Q-64.269 1.430-64.587 1.430Q-64.946 1.430-65.272 1.266Q-65.599 1.102-65.793 0.810Q-65.988 0.518-65.988 0.155Q-65.988 0.005-65.882-0.101Q-65.776-0.207-65.622-0.207Q-65.469-0.207-65.364-0.103Q-65.260 0.001-65.260 0.155Q-65.260 0.312-65.364 0.420Q-65.469 0.528-65.622 0.528",[2533],[1260,9069,9070],{"fill":5250,"stroke":5250},[1260,9071,9073],{"transform":9072},"translate(196.32 2.256)",[2255,9074],{"d":9075,"fill":5250,"stroke":5250,"className":9076,"style":8941},"M-67.085 1.290L-69.615 1.290L-69.615 1.010Q-68.647 1.010-68.647 0.801L-68.647-2.818Q-69.040-2.630-69.662-2.630L-69.662-2.911Q-69.245-2.911-68.881-3.012Q-68.517-3.112-68.261-3.358L-68.135-3.358Q-68.070-3.341-68.053-3.273L-68.053 0.801Q-68.053 1.010-67.085 1.010L-67.085 1.290M-64.440 1.430Q-64.898 1.430-65.216 1.215Q-65.534 0.999-65.715 0.647Q-65.896 0.295-65.973-0.125Q-66.050-0.545-66.050-0.973Q-66.050-1.557-65.797-2.113Q-65.544-2.668-65.074-3.013Q-64.604-3.358-64.006-3.358Q-63.596-3.358-63.312-3.160Q-63.028-2.962-63.028-2.559Q-63.028-2.463-63.074-2.384Q-63.120-2.306-63.201-2.261Q-63.281-2.217-63.370-2.217Q-63.517-2.217-63.618-2.314Q-63.719-2.412-63.719-2.559Q-63.719-2.689-63.628-2.796Q-63.537-2.904-63.404-2.904Q-63.592-3.126-64.006-3.126Q-64.320-3.126-64.594-2.962Q-64.867-2.798-65.035-2.524Q-65.223-2.234-65.287-1.868Q-65.352-1.502-65.352-1.048Q-65.202-1.342-64.937-1.520Q-64.672-1.697-64.358-1.697Q-63.927-1.697-63.578-1.491Q-63.230-1.284-63.030-0.928Q-62.830-0.573-62.830-0.146Q-62.830 0.299-63.047 0.659Q-63.264 1.020-63.637 1.225Q-64.009 1.430-64.440 1.430M-64.440 1.177Q-64.064 1.177-63.860 0.994Q-63.657 0.811-63.594 0.528Q-63.531 0.244-63.531-0.146Q-63.531-0.532-63.585-0.812Q-63.640-1.092-63.835-1.284Q-64.030-1.475-64.399-1.475Q-64.689-1.475-64.901-1.299Q-65.113-1.123-65.221-0.850Q-65.328-0.576-65.328-0.293L-65.328-0.152L-65.328-0.111Q-65.328 0.394-65.117 0.786Q-64.905 1.177-64.440 1.177",[2533],[1260,9078,9079,9082,9086],{"fill":5250,"stroke":5250},[2255,9080],{"fill":2524,"d":9081},"M-65.403-7.957h206.166",[2255,9083],{"fill":2524,"d":9084,"style":9085},"M138.883-10.357c.38 1.44 1.227 2.12 2.08 2.4-.853.28-1.7.96-2.08 2.4","stroke-linecap:round;stroke-linejoin:round",[1260,9087,9088],{"fill":2520,"stroke":2520},[1260,9089,9091],{"transform":9090},"translate(215.107 -6.893)",[2255,9092],{"d":9093,"fill":2520,"stroke":2520,"className":9094,"style":8941},"M-69.570 0.449L-69.570-1.448L-70.209-1.448L-70.209-1.670Q-69.891-1.670-69.674-1.880Q-69.457-2.090-69.357-2.400Q-69.256-2.709-69.256-3.017L-68.989-3.017L-68.989-1.728L-67.912-1.728L-67.912-1.448L-68.989-1.448L-68.989 0.436Q-68.989 0.712-68.885 0.911Q-68.781 1.109-68.521 1.109Q-68.364 1.109-68.258 1.005Q-68.152 0.900-68.102 0.747Q-68.053 0.593-68.053 0.436L-68.053 0.022L-67.786 0.022L-67.786 0.449Q-67.786 0.675-67.885 0.885Q-67.984 1.095-68.169 1.227Q-68.353 1.358-68.582 1.358Q-69.020 1.358-69.295 1.121Q-69.570 0.883-69.570 0.449M-65.359 1.290L-66.911 1.290L-66.911 1.010Q-66.685 1.010-66.537 0.976Q-66.388 0.941-66.388 0.801L-66.388-1.048Q-66.388-1.236-66.436-1.320Q-66.484-1.403-66.581-1.422Q-66.679-1.441-66.890-1.441L-66.890-1.721L-65.834-1.796L-65.834 0.801Q-65.834 0.941-65.703 0.976Q-65.571 1.010-65.359 1.010L-65.359 1.290M-66.631-3.017Q-66.631-3.188-66.508-3.307Q-66.385-3.427-66.214-3.427Q-66.046-3.427-65.923-3.307Q-65.800-3.188-65.800-3.017Q-65.800-2.842-65.923-2.719Q-66.046-2.596-66.214-2.596Q-66.385-2.596-66.508-2.719Q-66.631-2.842-66.631-3.017M-63.032 1.290L-64.665 1.290L-64.665 1.010Q-64.436 1.010-64.288 0.976Q-64.139 0.941-64.139 0.801L-64.139-1.048Q-64.139-1.318-64.247-1.379Q-64.354-1.441-64.665-1.441L-64.665-1.721L-63.606-1.796L-63.606-1.147Q-63.435-1.455-63.131-1.626Q-62.827-1.796-62.481-1.796Q-62.081-1.796-61.805-1.656Q-61.528-1.516-61.442-1.168Q-61.275-1.461-60.976-1.629Q-60.677-1.796-60.331-1.796Q-59.826-1.796-59.542-1.573Q-59.258-1.349-59.258-0.853L-59.258 0.801Q-59.258 0.938-59.109 0.974Q-58.961 1.010-58.735 1.010L-58.735 1.290L-60.366 1.290L-60.366 1.010Q-60.140 1.010-59.990 0.974Q-59.839 0.938-59.839 0.801L-59.839-0.839Q-59.839-1.174-59.959-1.374Q-60.078-1.574-60.393-1.574Q-60.663-1.574-60.897-1.438Q-61.131-1.301-61.270-1.067Q-61.408-0.833-61.408-0.559L-61.408 0.801Q-61.408 0.938-61.259 0.974Q-61.111 1.010-60.885 1.010L-60.885 1.290L-62.515 1.290L-62.515 1.010Q-62.286 1.010-62.138 0.976Q-61.989 0.941-61.989 0.801L-61.989-0.839Q-61.989-1.174-62.109-1.374Q-62.228-1.574-62.543-1.574Q-62.813-1.574-63.047-1.438Q-63.281-1.301-63.420-1.067Q-63.558-0.833-63.558-0.559L-63.558 0.801Q-63.558 0.938-63.408 0.974Q-63.257 1.010-63.032 1.010L-63.032 1.290M-58.188-0.245Q-58.188-0.566-58.064-0.855Q-57.939-1.144-57.713-1.367Q-57.488-1.591-57.192-1.711Q-56.896-1.831-56.578-1.831Q-56.250-1.831-55.989-1.731Q-55.727-1.632-55.551-1.450Q-55.375-1.267-55.281-1.009Q-55.187-0.751-55.187-0.419Q-55.187-0.327-55.269-0.306L-57.525-0.306L-57.525-0.245Q-57.525 0.343-57.242 0.726Q-56.958 1.109-56.390 1.109Q-56.069 1.109-55.801 0.916Q-55.533 0.723-55.444 0.408Q-55.437 0.367-55.362 0.353L-55.269 0.353Q-55.187 0.377-55.187 0.449Q-55.187 0.456-55.194 0.483Q-55.307 0.880-55.678 1.119Q-56.049 1.358-56.473 1.358Q-56.910 1.358-57.310 1.150Q-57.710 0.941-57.949 0.574Q-58.188 0.207-58.188-0.245M-57.518-0.515L-55.703-0.515Q-55.703-0.792-55.801-1.044Q-55.898-1.297-56.097-1.453Q-56.295-1.608-56.578-1.608Q-56.855-1.608-57.069-1.450Q-57.283-1.291-57.401-1.036Q-57.518-0.781-57.518-0.515",[2533],[1260,9096,9098,9101],{"fill":4797,"stroke":4797,"style":9097},"stroke-width:2",[2255,9099],{"fill":2524,"d":9100},"M-57.892-17.204H54.781",[1260,9102,9103],{"fill":2520,"stroke":2520},[1260,9104,9106],{"transform":9105},"translate(66.968 -22.827)",[2255,9107],{"d":9108,"fill":2520,"stroke":2520,"className":9109,"style":8941},"M-69.577 0.870Q-69.386 1.136-68.781 1.136Q-68.552 1.136-68.307 1.066Q-68.063 0.996-67.901 0.841Q-67.738 0.685-67.738 0.442Q-67.738 0.268-67.889 0.160Q-68.039 0.053-68.234 0.015L-68.688-0.067Q-68.958-0.122-69.146-0.310Q-69.334-0.498-69.334-0.754Q-69.334-1.079-69.148-1.316Q-68.962-1.554-68.664-1.675Q-68.367-1.796-68.046-1.796Q-67.841-1.796-67.625-1.737Q-67.410-1.677-67.268-1.542Q-67.126-1.407-67.126-1.195Q-67.126-1.027-67.220-0.901Q-67.314-0.774-67.478-0.774Q-67.578-0.774-67.651-0.839Q-67.724-0.904-67.724-1.007Q-67.724-1.127-67.641-1.224Q-67.557-1.321-67.444-1.342Q-67.601-1.574-68.059-1.574Q-68.357-1.574-68.606-1.431Q-68.856-1.287-68.856-1.007Q-68.856-0.751-68.494-0.668L-68.032-0.586Q-67.718-0.525-67.489-0.316Q-67.260-0.108-67.260 0.200Q-67.260 0.463-67.415 0.714Q-67.571 0.965-67.807 1.116Q-68.200 1.358-68.787 1.358Q-69.215 1.358-69.565 1.203Q-69.915 1.047-69.915 0.682Q-69.915 0.487-69.799 0.343Q-69.683 0.200-69.488 0.200Q-69.369 0.200-69.288 0.271Q-69.208 0.343-69.208 0.463Q-69.208 0.620-69.314 0.736Q-69.420 0.853-69.577 0.870",[2533],[1260,9111,9112,9115],{"fill":4797,"stroke":4797,"style":9097},[2255,9113],{"fill":2524,"d":9114},"M-45.373-32h87.635",[1260,9116,9117],{"fill":2520,"stroke":2520},[1260,9118,9120],{"transform":9119},"translate(65.869 -37.623)",[2255,9121],{"d":9122,"fill":2520,"stroke":2520,"className":9123,"style":8941},"M-69.416 0.429Q-69.416 0.282-69.377 0.097Q-69.338-0.087-69.286-0.241Q-69.235-0.395-69.146-0.619Q-69.057-0.843-68.996-1Q-68.921-1.202-68.921-1.342Q-68.921-1.441-68.960-1.508Q-68.999-1.574-69.088-1.574Q-69.369-1.574-69.558-1.303Q-69.748-1.031-69.837-0.699Q-69.847-0.634-69.909-0.634L-70.018-0.634Q-70.049-0.634-70.073-0.665Q-70.097-0.696-70.097-0.720L-70.097-0.747Q-70.028-1.007-69.888-1.244Q-69.748-1.482-69.538-1.639Q-69.328-1.796-69.075-1.796Q-68.893-1.796-68.738-1.725Q-68.582-1.653-68.485-1.518Q-68.388-1.383-68.388-1.202Q-68.388-1.085-68.435-0.949Q-68.654-0.405-68.758-0.098Q-68.863 0.210-68.863 0.514Q-68.863 0.801-68.695 0.969Q-68.528 1.136-68.234 1.136Q-67.830 1.136-67.591 0.576Q-67.591 0.535-67.593 0.506Q-67.595 0.477-67.598 0.442Q-67.598 0.285-67.540 0.053L-67.164-1.468Q-67.126-1.588-67.037-1.658Q-66.949-1.728-66.832-1.728Q-66.733-1.728-66.661-1.665Q-66.590-1.602-66.590-1.502Q-66.590-1.475-66.603-1.420L-66.979 0.101Q-67.044 0.343-67.044 0.535Q-67.044 0.811-66.897 0.974Q-66.750 1.136-66.477 1.136Q-66.255 1.136-66.084 1.006Q-65.913 0.876-65.790 0.676Q-65.667 0.477-65.581 0.261Q-65.335-0.357-65.335-0.648Q-65.335-0.853-65.397-0.947Q-65.458-1.041-65.587-1.179Q-65.715-1.318-65.715-1.414Q-65.715-1.513-65.657-1.602Q-65.599-1.690-65.508-1.747Q-65.417-1.803-65.315-1.803Q-65.123-1.803-65.038-1.631Q-64.953-1.458-64.953-1.243Q-64.953-0.969-65.064-0.523Q-65.175-0.077-65.308 0.261Q-65.438 0.569-65.593 0.805Q-65.749 1.040-65.974 1.199Q-66.200 1.358-66.484 1.358Q-66.815 1.358-67.087 1.252Q-67.359 1.146-67.492 0.897Q-67.803 1.358-68.247 1.358Q-68.753 1.358-69.085 1.136Q-69.416 0.914-69.416 0.429",[2533],[1260,9125,9126,9129],{"fill":4797,"stroke":4797,"style":9097},[2255,9127],{"fill":2524,"d":9128},"M-32.853-46.795H4.704",[1260,9130,9131],{"fill":2520,"stroke":2520},[1260,9132,9134],{"transform":9133},"translate(54.183 -53.78)",[2255,9135],{"d":9136,"fill":2520,"stroke":2520,"className":9137,"style":8941},"M-69.809 2.103Q-69.809 1.912-69.693 1.772Q-69.577 1.632-69.389 1.632Q-69.269 1.632-69.186 1.707Q-69.102 1.782-69.102 1.898Q-69.102 2.052-69.208 2.168Q-69.314 2.285-69.468 2.305Q-69.307 2.493-68.962 2.493Q-68.473 2.493-68.080 1.977Q-67.936 1.786-67.848 1.570Q-67.759 1.355-67.687 1.058Q-68.022 1.358-68.422 1.358Q-68.869 1.358-69.146 1.134Q-69.423 0.911-69.423 0.470Q-69.423 0.159-69.316-0.161Q-69.208-0.481-68.996-1Q-68.921-1.202-68.921-1.342Q-68.921-1.441-68.960-1.508Q-68.999-1.574-69.088-1.574Q-69.369-1.574-69.558-1.303Q-69.748-1.031-69.837-0.699Q-69.847-0.634-69.909-0.634L-70.018-0.634Q-70.049-0.634-70.073-0.665Q-70.097-0.696-70.097-0.720L-70.097-0.747Q-70.028-1.007-69.888-1.244Q-69.748-1.482-69.538-1.639Q-69.328-1.796-69.075-1.796Q-68.893-1.796-68.738-1.725Q-68.582-1.653-68.485-1.518Q-68.388-1.383-68.388-1.202Q-68.388-1.085-68.435-0.949Q-68.651-0.419-68.764-0.077Q-68.876 0.265-68.876 0.576Q-68.876 0.818-68.762 0.977Q-68.647 1.136-68.408 1.136Q-67.926 1.136-67.560 0.541L-67.058-1.468Q-67.027-1.581-66.935-1.655Q-66.843-1.728-66.730-1.728Q-66.627-1.728-66.556-1.665Q-66.484-1.602-66.484-1.502Q-66.484-1.479-66.485-1.465Q-66.487-1.451-66.491-1.434L-67.178 1.317Q-67.273 1.700-67.548 2.023Q-67.824 2.346-68.203 2.532Q-68.582 2.719-68.975 2.719Q-69.293 2.719-69.551 2.561Q-69.809 2.404-69.809 2.103",[2533],[1260,9139,9140,9143],{"fill":4797,"stroke":4797,"style":9097},[2255,9141],{"fill":2524,"d":9142},"M-20.334-61.59h12.519",[1260,9144,9145],{"fill":2520,"stroke":2520},[1260,9146,9148],{"transform":9147},"translate(54.069 -67.213)",[2255,9149],{"d":9150,"fill":2520,"stroke":2520,"className":9151,"style":8941},"M-69.676 1.030Q-69.533 1.136-69.304 1.136Q-69.078 1.136-68.904 0.940Q-68.729 0.743-68.675 0.514L-68.360-0.747Q-68.288-1.014-68.288-1.147Q-68.288-1.338-68.400-1.456Q-68.511-1.574-68.702-1.574Q-68.931-1.574-69.129-1.450Q-69.328-1.325-69.469-1.121Q-69.611-0.918-69.669-0.699Q-69.680-0.634-69.738-0.634L-69.850-0.634Q-69.881-0.634-69.905-0.665Q-69.929-0.696-69.929-0.720L-69.929-0.747Q-69.816-1.174-69.463-1.485Q-69.109-1.796-68.688-1.796Q-68.517-1.796-68.353-1.743Q-68.189-1.690-68.056-1.586Q-67.923-1.482-67.848-1.328Q-67.707-1.533-67.506-1.665Q-67.304-1.796-67.085-1.796Q-66.795-1.796-66.566-1.661Q-66.337-1.526-66.337-1.256Q-66.337-1.137-66.390-1.033Q-66.443-0.928-66.540-0.865Q-66.638-0.802-66.757-0.802Q-66.873-0.802-66.955-0.875Q-67.037-0.949-67.037-1.068Q-67.037-1.209-66.947-1.323Q-66.856-1.438-66.723-1.468Q-66.877-1.574-67.099-1.574Q-67.253-1.574-67.383-1.480Q-67.513-1.386-67.601-1.250Q-67.690-1.113-67.738-0.949L-68.053 0.309Q-68.114 0.593-68.114 0.709Q-68.114 0.900-68.003 1.018Q-67.892 1.136-67.701 1.136Q-67.526 1.136-67.367 1.061Q-67.208 0.986-67.078 0.856Q-66.949 0.726-66.860 0.569Q-66.771 0.412-66.737 0.261Q-66.713 0.200-66.658 0.200L-66.549 0.200Q-66.515 0.200-66.492 0.225Q-66.470 0.251-66.470 0.282Q-66.470 0.295-66.477 0.309Q-66.545 0.589-66.730 0.829Q-66.914 1.068-67.174 1.213Q-67.434 1.358-67.718 1.358Q-67.984 1.358-68.213 1.239Q-68.442 1.119-68.555 0.890Q-68.685 1.088-68.888 1.223Q-69.092 1.358-69.321 1.358Q-69.601 1.358-69.832 1.223Q-70.062 1.088-70.062 0.822Q-70.062 0.641-69.941 0.504Q-69.820 0.367-69.642 0.367Q-69.522 0.367-69.442 0.439Q-69.362 0.511-69.362 0.630Q-69.362 0.770-69.449 0.885Q-69.536 0.999-69.676 1.030",[2533],[1260,9153,9154,9157],{"fill":4797,"stroke":4797,"style":9097},[2255,9155],{"fill":2524,"d":9156},"M17.223-46.795h12.52",[1260,9158,9159],{"fill":2520,"stroke":2520},[1260,9160,9162],{"transform":9161},"translate(91.84 -52.418)",[2255,9163],{"d":9164,"fill":2520,"stroke":2520,"className":9165,"style":8941},"M-69.803 1.358L-69.915 1.358Q-69.991 1.358-69.991 1.276Q-69.991 1.249-69.984 1.235Q-69.782 0.904-69.502 0.613Q-69.222 0.323-68.887 0.048Q-68.552-0.228-68.174-0.535Q-67.796-0.843-67.554-1.089Q-67.728-1.089-68.056-1.159Q-68.384-1.229-68.569-1.229Q-68.770-1.229-68.892-1.186Q-69.013-1.144-69.064-1.094Q-69.116-1.044-69.165-0.973Q-69.215-0.901-69.242-0.894L-69.355-0.894Q-69.386-0.894-69.408-0.920Q-69.430-0.945-69.430-0.980Q-69.430-0.986-69.423-1.007Q-69.372-1.212-69.232-1.397Q-69.092-1.581-68.888-1.689Q-68.685-1.796-68.473-1.796Q-68.326-1.796-68.218-1.737Q-68.111-1.677-67.967-1.550Q-67.824-1.424-67.733-1.369Q-67.642-1.314-67.526-1.314Q-67.400-1.314-67.302-1.403Q-67.205-1.492-67.099-1.641Q-66.993-1.790-66.952-1.796L-66.843-1.796Q-66.764-1.796-66.764-1.714Q-66.764-1.684-66.771-1.670Q-66.969-1.349-67.261-1.048Q-67.554-0.747-68.047-0.342Q-68.541 0.063-68.755 0.237Q-68.969 0.412-69.215 0.661Q-69.174 0.654-69.081 0.654Q-68.952 0.654-68.823 0.675Q-68.695 0.695-68.545 0.728Q-68.394 0.760-68.266 0.777Q-68.138 0.794-68.053 0.794Q-67.882 0.794-67.689 0.731Q-67.495 0.668-67.355 0.547Q-67.215 0.425-67.171 0.248Q-67.164 0.220-67.143 0.201Q-67.123 0.183-67.099 0.183L-66.990 0.183Q-66.955 0.183-66.933 0.210Q-66.911 0.237-66.911 0.268L-66.911 0.295Q-66.986 0.576-67.167 0.818Q-67.349 1.061-67.612 1.210Q-67.875 1.358-68.159 1.358Q-68.299 1.358-68.403 1.299Q-68.507 1.239-68.651 1.114Q-68.794 0.989-68.887 0.933Q-68.979 0.876-69.095 0.876Q-69.276 0.876-69.411 0.974Q-69.546 1.071-69.661 1.211Q-69.775 1.352-69.803 1.358",[2533],[1260,9167,9168,9171],{"fill":4797,"stroke":4797,"style":9097},[2255,9169],{"fill":2524,"d":9170},"M67.3-32h62.596",[1260,9172,9173],{"fill":2520,"stroke":2520},[1260,9174,9176],{"transform":9175},"translate(167.499 -37.623)",[2255,9177],{"d":9178,"fill":2520,"stroke":2520,"className":9179,"style":8941},"M-69.768 0.702Q-69.768 0.600-69.744 0.514L-69.256-1.448L-70.038-1.448Q-70.131-1.472-70.131-1.561L-70.103-1.670Q-70.086-1.714-70.018-1.728L-69.187-1.728L-68.907-2.825Q-68.876-2.938-68.784-3.012Q-68.692-3.085-68.576-3.085Q-68.483-3.085-68.411-3.022Q-68.340-2.959-68.340-2.859Q-68.340-2.812-68.347-2.791L-68.613-1.728L-67.834-1.728Q-67.752-1.701-67.752-1.622L-67.779-1.509Q-67.786-1.465-67.854-1.448L-68.682-1.448L-69.187 0.562Q-69.215 0.719-69.215 0.808Q-69.215 0.935-69.162 1.035Q-69.109 1.136-68.989 1.136Q-68.682 1.136-68.427 0.870Q-68.172 0.603-68.039 0.268Q-68.005 0.200-67.960 0.200L-67.848 0.200Q-67.813 0.200-67.793 0.225Q-67.772 0.251-67.772 0.282Q-67.772 0.295-67.779 0.309Q-67.889 0.582-68.065 0.820Q-68.241 1.058-68.485 1.208Q-68.729 1.358-69.003 1.358Q-69.310 1.358-69.539 1.179Q-69.768 0.999-69.768 0.702",[2533],[1260,9181,9182,9185],{"fill":4797,"stroke":4797,"style":9097},[2255,9183],{"fill":2524,"d":9184},"M79.82-46.795h12.518",[1260,9186,9187],{"fill":2520,"stroke":2520},[1260,9188,9190],{"transform":9189},"translate(154.532 -53.78)",[2255,9191],{"d":9192,"fill":2520,"stroke":2520,"className":9193,"style":8941},"M-69.034 2.544L-69.003 2.432Q-68.996 2.384-68.928 2.367Q-68.582 2.367-68.459 2.326Q-68.415 2.305-68.394 2.259Q-68.374 2.213-68.347 2.124L-68.066 0.996Q-68.497 1.358-68.921 1.358Q-69.245 1.358-69.490 1.201Q-69.734 1.044-69.866 0.779Q-69.997 0.514-69.997 0.189Q-69.997-0.279-69.744-0.742Q-69.492-1.205-69.068-1.501Q-68.644-1.796-68.172-1.796Q-67.936-1.796-67.743-1.677Q-67.550-1.557-67.437-1.356Q-67.366-1.468-67.183-1.632Q-67-1.796-66.918-1.796Q-66.880-1.796-66.849-1.762Q-66.819-1.728-66.819-1.690L-67.786 2.172Q-67.807 2.233-67.807 2.298Q-67.807 2.367-67.366 2.367Q-67.284 2.391-67.284 2.479L-67.311 2.592Q-67.318 2.630-67.386 2.647L-68.948 2.647Q-68.979 2.647-69.006 2.611Q-69.034 2.575-69.034 2.544M-68.907 1.136Q-68.634 1.136-68.382 0.952Q-68.131 0.767-67.940 0.500L-67.571-0.980Q-67.608-1.140-67.689-1.277Q-67.769-1.414-67.895-1.494Q-68.022-1.574-68.186-1.574Q-68.394-1.574-68.581-1.450Q-68.767-1.325-68.905-1.133Q-69.044-0.942-69.129-0.740Q-69.242-0.446-69.326-0.101Q-69.410 0.244-69.410 0.494Q-69.410 0.750-69.281 0.943Q-69.153 1.136-68.907 1.136",[2533],[1260,9195,9196,9199],{"fill":4797,"stroke":4797,"style":9097},[2255,9197],{"fill":2524,"d":9198},"M104.858-46.795h12.519",[1260,9200,9201],{"fill":2520,"stroke":2520},[1260,9202,9204],{"transform":9203},"translate(179.564 -52.418)",[2255,9205],{"d":9206,"fill":2520,"stroke":2520,"className":9207,"style":8941},"M-69.628 1.136Q-69.628 1.088-69.621 1.064L-69.109-1Q-69.075-1.127-69.075-1.243Q-69.075-1.383-69.128-1.479Q-69.181-1.574-69.304-1.574Q-69.526-1.574-69.627-1.347Q-69.727-1.120-69.837-0.699Q-69.847-0.634-69.909-0.634L-70.018-0.634Q-70.049-0.634-70.073-0.665Q-70.097-0.696-70.097-0.720L-70.097-0.747Q-69.984-1.181-69.803-1.489Q-69.621-1.796-69.290-1.796Q-69.034-1.796-68.822-1.668Q-68.610-1.540-68.548-1.314Q-68.138-1.796-67.571-1.796Q-67.284-1.796-67.058-1.660Q-66.832-1.523-66.832-1.256Q-66.832-1.068-66.952-0.935Q-67.072-0.802-67.253-0.802Q-67.369-0.802-67.451-0.875Q-67.533-0.949-67.533-1.068Q-67.533-1.209-67.442-1.323Q-67.352-1.438-67.219-1.468Q-67.369-1.574-67.584-1.574Q-68.179-1.574-68.576-0.815L-69.061 1.102Q-69.085 1.208-69.179 1.283Q-69.273 1.358-69.389 1.358Q-69.488 1.358-69.558 1.297Q-69.628 1.235-69.628 1.136",[2533],[2579,9209,9211,9212,9316],{"className":9210},[2582],"DFS intervals ",[429,9213,9215],{"className":9214},[432],[429,9216,9218],{"className":9217,"ariaHidden":437},[436],[429,9219,9221,9224,9227,9267,9270,9273,9313],{"className":9220},[441],[429,9222],{"className":9223,"style":472},[445],[429,9225,3144],{"className":9226},[476],[429,9228,9230,9233],{"className":9229},[450],[429,9231,4589],{"className":9232},[450,451],[429,9234,9236],{"className":9235},[1529],[429,9237,9239,9259],{"className":9238},[1062,1063],[429,9240,9242,9256],{"className":9241},[1067],[429,9243,9245],{"className":9244,"style":7703},[1071],[429,9246,9247,9250],{"style":1896},[429,9248],{"className":9249,"style":1080},[1079],[429,9251,9253],{"className":9252},[1084,1085,1086,1087],[429,9254,581],{"className":9255,"style":580},[450,451,1087],[429,9257,1113],{"className":9258},[1112],[429,9260,9262],{"className":9261},[1067],[429,9263,9265],{"className":9264,"style":1867},[1071],[429,9266],{},[429,9268,487],{"className":9269},[486],[429,9271],{"className":9272,"style":491},[456],[429,9274,9276,9279],{"className":9275},[450],[429,9277,6655],{"className":9278,"style":6654},[450,451],[429,9280,9282],{"className":9281},[1529],[429,9283,9285,9305],{"className":9284},[1062,1063],[429,9286,9288,9302],{"className":9287},[1067],[429,9289,9291],{"className":9290,"style":7703},[1071],[429,9292,9293,9296],{"style":7779},[429,9294],{"className":9295,"style":1080},[1079],[429,9297,9299],{"className":9298},[1084,1085,1086,1087],[429,9300,581],{"className":9301,"style":580},[450,451,1087],[429,9303,1113],{"className":9304},[1112],[429,9306,9308],{"className":9307},[1067],[429,9309,9311],{"className":9310,"style":1867},[1071],[429,9312],{},[429,9314,3151],{"className":9315},[500]," drawn as bars on the time axis; one bar nesting inside another marks a descendant.",[381,9318,9319,9320,7453,9743,9758,9759,9775,9776,9791],{},"Above, ",[429,9321,9323],{"className":9322},[432],[429,9324,9326,9434,9468,9502,9612,9645],{"className":9325,"ariaHidden":437},[436],[429,9327,9329,9332,9335,9376,9379,9382,9422,9425,9428,9431],{"className":9328},[441],[429,9330],{"className":9331,"style":472},[445],[429,9333,3144],{"className":9334},[476],[429,9336,9338,9341],{"className":9337},[450],[429,9339,4589],{"className":9340},[450,451],[429,9342,9344],{"className":9343},[1529],[429,9345,9347,9368],{"className":9346},[1062,1063],[429,9348,9350,9365],{"className":9349},[1067],[429,9351,9353],{"className":9352,"style":7703},[1071],[429,9354,9355,9358],{"style":1896},[429,9356],{"className":9357,"style":1080},[1079],[429,9359,9361],{"className":9360},[1084,1085,1086,1087],[429,9362,9364],{"className":9363},[450,451,1087],"x",[429,9366,1113],{"className":9367},[1112],[429,9369,9371],{"className":9370},[1067],[429,9372,9374],{"className":9373,"style":1867},[1071],[429,9375],{},[429,9377,487],{"className":9378},[486],[429,9380],{"className":9381,"style":491},[456],[429,9383,9385,9388],{"className":9384},[450],[429,9386,6655],{"className":9387,"style":6654},[450,451],[429,9389,9391],{"className":9390},[1529],[429,9392,9394,9414],{"className":9393},[1062,1063],[429,9395,9397,9411],{"className":9396},[1067],[429,9398,9400],{"className":9399,"style":7703},[1071],[429,9401,9402,9405],{"style":7779},[429,9403],{"className":9404,"style":1080},[1079],[429,9406,9408],{"className":9407},[1084,1085,1086,1087],[429,9409,9364],{"className":9410},[450,451,1087],[429,9412,1113],{"className":9413},[1112],[429,9415,9417],{"className":9416},[1067],[429,9418,9420],{"className":9419,"style":1867},[1071],[429,9421],{},[429,9423,3151],{"className":9424},[500],[429,9426],{"className":9427,"style":457},[456],[429,9429,462],{"className":9430},[461],[429,9432],{"className":9433,"style":457},[456],[429,9435,9437,9440,9443,9446,9449,9452,9455,9458,9461,9465],{"className":9436},[441],[429,9438],{"className":9439,"style":472},[445],[429,9441,3144],{"className":9442},[476],[429,9444,8811],{"className":9445},[450],[429,9447,487],{"className":9448},[486],[429,9450],{"className":9451,"style":491},[456],[429,9453,3818],{"className":9454},[450],[429,9456,3151],{"className":9457},[500],[429,9459],{"className":9460,"style":457},[456],[429,9462,9464],{"className":9463},[461],"⊂",[429,9466],{"className":9467,"style":457},[456],[429,9469,9471,9474,9477,9480,9483,9486,9490,9493,9496,9499],{"className":9470},[441],[429,9472],{"className":9473,"style":472},[445],[429,9475,3144],{"className":9476},[476],[429,9478,2290],{"className":9479},[450],[429,9481,487],{"className":9482},[486],[429,9484],{"className":9485,"style":491},[456],[429,9487,9489],{"className":9488},[450],"6",[429,9491,3151],{"className":9492},[500],[429,9494],{"className":9495,"style":457},[456],[429,9497,462],{"className":9498},[461],[429,9500],{"className":9501,"style":457},[456],[429,9503,9505,9509,9512,9554,9557,9560,9600,9603,9606,9609],{"className":9504},[441],[429,9506],{"className":9507,"style":9508},[445],"height:1.0361em;vertical-align:-0.2861em;",[429,9510,3144],{"className":9511},[476],[429,9513,9515,9518],{"className":9514},[450],[429,9516,4589],{"className":9517},[450,451],[429,9519,9521],{"className":9520},[1529],[429,9522,9524,9545],{"className":9523},[1062,1063],[429,9525,9527,9542],{"className":9526},[1067],[429,9528,9530],{"className":9529,"style":7703},[1071],[429,9531,9532,9535],{"style":1896},[429,9533],{"className":9534,"style":1080},[1079],[429,9536,9538],{"className":9537},[1084,1085,1086,1087],[429,9539,9541],{"className":9540,"style":580},[450,451,1087],"y",[429,9543,1113],{"className":9544},[1112],[429,9546,9548],{"className":9547},[1067],[429,9549,9552],{"className":9550,"style":9551},[1071],"height:0.2861em;",[429,9553],{},[429,9555,487],{"className":9556},[486],[429,9558],{"className":9559,"style":491},[456],[429,9561,9563,9566],{"className":9562},[450],[429,9564,6655],{"className":9565,"style":6654},[450,451],[429,9567,9569],{"className":9568},[1529],[429,9570,9572,9592],{"className":9571},[1062,1063],[429,9573,9575,9589],{"className":9574},[1067],[429,9576,9578],{"className":9577,"style":7703},[1071],[429,9579,9580,9583],{"style":7779},[429,9581],{"className":9582,"style":1080},[1079],[429,9584,9586],{"className":9585},[1084,1085,1086,1087],[429,9587,9541],{"className":9588,"style":580},[450,451,1087],[429,9590,1113],{"className":9591},[1112],[429,9593,9595],{"className":9594},[1067],[429,9596,9598],{"className":9597,"style":9551},[1071],[429,9599],{},[429,9601,3151],{"className":9602},[500],[429,9604],{"className":9605,"style":457},[456],[429,9607,9464],{"className":9608},[461],[429,9610],{"className":9611,"style":457},[456],[429,9613,9615,9618,9621,9624,9627,9630,9633,9636,9639,9642],{"className":9614},[441],[429,9616],{"className":9617,"style":472},[445],[429,9619,3144],{"className":9620},[476],[429,9622,989],{"className":9623},[450],[429,9625,487],{"className":9626},[486],[429,9628],{"className":9629,"style":491},[456],[429,9631,8302],{"className":9632},[450],[429,9634,3151],{"className":9635},[500],[429,9637],{"className":9638,"style":457},[456],[429,9640,462],{"className":9641},[461],[429,9643],{"className":9644,"style":457},[456],[429,9646,9648,9651,9654,9694,9697,9700,9740],{"className":9647},[441],[429,9649],{"className":9650,"style":472},[445],[429,9652,3144],{"className":9653},[476],[429,9655,9657,9660],{"className":9656},[450],[429,9658,4589],{"className":9659},[450,451],[429,9661,9663],{"className":9662},[1529],[429,9664,9666,9686],{"className":9665},[1062,1063],[429,9667,9669,9683],{"className":9668},[1067],[429,9670,9672],{"className":9671,"style":7703},[1071],[429,9673,9674,9677],{"style":1896},[429,9675],{"className":9676,"style":1080},[1079],[429,9678,9680],{"className":9679},[1084,1085,1086,1087],[429,9681,2482],{"className":9682,"style":2481},[450,451,1087],[429,9684,1113],{"className":9685},[1112],[429,9687,9689],{"className":9688},[1067],[429,9690,9692],{"className":9691,"style":1867},[1071],[429,9693],{},[429,9695,487],{"className":9696},[486],[429,9698],{"className":9699,"style":491},[456],[429,9701,9703,9706],{"className":9702},[450],[429,9704,6655],{"className":9705,"style":6654},[450,451],[429,9707,9709],{"className":9708},[1529],[429,9710,9712,9732],{"className":9711},[1062,1063],[429,9713,9715,9729],{"className":9714},[1067],[429,9716,9718],{"className":9717,"style":7703},[1071],[429,9719,9720,9723],{"style":7779},[429,9721],{"className":9722,"style":1080},[1079],[429,9724,9726],{"className":9725},[1084,1085,1086,1087],[429,9727,2482],{"className":9728,"style":2481},[450,451,1087],[429,9730,1113],{"className":9731},[1112],[429,9733,9735],{"className":9734},[1067],[429,9736,9738],{"className":9737,"style":1867},[1071],[429,9739],{},[429,9741,3151],{"className":9742},[500],[429,9744,9746],{"className":9745},[432],[429,9747,9749],{"className":9748,"ariaHidden":437},[436],[429,9750,9752,9755],{"className":9751},[441],[429,9753],{"className":9754,"style":599},[445],[429,9756,9364],{"className":9757},[450,451]," is a descendant of ",[429,9760,9762],{"className":9761},[432],[429,9763,9765],{"className":9764,"ariaHidden":437},[436],[429,9766,9768,9772],{"className":9767},[441],[429,9769],{"className":9770,"style":9771},[445],"height:0.625em;vertical-align:-0.1944em;",[429,9773,9541],{"className":9774,"style":580},[450,451]," is a descendant of\n",[429,9777,9779],{"className":9778},[432],[429,9780,9782],{"className":9781,"ariaHidden":437},[436],[429,9783,9785,9788],{"className":9784},[441],[429,9786],{"className":9787,"style":599},[445],[429,9789,2482],{"className":9790,"style":2481},[450,451],". Two companions sharpen it:",[1134,9793,9794,9957],{},[1137,9795,9796,658,9799,9814,9815,658,9830,9833,9834,9849,9850,9902,9903,9938,9939],{},[394,9797,9798],{},"White-path theorem.",[429,9800,9802],{"className":9801},[432],[429,9803,9805],{"className":9804,"ariaHidden":437},[436],[429,9806,9808,9811],{"className":9807},[441],[429,9809],{"className":9810,"style":599},[445],[429,9812,581],{"className":9813,"style":580},[450,451]," becomes a descendant of ",[429,9816,9818],{"className":9817},[432],[429,9819,9821],{"className":9820,"ariaHidden":437},[436],[429,9822,9824,9827],{"className":9823},[441],[429,9825],{"className":9826,"style":599},[445],[429,9828,570],{"className":9829},[450,451],[394,9831,9832],{},"if and only if",", at\nthe moment ",[429,9835,9837],{"className":9836},[432],[429,9838,9840],{"className":9839,"ariaHidden":437},[436],[429,9841,9843,9846],{"className":9842},[441],[429,9844],{"className":9845,"style":599},[445],[429,9847,570],{"className":9848},[450,451]," is discovered (time ",[429,9851,9853],{"className":9852},[432],[429,9854,9856],{"className":9855,"ariaHidden":437},[436],[429,9857,9859,9862],{"className":9858},[441],[429,9860],{"className":9861,"style":2152},[445],[429,9863,9865,9868],{"className":9864},[450],[429,9866,4589],{"className":9867},[450,451],[429,9869,9871],{"className":9870},[1529],[429,9872,9874,9894],{"className":9873},[1062,1063],[429,9875,9877,9891],{"className":9876},[1067],[429,9878,9880],{"className":9879,"style":7703},[1071],[429,9881,9882,9885],{"style":1896},[429,9883],{"className":9884,"style":1080},[1079],[429,9886,9888],{"className":9887},[1084,1085,1086,1087],[429,9889,570],{"className":9890},[450,451,1087],[429,9892,1113],{"className":9893},[1112],[429,9895,9897],{"className":9896},[1067],[429,9898,9900],{"className":9899,"style":1867},[1071],[429,9901],{},"), there is a path ",[429,9904,9906],{"className":9905},[432],[429,9907,9909,9929],{"className":9908,"ariaHidden":437},[436],[429,9910,9912,9915,9918,9921,9926],{"className":9911},[441],[429,9913],{"className":9914,"style":599},[445],[429,9916,570],{"className":9917},[450,451],[429,9919],{"className":9920,"style":457},[456],[429,9922,9925],{"className":9923},[461,9924],"amsrm","⇝",[429,9927],{"className":9928,"style":457},[456],[429,9930,9932,9935],{"className":9931},[441],[429,9933],{"className":9934,"style":599},[445],[429,9936,581],{"className":9937,"style":580},[450,451]," consisting entirely of still-white vertices. This is the cleanest test for\n",[2321,9940,9941,9942,871],{},"what will end up under ",[429,9943,9945],{"className":9944},[432],[429,9946,9948],{"className":9947,"ariaHidden":437},[436],[429,9949,9951,9954],{"className":9950},[441],[429,9952],{"className":9953,"style":599},[445],[429,9955,570],{"className":9956},[450,451],[1137,9958,9959,9962,9963,9966,9967,871],{},[394,9960,9961],{},"Cycle theorem."," Every back edge lies on a cycle, and every cycle contains at\nleast one back edge. Equivalently, a digraph is ",[394,9964,9965],{},"acyclic iff DFS finds no back\nedge",", the engine behind cycle detection and ",[406,9968,9969],{"href":165},"topological sort",[8142,9971,9973],{"id":9972},"classifying-edges","Classifying edges",[381,9975,9976,9977,10007,10008,518,10011,10026],{},"As DFS traverses an edge ",[429,9978,9980],{"className":9979},[432],[429,9981,9983],{"className":9982,"ariaHidden":437},[436],[429,9984,9986,9989,9992,9995,9998,10001,10004],{"className":9985},[441],[429,9987],{"className":9988,"style":472},[445],[429,9990,477],{"className":9991},[476],[429,9993,570],{"className":9994},[450,451],[429,9996,487],{"className":9997},[486],[429,9999],{"className":10000,"style":491},[456],[429,10002,581],{"className":10003,"style":580},[450,451],[429,10005,501],{"className":10006},[500],", the ",[385,10009,10010],{},"color",[429,10012,10014],{"className":10013},[432],[429,10015,10017],{"className":10016,"ariaHidden":437},[436],[429,10018,10020,10023],{"className":10019},[441],[429,10021],{"className":10022,"style":599},[445],[429,10024,581],{"className":10025,"style":580},[450,451]," at that moment reveals what\nkind of edge it is, a classification that drives the algorithms of the next\nlessons. In the worked digraph above:",[1134,10028,10029,10211,10502,10575],{},[1137,10030,10031,658,10034,10049,10050,10089,10090,10126,10127,10142,10143,10176,10177,10210],{},[394,10032,10033],{},"Tree edge.",[429,10035,10037],{"className":10036},[432],[429,10038,10040],{"className":10039,"ariaHidden":437},[436],[429,10041,10043,10046],{"className":10042},[441],[429,10044],{"className":10045,"style":599},[445],[429,10047,581],{"className":10048,"style":580},[450,451]," is white: we set ",[429,10051,10053],{"className":10052},[432],[429,10054,10056,10080],{"className":10055,"ariaHidden":437},[436],[429,10057,10059,10062,10065,10068,10071,10074,10077],{"className":10058},[441],[429,10060],{"className":10061,"style":599},[445],[429,10063,581],{"className":10064,"style":580},[450,451],[429,10066,871],{"className":10067},[450],[429,10069,4572],{"className":10070,"style":580},[450,451],[429,10072],{"className":10073,"style":457},[456],[429,10075,462],{"className":10076},[461],[429,10078],{"className":10079,"style":457},[456],[429,10081,10083,10086],{"className":10082},[441],[429,10084],{"className":10085,"style":599},[445],[429,10087,570],{"className":10088},[450,451],", so the edge is ",[429,10091,10093],{"className":10092},[432],[429,10094,10096],{"className":10095,"ariaHidden":437},[436],[429,10097,10099,10102,10105,10108,10111,10114,10117,10120,10123],{"className":10098},[441],[429,10100],{"className":10101,"style":472},[445],[429,10103,477],{"className":10104},[476],[429,10106,581],{"className":10107,"style":580},[450,451],[429,10109,871],{"className":10110},[450],[429,10112,4572],{"className":10113,"style":580},[450,451],[429,10115,487],{"className":10116},[486],[429,10118],{"className":10119,"style":491},[456],[429,10121,581],{"className":10122,"style":580},[450,451],[429,10124,501],{"className":10125},[500],". We\ndiscover ",[429,10128,10130],{"className":10129},[432],[429,10131,10133],{"className":10132,"ariaHidden":437},[436],[429,10134,10136,10139],{"className":10135},[441],[429,10137],{"className":10138,"style":599},[445],[429,10140,581],{"className":10141,"style":580},[450,451]," through this edge; it joins the depth-first forest (e.g. ",[429,10144,10146],{"className":10145},[432],[429,10147,10149,10167],{"className":10148,"ariaHidden":437},[436],[429,10150,10152,10155,10158,10161,10164],{"className":10151},[441],[429,10153],{"className":10154,"style":599},[445],[429,10156,4589],{"className":10157},[450,451],[429,10159],{"className":10160,"style":457},[456],[429,10162,5786],{"className":10163},[461],[429,10165],{"className":10166,"style":457},[456],[429,10168,10170,10173],{"className":10169},[441],[429,10171],{"className":10172,"style":599},[445],[429,10174,2482],{"className":10175,"style":2481},[450,451],",\n",[429,10178,10180],{"className":10179},[432],[429,10181,10183,10201],{"className":10182,"ariaHidden":437},[436],[429,10184,10186,10189,10192,10195,10198],{"className":10185},[441],[429,10187],{"className":10188,"style":599},[445],[429,10190,2482],{"className":10191,"style":2481},[450,451],[429,10193],{"className":10194,"style":457},[456],[429,10196,5786],{"className":10197},[461],[429,10199],{"className":10200,"style":457},[456],[429,10202,10204,10207],{"className":10203},[441],[429,10205],{"className":10206,"style":9771},[445],[429,10208,9541],{"className":10209,"style":580},[450,451],").",[1137,10212,10213,658,10216,1226,10231,10233,10234,10249,10250,10285,10286,10497,10498,10501],{},[394,10214,10215],{},"Back edge.",[429,10217,10219],{"className":10218},[432],[429,10220,10222],{"className":10221,"ariaHidden":437},[436],[429,10223,10225,10228],{"className":10224},[441],[429,10226],{"className":10227,"style":599},[445],[429,10229,581],{"className":10230,"style":580},[450,451],[394,10232,5250],{},", an ancestor of ",[429,10235,10237],{"className":10236},[432],[429,10238,10240],{"className":10239,"ariaHidden":437},[436],[429,10241,10243,10246],{"className":10242},[441],[429,10244],{"className":10245,"style":599},[445],[429,10247,570],{"className":10248},[450,451]," still on the recursion\nstack (",[429,10251,10253],{"className":10252},[432],[429,10254,10256,10276],{"className":10255,"ariaHidden":437},[436],[429,10257,10259,10262,10267,10270,10273],{"className":10258},[441],[429,10260],{"className":10261,"style":599},[445],[429,10263,10266],{"className":10264,"style":10265},[450,451],"margin-right:0.044em;","z",[429,10268],{"className":10269,"style":457},[456],[429,10271,5786],{"className":10272},[461],[429,10274],{"className":10275,"style":457},[456],[429,10277,10279,10282],{"className":10278},[441],[429,10280],{"className":10281,"style":599},[445],[429,10283,4589],{"className":10284},[450,451],", since ",[429,10287,10289],{"className":10288},[432],[429,10290,10292,10399],{"className":10291,"ariaHidden":437},[436],[429,10293,10295,10298,10301,10341,10344,10347,10387,10390,10393,10396],{"className":10294},[441],[429,10296],{"className":10297,"style":472},[445],[429,10299,3144],{"className":10300},[476],[429,10302,10304,10307],{"className":10303},[450],[429,10305,4589],{"className":10306},[450,451],[429,10308,10310],{"className":10309},[1529],[429,10311,10313,10333],{"className":10312},[1062,1063],[429,10314,10316,10330],{"className":10315},[1067],[429,10317,10319],{"className":10318,"style":7703},[1071],[429,10320,10321,10324],{"style":1896},[429,10322],{"className":10323,"style":1080},[1079],[429,10325,10327],{"className":10326},[1084,1085,1086,1087],[429,10328,10266],{"className":10329,"style":10265},[450,451,1087],[429,10331,1113],{"className":10332},[1112],[429,10334,10336],{"className":10335},[1067],[429,10337,10339],{"className":10338,"style":1867},[1071],[429,10340],{},[429,10342,487],{"className":10343},[486],[429,10345],{"className":10346,"style":491},[456],[429,10348,10350,10353],{"className":10349},[450],[429,10351,6655],{"className":10352,"style":6654},[450,451],[429,10354,10356],{"className":10355},[1529],[429,10357,10359,10379],{"className":10358},[1062,1063],[429,10360,10362,10376],{"className":10361},[1067],[429,10363,10365],{"className":10364,"style":7703},[1071],[429,10366,10367,10370],{"style":7779},[429,10368],{"className":10369,"style":1080},[1079],[429,10371,10373],{"className":10372},[1084,1085,1086,1087],[429,10374,10266],{"className":10375,"style":10265},[450,451,1087],[429,10377,1113],{"className":10378},[1112],[429,10380,10382],{"className":10381},[1067],[429,10383,10385],{"className":10384,"style":1867},[1071],[429,10386],{},[429,10388,3151],{"className":10389},[500],[429,10391],{"className":10392,"style":457},[456],[429,10394,9464],{"className":10395},[461],[429,10397],{"className":10398,"style":457},[456],[429,10400,10402,10405,10408,10448,10451,10454,10494],{"className":10401},[441],[429,10403],{"className":10404,"style":472},[445],[429,10406,3144],{"className":10407},[476],[429,10409,10411,10414],{"className":10410},[450],[429,10412,4589],{"className":10413},[450,451],[429,10415,10417],{"className":10416},[1529],[429,10418,10420,10440],{"className":10419},[1062,1063],[429,10421,10423,10437],{"className":10422},[1067],[429,10424,10426],{"className":10425,"style":7703},[1071],[429,10427,10428,10431],{"style":1896},[429,10429],{"className":10430,"style":1080},[1079],[429,10432,10434],{"className":10433},[1084,1085,1086,1087],[429,10435,4589],{"className":10436},[450,451,1087],[429,10438,1113],{"className":10439},[1112],[429,10441,10443],{"className":10442},[1067],[429,10444,10446],{"className":10445,"style":1867},[1071],[429,10447],{},[429,10449,487],{"className":10450},[486],[429,10452],{"className":10453,"style":491},[456],[429,10455,10457,10460],{"className":10456},[450],[429,10458,6655],{"className":10459,"style":6654},[450,451],[429,10461,10463],{"className":10462},[1529],[429,10464,10466,10486],{"className":10465},[1062,1063],[429,10467,10469,10483],{"className":10468},[1067],[429,10470,10472],{"className":10471,"style":7703},[1071],[429,10473,10474,10477],{"style":7779},[429,10475],{"className":10476,"style":1080},[1079],[429,10478,10480],{"className":10479},[1084,1085,1086,1087],[429,10481,4589],{"className":10482},[450,451,1087],[429,10484,1113],{"className":10485},[1112],[429,10487,10489],{"className":10488},[1067],[429,10490,10492],{"className":10491,"style":1867},[1071],[429,10493],{},[429,10495,3151],{"className":10496},[500],"). ",[385,10499,10500],{},"A digraph has a back\nedge iff it has a cycle",", the linchpin of cycle detection and topological sort.",[1137,10503,10504,658,10507,10522,10523,518,10525,10540,10541,10574],{},[394,10505,10506],{},"Forward edge.",[429,10508,10510],{"className":10509},[432],[429,10511,10513],{"className":10512,"ariaHidden":437},[436],[429,10514,10516,10519],{"className":10515},[441],[429,10517],{"className":10518,"style":599},[445],[429,10520,581],{"className":10521,"style":580},[450,451]," is black and a ",[385,10524,8795],{},[429,10526,10528],{"className":10527},[432],[429,10529,10531],{"className":10530,"ariaHidden":437},[436],[429,10532,10534,10537],{"className":10533},[441],[429,10535],{"className":10536,"style":599},[445],[429,10538,570],{"className":10539},[450,451]," (",[429,10542,10544],{"className":10543},[432],[429,10545,10547,10565],{"className":10546,"ariaHidden":437},[436],[429,10548,10550,10553,10556,10559,10562],{"className":10549},[441],[429,10551],{"className":10552,"style":599},[445],[429,10554,4589],{"className":10555},[450,451],[429,10557],{"className":10558,"style":457},[456],[429,10560,5786],{"className":10561},[461],[429,10563],{"className":10564,"style":457},[456],[429,10566,10568,10571],{"className":10567},[441],[429,10569],{"className":10570,"style":599},[445],[429,10572,10266],{"className":10573,"style":10265},[450,451],": a\nnon-tree edge to an already-finished descendant).",[1137,10576,10577,658,10580,10595,10596,10599,10600,10540,10615,10648,10649,10683],{},[394,10578,10579],{},"Cross edge.",[429,10581,10583],{"className":10582},[432],[429,10584,10586],{"className":10585,"ariaHidden":437},[436],[429,10587,10589,10592],{"className":10588},[441],[429,10590],{"className":10591,"style":599},[445],[429,10593,581],{"className":10594,"style":580},[450,451]," is black and ",[385,10597,10598],{},"not"," a descendant of ",[429,10601,10603],{"className":10602},[432],[429,10604,10606],{"className":10605,"ariaHidden":437},[436],[429,10607,10609,10612],{"className":10608},[441],[429,10610],{"className":10611,"style":599},[445],[429,10613,570],{"className":10614},[450,451],[429,10616,10618],{"className":10617},[432],[429,10619,10621,10639],{"className":10620,"ariaHidden":437},[436],[429,10622,10624,10627,10630,10633,10636],{"className":10623},[441],[429,10625],{"className":10626,"style":599},[445],[429,10628,10266],{"className":10629,"style":10265},[450,451],[429,10631],{"className":10632,"style":457},[456],[429,10634,5786],{"className":10635},[461],[429,10637],{"className":10638,"style":457},[456],[429,10640,10642,10645],{"className":10641},[441],[429,10643],{"className":10644,"style":599},[445],[429,10646,9364],{"className":10647},[450,451],", or the\nedge ",[429,10650,10652],{"className":10651},[432],[429,10653,10655,10674],{"className":10654,"ariaHidden":437},[436],[429,10656,10658,10661,10665,10668,10671],{"className":10657},[441],[429,10659],{"className":10660,"style":599},[445],[429,10662,10664],{"className":10663,"style":840},[450,451],"r",[429,10666],{"className":10667,"style":457},[456],[429,10669,5786],{"className":10670},[461],[429,10672],{"className":10673,"style":457},[456],[429,10675,10677,10680],{"className":10676},[441],[429,10678],{"className":10679,"style":9771},[445],[429,10681,2321],{"className":10682,"style":580},[450,451]," between separate tree branches).",[381,10685,10686,10687,10689],{},"In an ",[394,10688,622],{}," graph the picture simplifies: every edge is either a tree\nedge or a back edge, since forward and cross edges cannot occur, because exploring an\nedge from either endpoint reaches the other while it is still gray.",[414,10691,10693],{"id":10692},"bfs-or-dfs","BFS or DFS?",[381,10695,10696,10697,10719,10720,10762,10763,10766],{},"They are one algorithm, ",[429,10698,10700],{"className":10699},[432],[429,10701,10703],{"className":10702,"ariaHidden":437},[436],[429,10704,10706,10709],{"className":10705},[441],[429,10707],{"className":10708,"style":2135},[445],[429,10710,10712],{"className":10711},[4661,4662],[429,10713,10715],{"className":10714},[450,1316],[429,10716,10718],{"className":10717},[450],"Whatever-First-Search",", read with two\ndifferent bags. Both are ",[429,10721,10723],{"className":10722},[432],[429,10724,10726,10750],{"className":10725,"ariaHidden":437},[436],[429,10727,10729,10732,10735,10738,10741,10744,10747],{"className":10728},[441],[429,10730],{"className":10731,"style":472},[445],[429,10733,841],{"className":10734,"style":840},[450,451],[429,10736,477],{"className":10737},[476],[429,10739,482],{"className":10740,"style":481},[450,451],[429,10742],{"className":10743,"style":481},[456],[429,10745,855],{"className":10746},[854],[429,10748],{"className":10749,"style":481},[456],[429,10751,10753,10756,10759],{"className":10752},[441],[429,10754],{"className":10755,"style":472},[445],[429,10757,496],{"className":10758,"style":495},[450,451],[429,10760,501],{"className":10761},[500]," linear-time skeletons; the ",[385,10764,10765],{},"order"," of removal\nis the only difference, and it dictates the structure each exposes.",[3329,10768,10769,10781],{},[3332,10770,10771],{},[3335,10772,10773,10775,10778],{},[3338,10774],{},[3338,10776,10777],{},"BFS (queue)",[3338,10779,10780],{},"DFS (stack)",[3348,10782,10783,10794,10820,10971,10982],{},[3335,10784,10785,10788,10791],{},[3353,10786,10787],{},"Frontier bag",[3353,10789,10790],{},"queue, FIFO — oldest first",[3353,10792,10793],{},"stack, LIFO — newest first",[3335,10795,10796,10799,10817],{},[3353,10797,10798],{},"Search tree",[3353,10800,10801,10802],{},"shallowest paths from ",[429,10803,10805],{"className":10804},[432],[429,10806,10808],{"className":10807,"ariaHidden":437},[436],[429,10809,10811,10814],{"className":10810},[441],[429,10812],{"className":10813,"style":599},[445],[429,10815,4589],{"className":10816},[450,451],[3353,10818,10819],{},"nesting \u002F parenthesis structure",[3335,10821,10822,10825,10864],{},[3353,10823,10824],{},"Computes",[3353,10826,10827,10863],{},[429,10828,10830],{"className":10829},[432],[429,10831,10833],{"className":10832,"ariaHidden":437},[436],[429,10834,10836,10839,10845,10848,10851,10854,10857,10860],{"className":10835},[441],[429,10837],{"className":10838,"style":472},[445],[429,10840,10842],{"className":10841},[1255],[429,10843,5395],{"className":10844},[450,1458],[429,10846,3144],{"className":10847},[476],[429,10849,4589],{"className":10850},[450,451],[429,10852,3151],{"className":10853},[500],[429,10855,3144],{"className":10856},[476],[429,10858,581],{"className":10859,"style":580},[450,451],[429,10861,3151],{"className":10862},[500]," (shortest hops)",[3353,10865,10866,10867],{},"start\u002Ffinish times ",[429,10868,10870],{"className":10869},[432],[429,10871,10873],{"className":10872,"ariaHidden":437},[436],[429,10874,10876,10879,10882,10922,10925,10928,10968],{"className":10875},[441],[429,10877],{"className":10878,"style":472},[445],[429,10880,3144],{"className":10881},[476],[429,10883,10885,10888],{"className":10884},[450],[429,10886,4589],{"className":10887},[450,451],[429,10889,10891],{"className":10890},[1529],[429,10892,10894,10914],{"className":10893},[1062,1063],[429,10895,10897,10911],{"className":10896},[1067],[429,10898,10900],{"className":10899,"style":7703},[1071],[429,10901,10902,10905],{"style":1896},[429,10903],{"className":10904,"style":1080},[1079],[429,10906,10908],{"className":10907},[1084,1085,1086,1087],[429,10909,581],{"className":10910,"style":580},[450,451,1087],[429,10912,1113],{"className":10913},[1112],[429,10915,10917],{"className":10916},[1067],[429,10918,10920],{"className":10919,"style":1867},[1071],[429,10921],{},[429,10923,487],{"className":10924},[486],[429,10926],{"className":10927,"style":491},[456],[429,10929,10931,10934],{"className":10930},[450],[429,10932,6655],{"className":10933,"style":6654},[450,451],[429,10935,10937],{"className":10936},[1529],[429,10938,10940,10960],{"className":10939},[1062,1063],[429,10941,10943,10957],{"className":10942},[1067],[429,10944,10946],{"className":10945,"style":7703},[1071],[429,10947,10948,10951],{"style":7779},[429,10949],{"className":10950,"style":1080},[1079],[429,10952,10954],{"className":10953},[1084,1085,1086,1087],[429,10955,581],{"className":10956,"style":580},[450,451,1087],[429,10958,1113],{"className":10959},[1112],[429,10961,10963],{"className":10962},[1067],[429,10964,10966],{"className":10965,"style":1867},[1071],[429,10967],{},[429,10969,3151],{"className":10970},[500],[3335,10972,10973,10976,10979],{},[3353,10974,10975],{},"Reveals",[3353,10977,10978],{},"level sets, connectivity",[3353,10980,10981],{},"back edges → cycles, finish order",[3335,10983,10984,10987,10990],{},[3353,10985,10986],{},"Typical uses",[3353,10988,10989],{},"unweighted shortest paths, components",[3353,10991,10992],{},"cycle detection, topological sort, strong connectivity",[381,10994,10995,10996,10999],{},"Choose BFS when distance-in-hops matters; choose DFS when you need a graph's\nrecursive structure, which, as the next two lessons show, is exactly what\ntopological sorting and strong connectivity demand. And keep the frame in mind:\nswap the bag for a ",[394,10997,10998],{},"priority queue"," and the very same skeleton becomes\nDijkstra and Prim.",[414,11001,11003],{"id":11002},"takeaways","Takeaways",[1134,11005,11006,11059,11161,11200,11246,11371],{},[1137,11007,1806,11008,658,11010,11058],{},[394,11009,396],{},[429,11011,11013],{"className":11012},[432],[429,11014,11016,11034],{"className":11015,"ariaHidden":437},[436],[429,11017,11019,11022,11025,11028,11031],{"className":11018},[441],[429,11020],{"className":11021,"style":446},[445],[429,11023,452],{"className":11024},[450,451],[429,11026],{"className":11027,"style":457},[456],[429,11029,462],{"className":11030},[461],[429,11032],{"className":11033,"style":457},[456],[429,11035,11037,11040,11043,11046,11049,11052,11055],{"className":11036},[441],[429,11038],{"className":11039,"style":472},[445],[429,11041,477],{"className":11042},[476],[429,11044,482],{"className":11045,"style":481},[450,451],[429,11047,487],{"className":11048},[486],[429,11050],{"className":11051,"style":491},[456],[429,11053,496],{"className":11054,"style":495},[450,451],[429,11056,501],{"className":11057},[500]," models things and their connections; the\nsparse-versus-dense distinction drives every representation choice.",[1137,11060,11061,11062,10540,11064,11106,11107,10540,11110,11160],{},"Prefer the ",[394,11063,4394],{},[429,11065,11067],{"className":11066},[432],[429,11068,11070,11094],{"className":11069,"ariaHidden":437},[436],[429,11071,11073,11076,11079,11082,11085,11088,11091],{"className":11072},[441],[429,11074],{"className":11075,"style":472},[445],[429,11077,3038],{"className":11078},[450],[429,11080,477],{"className":11081},[476],[429,11083,482],{"className":11084,"style":481},[450,451],[429,11086],{"className":11087,"style":481},[456],[429,11089,855],{"className":11090},[854],[429,11092],{"className":11093,"style":481},[456],[429,11095,11097,11100,11103],{"className":11096},[441],[429,11098],{"className":11099,"style":472},[445],[429,11101,496],{"className":11102,"style":495},[450,451],[429,11104,501],{"className":11105},[500]," space, fast neighbor\niteration); use the ",[394,11108,11109],{},"adjacency matrix",[429,11111,11113],{"className":11112},[432],[429,11114,11116],{"className":11115,"ariaHidden":437},[436],[429,11117,11119,11122,11125,11128,11157],{"className":11118},[441],[429,11120],{"className":11121,"style":2806},[445],[429,11123,3038],{"className":11124},[450],[429,11126,477],{"className":11127},[476],[429,11129,11131,11134],{"className":11130},[450],[429,11132,482],{"className":11133,"style":481},[450,451],[429,11135,11137],{"className":11136},[1529],[429,11138,11140],{"className":11139},[1062],[429,11141,11143],{"className":11142},[1067],[429,11144,11146],{"className":11145,"style":2831},[1071],[429,11147,11148,11151],{"style":2834},[429,11149],{"className":11150,"style":1080},[1079],[429,11152,11154],{"className":11153},[1084,1085,1086,1087],[429,11155,989],{"className":11156},[450,1087],[429,11158,501],{"className":11159},[500],") only for dense graphs\nor constant-time edge tests.",[1137,11162,11163,11186,11187,11190,11191,11193,11194,11196,11197,11199],{},[394,11164,11165],{},[429,11166,11168],{"className":11167},[432],[429,11169,11171],{"className":11170,"ariaHidden":437},[436],[429,11172,11174,11177],{"className":11173},[441],[429,11175],{"className":11176,"style":2135},[445],[429,11178,11180],{"className":11179},[4661,4662],[429,11181,11183],{"className":11182},[450,1316],[429,11184,10718],{"className":11185},[450]," is the one skeleton: grow a frontier\n",[385,11188,11189],{},"bag",", and let the bag's discipline pick the next vertex. A ",[394,11192,5020],{}," gives\nBFS, a ",[394,11195,7626],{}," gives DFS, a ",[394,11198,10998],{}," gives the weighted algorithms\nto come.",[1137,11201,11202,11204,11205,11241,11242,11245],{},[394,11203,4669],{}," explores in rings from a source and computes ",[429,11206,11208],{"className":11207},[432],[429,11209,11211],{"className":11210,"ariaHidden":437},[436],[429,11212,11214,11217,11223,11226,11229,11232,11235,11238],{"className":11213},[441],[429,11215],{"className":11216,"style":472},[445],[429,11218,11220],{"className":11219},[1255],[429,11221,5395],{"className":11222},[450,1458],[429,11224,3144],{"className":11225},[476],[429,11227,4589],{"className":11228},[450,451],[429,11230,3151],{"className":11231},[500],[429,11233,3144],{"className":11234},[476],[429,11236,581],{"className":11237,"style":580},[450,451],[429,11239,3151],{"className":11240},[500],",\nthe shortest path ",[385,11243,11244],{},"in hops",", building a breadth-first tree via a FIFO queue.",[1137,11247,11248,11250,11251,658,11254,11358,11359,11362,11363,11366,11367,11370],{},[394,11249,4705],{}," plunges and backtracks, stamping ",[394,11252,11253],{},"start\u002Ffinish times",[429,11255,11257],{"className":11256},[432],[429,11258,11260],{"className":11259,"ariaHidden":437},[436],[429,11261,11263,11266,11269,11309,11312,11315,11355],{"className":11262},[441],[429,11264],{"className":11265,"style":472},[445],[429,11267,3144],{"className":11268},[476],[429,11270,11272,11275],{"className":11271},[450],[429,11273,4589],{"className":11274},[450,451],[429,11276,11278],{"className":11277},[1529],[429,11279,11281,11301],{"className":11280},[1062,1063],[429,11282,11284,11298],{"className":11283},[1067],[429,11285,11287],{"className":11286,"style":7703},[1071],[429,11288,11289,11292],{"style":1896},[429,11290],{"className":11291,"style":1080},[1079],[429,11293,11295],{"className":11294},[1084,1085,1086,1087],[429,11296,581],{"className":11297,"style":580},[450,451,1087],[429,11299,1113],{"className":11300},[1112],[429,11302,11304],{"className":11303},[1067],[429,11305,11307],{"className":11306,"style":1867},[1071],[429,11308],{},[429,11310,487],{"className":11311},[486],[429,11313],{"className":11314,"style":491},[456],[429,11316,11318,11321],{"className":11317},[450],[429,11319,6655],{"className":11320,"style":6654},[450,451],[429,11322,11324],{"className":11323},[1529],[429,11325,11327,11347],{"className":11326},[1062,1063],[429,11328,11330,11344],{"className":11329},[1067],[429,11331,11333],{"className":11332,"style":7703},[1071],[429,11334,11335,11338],{"style":7779},[429,11336],{"className":11337,"style":1080},[1079],[429,11339,11341],{"className":11340},[1084,1085,1086,1087],[429,11342,581],{"className":11343,"style":580},[450,451,1087],[429,11345,1113],{"className":11346},[1112],[429,11348,11350],{"className":11349},[1067],[429,11351,11353],{"className":11352,"style":1867},[1071],[429,11354],{},[429,11356,3151],{"className":11357},[500],"\nthat ",[394,11360,11361],{},"nest"," like parentheses (nesting + white-path theorems) and ",[394,11364,11365],{},"classify\nedges","; most importantly, a ",[394,11368,11369],{},"back edge"," exists exactly when the graph has a\ncycle.",[1137,11372,11373,11374,11416],{},"Both traversals run in ",[429,11375,11377],{"className":11376},[432],[429,11378,11380,11404],{"className":11379,"ariaHidden":437},[436],[429,11381,11383,11386,11389,11392,11395,11398,11401],{"className":11382},[441],[429,11384],{"className":11385,"style":472},[445],[429,11387,841],{"className":11388,"style":840},[450,451],[429,11390,477],{"className":11391},[476],[429,11393,482],{"className":11394,"style":481},[450,451],[429,11396],{"className":11397,"style":481},[456],[429,11399,855],{"className":11400},[854],[429,11402],{"className":11403,"style":481},[456],[429,11405,11407,11410,11413],{"className":11406},[441],[429,11408],{"className":11409,"style":472},[445],[429,11411,496],{"className":11412,"style":495},[450,451],[429,11414,501],{"className":11415},[500],", linear in the graph's size, and either one\nlabels connected components for free.",[11418,11419,11422,11427],"section",{"className":11420,"dataFootnotes":376},[11421],"footnotes",[414,11423,11426],{"className":11424,"id":410},[11425],"sr-only","Footnotes",[11428,11429,11430,11444,11456,11510],"ol",{},[1137,11431,11433,11436,11437],{"id":11432},"user-content-fn-skiena-graph",[394,11434,11435],{},"Skiena",", §5 — Graph Traversal — the hardest part is recognizing a problem as a graph problem. ",[406,11438,11443],{"href":11439,"ariaLabel":11440,"className":11441,"dataFootnoteBackref":376},"#user-content-fnref-skiena-graph","Back to reference 1",[11442],"data-footnote-backref","↩",[1137,11445,11447,11450,11451],{"id":11446},"user-content-fn-clrs-rep",[394,11448,11449],{},"CLRS",", Ch. 22 — Elementary Graph Algorithms — adjacency list versus adjacency matrix and when each is preferred. ",[406,11452,11443],{"href":11453,"ariaLabel":11454,"className":11455,"dataFootnoteBackref":376},"#user-content-fnref-clrs-rep","Back to reference 2",[11442],[1137,11457,11459,11461,11462,11504,11505],{"id":11458},"user-content-fn-clrs-bfs",[394,11460,11449],{},", Ch. 22 — Elementary Graph Algorithms — BFS computes shortest hop-distances in ",[429,11463,11465],{"className":11464},[432],[429,11466,11468,11492],{"className":11467,"ariaHidden":437},[436],[429,11469,11471,11474,11477,11480,11483,11486,11489],{"className":11470},[441],[429,11472],{"className":11473,"style":472},[445],[429,11475,841],{"className":11476,"style":840},[450,451],[429,11478,477],{"className":11479},[476],[429,11481,482],{"className":11482,"style":481},[450,451],[429,11484],{"className":11485,"style":481},[456],[429,11487,855],{"className":11488},[854],[429,11490],{"className":11491,"style":481},[456],[429,11493,11495,11498,11501],{"className":11494},[441],[429,11496],{"className":11497,"style":472},[445],[429,11499,496],{"className":11500,"style":495},[450,451],[429,11502,501],{"className":11503},[500],". ",[406,11506,11443],{"href":11507,"ariaLabel":11508,"className":11509,"dataFootnoteBackref":376},"#user-content-fnref-clrs-bfs","Back to reference 3",[11442],[1137,11511,11513,11516,11517],{"id":11512},"user-content-fn-erickson-dfs",[394,11514,11515],{},"Erickson",", Ch. 6 — Graph Search — DFS start\u002Ffinish times and the parenthesis (nesting) theorem. ",[406,11518,11443],{"href":11519,"ariaLabel":11520,"className":11521,"dataFootnoteBackref":376},"#user-content-fnref-erickson-dfs","Back to reference 4",[11442],[11523,11524,11525],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark-mode .shiki span {color: var(--shiki-dark-mode);background: var(--shiki-dark-mode-bg);font-style: var(--shiki-dark-mode-font-style);font-weight: var(--shiki-dark-mode-font-weight);text-decoration: var(--shiki-dark-mode-text-decoration);}html.dark-mode .shiki span {color: var(--shiki-dark-mode);background: var(--shiki-dark-mode-bg);font-style: var(--shiki-dark-mode-font-style);font-weight: var(--shiki-dark-mode-font-weight);text-decoration: var(--shiki-dark-mode-text-decoration);}",{"title":376,"searchDepth":18,"depth":18,"links":11527},[11528,11529,11530,11531,11532,11536,11537,11538],{"id":416,"depth":18,"text":417},{"id":2946,"depth":18,"text":2947},{"id":4449,"depth":18,"text":4450},{"id":4991,"depth":18,"text":4992},{"id":7615,"depth":18,"text":7616,"children":11533},[11534,11535],{"id":8144,"depth":24,"text":8145},{"id":9972,"depth":24,"text":9973},{"id":10692,"depth":18,"text":10693},{"id":11002,"depth":18,"text":11003},{"id":410,"depth":18,"text":11426},"Almost every interesting structure (a road map, a social network, the\ndependencies between tasks, the states of a puzzle) is a set of things and\nthe connections between them. A graph is the mathematical object that\ncaptures exactly this and nothing more. Mastering a handful of graph algorithms\ngives you a lever on a startlingly wide range of problems; Skiena's blunt\nadvice is that the hardest part is usually recognizing that your problem is a\ngraph problem in disguise.1","md",{"moduleNumber":102,"lessonNumber":6,"order":11542},501,true,[11545,11549,11553,11556,11559],{"title":11546,"slug":11547,"difficulty":11548},"Flood Fill","flood-fill","Easy",{"title":11550,"slug":11551,"difficulty":11552},"Number of Islands","number-of-islands","Medium",{"title":11554,"slug":11555,"difficulty":11552},"Clone Graph","clone-graph",{"title":11557,"slug":11558,"difficulty":11552},"Rotting Oranges","rotting-oranges",{"title":11560,"slug":11561,"difficulty":11562},"Word Ladder","word-ladder","Hard","---\ntitle: Graph Representations and Traversal\nmodule: Graphs\nmoduleNumber: 5\nlessonNumber: 1\norder: 501\nsummary: >-\n  A graph captures _relationships_ — who connects to whom. We fix the\n  vocabulary, weigh the two standard representations (adjacency list versus\n  matrix), then meet the two explorations you'll use constantly: breadth-first search,\n  which finds shortest paths by number of edges, and depth-first search, whose\n  discovery and finish times reveal a graph's hidden structure. Both run in\n  $O(V + E)$.\ntopics: [Graph Representations, Graph Traversal]\nsources:\n  - book: CLRS\n    ref: \"Ch. 22 — Elementary Graph Algorithms\"\n  - book: Skiena\n    ref: \"§5 — Graph Traversal\"\n  - book: Erickson\n    ref: \"Ch. 6 — Graph Search\"\npractice:\n  - title: 'Flood Fill'\n    slug: flood-fill\n    difficulty: Easy\n  - title: 'Number of Islands'\n    slug: number-of-islands\n    difficulty: Medium\n  - title: 'Clone Graph'\n    slug: clone-graph\n    difficulty: Medium\n  - title: 'Rotting Oranges'\n    slug: rotting-oranges\n    difficulty: Medium\n  - title: 'Word Ladder'\n    slug: word-ladder\n    difficulty: Hard\n---\n\nAlmost every interesting structure (a road map, a social network, the\ndependencies between tasks, the states of a puzzle) is a set of _things_ and\nthe _connections_ between them. A **graph** is the mathematical object that\ncaptures exactly this and nothing more. Mastering a handful of graph algorithms\ngives you a lever on a startlingly wide range of problems; Skiena's blunt\nadvice is that the hardest part is usually _recognizing_ that your problem is a\ngraph problem in disguise.[^skiena-graph]\n\n## What is a graph?\n\n> **Definition (Graph).** A graph $G = (V, E)$ is a finite set $V$ of **vertices** together with a\n> set $E$ of **edges**, where each edge joins a pair of vertices.\n\nIf edges have no direction, so that an edge $\\set{u, v}$ connects $u$ and $v$\nsymmetrically, the graph is **undirected**. If each edge is an ordered pair\n$(u, v)$ pointing _from_ $u$ _to_ $v$, the graph is **directed** (a _digraph_).\nWe write $n = \\abs{V}$ for the number of vertices and $m = \\abs{E}$ for the\nnumber of edges; inside [asymptotic notation](\u002Falgorithms\u002Ffoundations\u002Fasymptotic-analysis) we abbreviate these to $V$ and $E$,\nwriting bounds like $O(V + E)$.\n\nThe definition is fussy for a reason: every clause rules out a\npathology. A graph is **finite** (otherwise we cannot index vertices), edges are\n**unordered** pairs $\\set{u, v}$ (ordered pairs would give a digraph), there are\n**no parallel edges** (since $E$ is a _set_, not a multiset), and **no self-loops**\n(since $\\abs{e} = 2$ for every $e \\in E \\subseteq \\binom{V}{2}$). Relaxing any one\nclause yields a richer object: a multigraph, a digraph, and so on.\n\nA few terms recur constantly:\n\n- Vertices $u$ and $v$ are **adjacent** if an edge joins them; that edge $e =\n  \\set{u, v}$ is **incident** on both, which are its **endpoints**.\n- The **degree** $\\deg(v) = \\abs{\\set{e : e \\text{ is incident on } v}}$ counts\n  the edges touching $v$. In a digraph $e = (u, v)$ **leaves** $u$ (its _tail_)\n  and **arrives at** $v$ (its _head_), and we split degree into\n  $\\operatorname{in-deg}(v)$ and $\\operatorname{out-deg}(v)$.\n- The **handshake lemma** falls straight out of counting incidences both ways:\n  $\\sum_{v \\in V} \\deg(v) = 2\\abs{E}$ in a graph, and $\\sum_{v}\n  \\operatorname{in-deg}(v) = \\abs{E} = \\sum_{v} \\operatorname{out-deg}(v)$ in a\n  digraph.\n- A **walk** is an alternating sequence $(v_0, e_1, v_1, e_2, \\dots, e_\\ell,\n  v_\\ell)$ respecting incidence, of **length** $\\ell$. A walk with $v_0 = v_\\ell$\n  is **closed**. A **path** is a walk with no repeated vertices; a **cycle** is a\n  closed walk whose vertices are distinct except for the shared endpoint\n  (length $\\geq 3$ in a graph, $\\geq 2$ in a digraph). Beware: many texts overload\n  \"path\" to mean walk, but we keep them separate.\n- An undirected graph is **connected** if a path joins every pair of vertices; a\n  digraph is **strongly connected** if a _directed_ path runs both ways between\n  every pair. A **connected component** is a maximal connected subgraph.\n- The distance $d(u, v)$ is the length of the shortest path from $u$ to $v$\n  (directed, for digraphs), or $\\infty$ if $v$ is unreachable from $u$.\n- A graph may carry a **weight** $w(u, v)$ on each edge (a length, cost, or\n  capacity) that later lessons will exploit.\n\nHere is a small undirected graph on five vertices that we will use throughout\nthis lesson:\n\n$$\n% caption: A small undirected graph on five vertices used throughout the lesson.\n\\begin{tikzpicture}[every node\u002F.style={circle, draw, minimum size=8mm, font=\\small},\n  node distance=18mm]\n  \\node (s) {$s$};\n  \\node (a) [above right=10mm and 16mm of s] {$a$};\n  \\node (b) [below right=10mm and 16mm of s] {$b$};\n  \\node (c) [right=18mm of a] {$c$};\n  \\node (d) [right=18mm of b] {$d$};\n  \\draw (s) -- (a);\n  \\draw (s) -- (b);\n  \\draw (a) -- (b);\n  \\draw (a) -- (c);\n  \\draw (b) -- (d);\n  \\draw (c) -- (d);\n\\end{tikzpicture}\n$$\n\nA graph is bounded in size: every simple graph has at most\n$\\binom{n}{2} = \\tfrac{n(n-1)}{2}$ edges, so $m = O(n^2)$. A graph is **sparse**\nwhen $m$ is close to $n$ and **dense** when $m$ is close to $n^2$. This single\ndistinction governs which representation, and sometimes which algorithm, to\nchoose.\n\n## Two ways to store a graph\n\nWe need a concrete data structure before we can compute anything. The two\nstandard choices trade space against the speed of one key query: _is there an\nedge from $u$ to $v$?_\n\n**Adjacency list.** Keep an array indexed by vertex; entry $u$ holds a list of\n$u$'s neighbors. Total space is $\\Theta(V + E)$, one slot per vertex plus one\nlist node per edge (two, in an undirected graph, since each edge appears on both\nendpoints' lists). Listing a vertex's neighbors is immediate, which is exactly\nwhat traversals need.\n\n**Adjacency matrix.** Keep an $n \\times n$ matrix $A$ with $A[u][v] = 1$ when\nedge $(u, v)$ exists and $0$ otherwise (or the weight, for a weighted graph).\nTesting a specific edge is $O(1)$, but the matrix always occupies\n$\\Theta(V^2)$ space regardless of how few edges there are, and listing a\nvertex's neighbors costs $\\Theta(V)$ because we must scan a whole row.\n\n| Operation | Adjacency list | Adjacency matrix |\n| --- | --- | --- |\n| Space | $\\Theta(V + E)$ | $\\Theta(V^2)$ |\n| Test edge $(u,v)$? | $O(\\deg u)$ | $\\Theta(1)$ |\n| List neighbors of $u$ | $\\Theta(\\deg u)$ | $\\Theta(V)$ |\n| Add an edge | $O(1)$ | $\\Theta(1)$ |\n| Iterate over all edges | $\\Theta(V + E)$ | $\\Theta(V^2)$ |\n| Best when | graph is **sparse** | graph is **dense** |\n\nConcretely, here is the five-vertex graph above stored both ways. The list keeps\none short neighbor-list per vertex; the matrix spends a full $5 \\times 5$ grid of\nbits, symmetric across the diagonal because the graph is undirected:\n\n$$\n% caption: The five-vertex graph stored two ways: adjacency lists (left) and the symmetric\n%          $0\u002F1$ adjacency matrix (right).\n\\begin{tikzpicture}[font=\\small]\n  \\definecolor{acc}{HTML}{2348F2}\n  % --- adjacency lists ---\n  \\node[font=\\footnotesize] at (0.7,3.0) {\\textbf{adjacency list}};\n  \\foreach \\v\u002F\\y\u002F\\lst in {s\u002F2.4\u002F{$a,\\,b$}, a\u002F1.8\u002F{$s,\\,b,\\,c$}, b\u002F1.2\u002F{$s,\\,a,\\,d$}, c\u002F0.6\u002F{$a,\\,d$}, d\u002F0\u002F{$b,\\,c$}} {\n    \\node[draw, minimum size=5mm, fill=acc!12] (n\\v) at (0,\\y) {$\\v$};\n    \\node[right=3mm of n\\v, font=\\footnotesize] {$\\to$ \\lst};\n  }\n  % --- adjacency matrix ---\n  \\begin{scope}[xshift=52mm]\n    \\node[font=\\footnotesize] at (1.5,3.0) {\\textbf{adjacency matrix}};\n    \\foreach \\c\u002F\\x in {s\u002F0, a\u002F0.6, b\u002F1.2, c\u002F1.8, d\u002F2.4}\n      \\node[font=\\footnotesize\\bfseries] at (\\x,2.5) {$\\c$};\n    \\foreach \\r\u002F\\y in {s\u002F2.0, a\u002F1.4, b\u002F0.8, c\u002F0.2, d\u002F-0.4}\n      \\node[font=\\footnotesize\\bfseries] at (-0.6,\\y) {$\\r$};\n    \\foreach \\row\u002F\\y in {{0,1,1,0,0}\u002F2.0, {1,0,1,1,0}\u002F1.4, {1,1,0,0,1}\u002F0.8, {0,1,0,0,1}\u002F0.2, {0,0,1,1,0}\u002F-0.4} {\n      \\foreach \\val [count=\\i from 0] in \\row {\n        \\pgfmathsetmacro\\x{0.6*\\i}\n        \\ifnum\\val=1\n          \\node[draw, minimum size=5mm, fill=acc!15] at (\\x,\\y) {$1$};\n        \\else\n          \\node[draw, minimum size=5mm] at (\\x,\\y) {$0$};\n        \\fi\n      }\n    }\n  \\end{scope}\n\\end{tikzpicture}\n$$\n\nCLRS, Skiena, and Erickson all reach the same verdict: the **adjacency list**\nis the default.[^clrs-rep] Real graphs are usually sparse, and the linear-space, fast-to-iterate\nlist is what makes the $O(V + E)$ traversals below possible. Reach for\nthe matrix only when the graph is dense, when you need constant-time edge tests,\nor when an algorithm is naturally phrased in linear-algebra terms.\n\n## One traversal to rule them all\n\nBefore specializing, it pays to see that BFS and DFS are the _same algorithm_.\nThis is made explicit with a deliberately generic skeleton called\n**Whatever-First Search**: grow a _frontier_ of discovered-but-unprocessed\nvertices, repeatedly pull one out, and push each of its undiscovered neighbors\nin. The only freedom is _which_ vertex you pull next, and that is decided\nentirely by the **data structure holding the frontier**.\n\n```algorithm\ncaption: $\\textsc{Whatever-First-Search}(G, s)$ — the generic skeleton\nnumber: 1\nforeach vertex $v \\in V$ do\n  $v.visited \\gets \\text{false}$\n  $v.\\pi \\gets \\text{nil}$\n$s.visited \\gets \\text{true}$\nput $s$ into the bag $B$\nwhile $B \\neq \\emptyset$ do\n  take a vertex $u$ out of $B$ \u002F\u002F bag decides who\n  foreach $v$ adjacent to $u$ do\n    if not $v.visited$ then\n      $v.visited \\gets \\text{true}$\n      $v.\\pi \\gets u$\n      put $v$ into the bag $B$\n```\n\nThe $\\pi$ pointers always carve out a tree (or forest) rooted at $s$, the\n**search tree**, because each vertex is discovered exactly once, from exactly\none parent. What changes is the _shape_ of that tree, and it is fixed by one\nchoice:\n\n| Bag $B$ | Order of removal | Specialization |\n| --- | --- | --- |\n| **Queue** (FIFO) | oldest first | $\\textsc{BFS}$ — explores in rings |\n| **Stack** (LIFO) | newest first | $\\textsc{DFS}$ — plunges and backtracks |\n| **Priority queue** | cheapest first | Dijkstra \u002F Prim (later lessons) |\n\nThis is the unifying idea to carry forward: _BFS is the queue instantiation, DFS\nis the stack instantiation,_ and the weighted shortest-path and [minimum-spanning-tree](\u002Falgorithms\u002Fgraphs\u002Fminimum-spanning-trees)\nalgorithms of later lessons are just Whatever-First-Search with a priority queue.\nEverything below specializes this one skeleton.\n\nThe choice of bag shows up as the _shape_ of the search tree. Run both on the\nsame little graph from $s$ (ties broken alphabetically): the queue grows a short,\nbushy tree that hugs $s$ at every depth, while the stack grows one long descending\nspine, diving as far as it can before backing up.\n\n$$\n% caption: Same graph, same source: the queue (BFS) builds a shallow bushy tree, the stack\n%          (DFS) a deep spine.\n\\begin{tikzpicture}[\n  >=Stealth,\n  V\u002F.style={circle, draw, minimum size=7mm, font=\\small},\n  R\u002F.style={circle, draw=acc, very thick, fill=acc!15, minimum size=7mm, font=\\small},\n  tree\u002F.style={->, very thick}]\n  \\definecolor{acc}{HTML}{2348F2}\n  % ---- BFS ----\n  \\node[font=\\footnotesize] at (1.4,1.0) {BFS (queue)};\n  \\node[R] (bs) at (1.4,0) {$s$};\n  \\node[V] (ba) at (0,-1.4) {$a$};\n  \\node[V] (bb) at (1.4,-1.4) {$b$};\n  \\node[V] (bc) at (2.8,-1.4) {$c$};\n  \\node[V] (bd) at (1.4,-2.8) {$d$};\n  \\draw[tree] (bs) -- (ba);\n  \\draw[tree] (bs) -- (bb);\n  \\draw[tree] (bs) -- (bc);\n  \\draw[tree] (bb) -- (bd);\n  % ---- DFS ----\n  \\begin{scope}[xshift=58mm]\n    \\node[font=\\footnotesize] at (1.4,1.0) {DFS (stack)};\n    \\node[R] (ds) at (1.4,0) {$s$};\n    \\node[V] (da) at (0.7,-1.4) {$a$};\n    \\node[V] (db) at (0,-2.8) {$b$};\n    \\node[V] (dd) at (0.7,-4.2) {$d$};\n    \\node[V] (dc) at (2.1,-1.4) {$c$};\n    \\draw[tree] (ds) -- (da);\n    \\draw[tree] (da) -- (db);\n    \\draw[tree] (db) -- (dd);\n    \\draw[tree] (ds) -- (dc);\n  \\end{scope}\n\\end{tikzpicture}\n$$\n\n## Breadth-first search\n\nThe most basic question we can ask is: _starting from a source $s$, which\nvertices can I reach, and how far away is each?_ **Breadth-first search** (BFS)\nis Whatever-First-Search with a **queue**. It explores in rings of increasing\ndistance: first $s$ itself, then all neighbors of $s$, then everything new one\nstep beyond them, and so on. The first-in-first-out discipline is exactly what\nenforces this level-by-level order; the oldest-discovered vertex always sits at\nthe shallowest depth still unfinished.\n\nAs it runs, BFS computes for each vertex $v$ a distance $v.d$, the fewest edges\n(\"hops\") on any path from $s$ to $v$, and a predecessor $v.\\pi$, the vertex from\nwhich $v$ was discovered. The predecessors form the **breadth-first tree** (or\n**shortest-path tree**) $\\set{(v.\\pi,\\, v) : v \\text{ visited}}$. We refine the\nsingle visited flag of the skeleton into three colors: **white** vertices are\nundiscovered, **gray** ones are discovered but still in the queue, and **black**\nones are finished.\n\n```algorithm\ncaption: $\\textsc{BFS}(G, s)$ — shortest distances in hops from $s$\nnumber: 2\nforeach vertex $u \\in V \\setminus \\set{s}$ do\n  $u.color \\gets \\text{white}$\n  $u.d \\gets \\infty$\n  $u.\\pi \\gets \\text{nil}$\n$s.color \\gets \\text{gray}$ \u002F\u002F discover source\n$s.d \\gets 0$\n$s.\\pi \\gets \\text{nil}$\n$Q \\gets \\emptyset$\nenqueue$(Q, s)$\nwhile $Q \\neq \\emptyset$ do\n  $u \\gets$ dequeue$(Q)$\n  foreach $v$ adjacent to $u$ do\n    if $v.color = \\text{white}$ then \u002F\u002F first time reaching v\n      $v.color \\gets \\text{gray}$\n      $v.d \\gets u.d + 1$\n      $v.\\pi \\gets u$\n      enqueue$(Q, v)$\n  $u.color \\gets \\text{black}$\nreturn $d$ and $\\pi$\n```\n\n**Shortest hops, and why it is correct.** Write $\\operatorname{dist}[s][v]$ for the\n_true_ distance from $s$ to $v$, the length of the shortest directed path. The\nclaim BFS delivers is the cleanest possible: **$v.d = \\operatorname{dist}[s][v]$\nfor every $v$.** Two facts drive the proof:\n\n- _The queue is sorted by depth._ At every moment the $d$-values in $Q$ span at\n  most two consecutive layers $k, k{+}1$, and never decrease as we dequeue. (BFS\n  only ever appends $v.d = u.d + 1$ to the back.)\n- _$v.d \\geq \\operatorname{dist}[s][v]$ always_, because $v.d$ is the length of an\n  actual $s\\!\\to\\!v$ path (trace the $\\pi$ pointers), and no path beats the\n  shortest one.\n\nFor the reverse inequality, induct on $\\operatorname{dist}[s][v] = k$. A vertex\nat true distance $k$ has some neighbor $u$ at true distance $k-1$; by induction\n$u.d = k-1$, and since all depth-$(k{-}1)$ vertices are dequeued before any\ndepth-$k$ vertex is processed, $v$ is white when BFS scans $u$'s list and gets\n$v.d = u.d + 1 = k$. Hence $v.d = \\operatorname{dist}[s][v]$, and following $\\pi$\npointers from $v$ back to $s$ traces an actual shortest path in reverse: _the_\nunique $s$-to-$v$ path in the BFS tree.\n\n**Running time.** Initialization touches every vertex once: $\\Theta(V)$. Each\nvertex is enqueued and dequeued exactly once (only white vertices are enqueued,\nand they are immediately grayed), and when we dequeue $u$ we scan its adjacency\nlist once. The scans together examine every edge a constant number of times, for\n$\\Theta(E)$ total. Hence BFS runs in $O(V + E)$, linear in the size of the\ngraph, the gold standard for graph algorithms.[^clrs-bfs]\n\n**A worked run.** Take this small digraph and run BFS from $s$. The queue\nevolves $[s] \\to [a,b,c] \\to [b,c,e] \\to [c,e] \\to [e,g] \\to [g,f] \\to [f] \\to\n[\\,]$, discovering vertices in the order $s, a, b, c, e, g, f$. The resulting\n$d$-values sort the vertices into **layers** by distance from $s$, which let us\nread off shortest [BFS distances](\u002Falgorithms\u002Fgraphs\u002Fshortest-paths) directly:\n\n$$\n% caption: BFS tree from $s$ with vertices sorted into distance layers $d = 0$ to $3$.\n\\begin{tikzpicture}[\n  >=Stealth, node distance=14mm,\n  V\u002F.style={circle, draw, minimum size=8mm, font=\\small},\n  tree\u002F.style={->, very thick},\n  cross\u002F.style={->, gray, dashed}]\n  % layer 0\n  \\node[V] (s) {$s$};\n  % layer 1\n  \\node[V] (a) [below left=12mm and 14mm of s] {$a$};\n  \\node[V] (b) [below=12mm of s] {$b$};\n  \\node[V] (c) [below right=12mm and 14mm of s] {$c$};\n  % layer 2\n  \\node[V] (e) [below=12mm of b] {$e$};\n  \\node[V] (g) [below=12mm of c] {$g$};\n  % layer 3\n  \\node[V] (f) [below=12mm of e] {$f$};\n  \\node[V] (d) [right=20mm of c] {$d$};\n  % tree edges (solid) — the BFS \u002F shortest-path tree\n  \\draw[tree] (s) -- (a);\n  \\draw[tree] (s) -- (b);\n  \\draw[tree] (s) -- (c);\n  \\draw[tree] (b) -- (e);\n  \\draw[tree] (c) -- (g);\n  \\draw[tree] (e) -- (f);\n  % non-tree edges (already-visited targets)\n  \\draw[cross] (a) -- (b);\n  \\draw[cross] (c) -- (e);\n  \\draw[cross] (d) -- (c);\n  % layer brackets\n  \\node[font=\\footnotesize, left=6mm of s]  {$d=0$};\n  \\node[font=\\footnotesize, left=6mm of a]  {$d=1$};\n  \\node[font=\\footnotesize, left=6mm of e]  {$d=2$};\n  \\node[font=\\footnotesize, left=6mm of f]  {$d=3$};\n\\end{tikzpicture}\n$$\n\nThick edges are **tree edges** $(v.\\pi, v)$; gray dashed edges point at vertices\nalready discovered, so BFS skips them. Reading off $d$: $s.d=0$; $a.d=b.d=c.d=1$;\n$e.d=g.d=2$; $f.d=3$. Vertex $d$ has no path _from_ $s$, so $d.d = \\infty$, and it\nnever enters the queue. The tree path from $s$ down to any vertex spells out a\nshortest route in hops.\n\n**Reachability and components, for free.** The skeleton already solves more than\ndistances. To list the **connected components** of an undirected graph, loop over\nall vertices and start a fresh search from each still-unvisited one, tagging every\nvertex it reaches with the current component number:\n\n```algorithm\ncaption: $\\textsc{Connected-Components}(G)$ — label every vertex's component\nnumber: 3\n$c \\gets 0$\nforeach vertex $v \\in V$ do\n  if not $v.visited$ then\n    $c \\gets c + 1$\n    run $\\textsc{BFS}(G, v)$, marking each newly visited vertex with $c$\n```\n\nEach search marks exactly one component, and every vertex is visited once, so the\nwhole sweep is still $O(V + E)$. Because we only used the _visited_ flag, **any**\ninstantiation works here — swap in DFS and nothing changes. This is the payoff of\nthe unifying view: connectivity is a Whatever-First-Search property, not a BFS one.\n\n## Depth-first search\n\nWhere BFS fans out in rings, **depth-first search** (DFS) plunges. It is\nWhatever-First-Search with a **stack**: pulling the _newest_ discovered vertex\nmeans we always descend from where we just were. From a vertex it follows an edge\nto an unvisited neighbor, then a neighbor of _that_, going as deep as possible\nbefore **backtracking** to the most recent vertex with an unexplored edge. The\nLIFO stack is usually left implicit — it _is_ the recursion call stack.\n\nDFS's gift is a pair of **timestamps** on each vertex $v$: a _discovery_ (or\n_start_) time, which we write $s_v$, stamped when $v$ first turns gray, and a\n_finish_ time $f_v$, stamped when $v$ turns black after all its descendants are\ndone. A single global clock $time$ ticks once per stamp, so on $n$ vertices every\nvalue in $1, 2, \\dots, 2n$ is used exactly once. Unlike BFS, the outer driver\nrestarts DFS from any leftover white vertex, so it covers disconnected pieces too,\nproducing a **depth-first forest** rather than a single tree.\n\n```algorithm\ncaption: $\\textsc{DFS}(G)$ — discovery \u002F finish times for every vertex\nnumber: 4\nforeach vertex $u \\in V$ do\n  $u.color \\gets \\text{white}$\n  $u.\\pi \\gets \\text{nil}$\n$time \\gets 0$\nforeach vertex $u \\in V$ do\n  if $u.color = \\text{white}$ then\n    call $\\textsc{DFS-Visit}(G, u)$\n```\n\n```algorithm\ncaption: $\\textsc{DFS-Visit}(G, u)$ — explore everything reachable from $u$\nnumber: 5\n$time \\gets time + 1$\n$u.s \\gets time$ \u002F\u002F discover u (turns gray)\n$u.color \\gets \\text{gray}$\nforeach $v$ adjacent to $u$ do\n  if $v.color = \\text{white}$ then\n    $v.\\pi \\gets u$\n    call $\\textsc{DFS-Visit}(G, v)$\n$u.color \\gets \\text{black}$\n$time \\gets time + 1$\n$u.f \\gets time$\n```\n\nLike BFS, DFS runs in $\\Theta(V + E)$: the initialization and the outer loop\ncost $\\Theta(V)$, and $\\textsc{DFS-Visit}$ is called exactly once per vertex (only on\nwhite vertices, which it immediately grays), scanning each adjacency list once\nfor $\\Theta(E)$ total.\n\n### A worked DFS, and the nesting structure\n\nRun $\\textsc{DFS}$ on the digraph below, starting at $s$ and breaking ties\nalphabetically. Each vertex is labeled $s_v\u002Ff_v$. Thick edges are **tree edges**\n(the depth-first forest); the dashed edges are non-tree edges, classified next.\n\n$$\n% caption: DFS forest on a digraph with start and finish times and classified non-tree\n%          edges.\n\\begin{tikzpicture}[\n  >=Stealth, node distance=18mm,\n  V\u002F.style={ellipse, draw, minimum width=12mm, minimum height=8mm, font=\\small, inner sep=1pt},\n  tree\u002F.style={->, very thick},\n  nontree\u002F.style={->, gray, dashed}]\n  \\node[V] (s) {$s$ \\;$1\u002F10$};\n  \\node[V] (w) [below=of s] {$w$ \\;$2\u002F9$};\n  \\node[V] (t) [right=34mm of s] {$t$ \\;$11\u002F16$};\n  \\node[V] (q) [below left=14mm and 6mm of t] {$q$ \\;$12\u002F13$};\n  \\node[V] (y) [below left=14mm and 6mm of w] {$y$ \\;$3\u002F6$};\n  \\node[V] (z) [below right=14mm and 6mm of w] {$z$ \\;$7\u002F8$};\n  \\node[V] (x) [below=14mm of y] {$x$ \\;$4\u002F5$};\n  \\node[V] (r) [below right=14mm and 6mm of t] {$r$ \\;$14\u002F15$};\n  % tree edges\n  \\draw[tree] (s) -- (w);\n  \\draw[tree] (w) -- (y);\n  \\draw[tree] (y) -- (x);\n  \\draw[tree] (w) -- (z);\n  \\draw[tree] (t) -- (q);\n  \\draw[tree] (t) -- (r);\n  % non-tree edges\n  \\draw[nontree] (s) to[bend left=15] (z); % forward\n  \\draw[nontree] (z) to[bend left=20] (x); % cross\n  \\draw[nontree] (z) to[bend left=10] (s); % back\n  \\draw[nontree] (r) -- (q); % cross (between tree roots)\n\\end{tikzpicture}\n$$\n\nThe discovery and finish times nest like balanced parentheses. Write each\nvertex's **interval** $[s_v,\\, f_v]$. For any two vertices $u$ and $v$, exactly\none of three things holds, since they can never _partially_ overlap:\n\n- the intervals are **disjoint**, and neither vertex is a descendant of the\n  other (they are _incomparable_), or\n- one interval **contains** the other, and the contained vertex is a\n  **descendant** of the container in the DFS forest.\n\nThis is the **nesting theorem** (CLRS calls it the parenthesis theorem), and it\nmakes the recursion visible.[^erickson-dfs] Drawing each interval $[s_v, f_v]$ as\na bar along the time axis turns the forest into a literal stack of nested\nbrackets — a bar sits _strictly inside_ another exactly when the inner vertex is\na descendant of the outer:\n\n$$\n% caption: DFS intervals $[s_v, f_v]$ drawn as bars on the time axis; one bar nesting\n%          inside another marks a descendant.\n\\begin{tikzpicture}[x=4.4mm, y=6.5mm]\n  \\definecolor{acc}{HTML}{2348F2}\n  \\foreach \\x in {1,...,16} \\node[font=\\scriptsize, gray] at (\\x,0) {\\x};\n  \\draw[->, gray] (0.4,0.5) -- (16.9,0.5) node[right, font=\\scriptsize, black]{time};\n  \\draw[acc, line width=2pt] (1,1)   -- (10,1)  node[midway, above, font=\\scriptsize, black]{$s$};\n  \\draw[acc, line width=2pt] (2,1.8) -- (9,1.8) node[midway, above, font=\\scriptsize, black]{$w$};\n  \\draw[acc, line width=2pt] (3,2.6) -- (6,2.6) node[midway, above, font=\\scriptsize, black]{$y$};\n  \\draw[acc, line width=2pt] (4,3.4) -- (5,3.4) node[midway, above, font=\\scriptsize, black]{$x$};\n  \\draw[acc, line width=2pt] (7,2.6) -- (8,2.6) node[midway, above, font=\\scriptsize, black]{$z$};\n  \\draw[acc, line width=2pt] (11,1.8) -- (16,1.8) node[midway, above, font=\\scriptsize, black]{$t$};\n  \\draw[acc, line width=2pt] (12,2.6) -- (13,2.6) node[midway, above, font=\\scriptsize, black]{$q$};\n  \\draw[acc, line width=2pt] (14,2.6) -- (15,2.6) node[midway, above, font=\\scriptsize, black]{$r$};\n\\end{tikzpicture}\n$$\n\nAbove, $[s_x, f_x] = [4,5] \\subset [3,6] = [s_y,\nf_y] \\subset [2,9] = [s_w, f_w]$, so $x$ is a descendant of $y$ is a descendant of\n$w$. Two companions sharpen it:\n\n- **White-path theorem.** $v$ becomes a descendant of $u$ **if and only if**, at\n  the moment $u$ is discovered (time $s_u$), there is a path $u \\rightsquigarrow\n  v$ consisting entirely of still-white vertices. This is the cleanest test for\n  \"what will end up under $u$.\"\n- **Cycle theorem.** Every back edge lies on a cycle, and every cycle contains at\n  least one back edge. Equivalently, a digraph is **acyclic iff DFS finds no back\n  edge**, the engine behind cycle detection and [topological sort](\u002Falgorithms\u002Fgraphs\u002Ftopological-sort-and-scc).\n\n### Classifying edges\n\nAs DFS traverses an edge $(u, v)$, the _color_ of $v$ at that moment reveals what\nkind of edge it is, a classification that drives the algorithms of the next\nlessons. In the worked digraph above:\n\n- **Tree edge.** $v$ is white: we set $v.\\pi = u$, so the edge is $(v.\\pi, v)$. We\n  discover $v$ through this edge; it joins the depth-first forest (e.g. $s \\to w$,\n  $w \\to y$).\n- **Back edge.** $v$ is **gray**, an ancestor of $u$ still on the recursion\n  stack ($z \\to s$, since $[s_z, f_z] \\subset [s_s, f_s]$). _A digraph has a back\n  edge iff it has a cycle_, the linchpin of cycle detection and topological sort.\n- **Forward edge.** $v$ is black and a _descendant_ of $u$ ($s \\to z$: a\n  non-tree edge to an already-finished descendant).\n- **Cross edge.** $v$ is black and _not_ a descendant of $u$ ($z \\to x$, or the\n  edge $r \\to q$ between separate tree branches).\n\nIn an **undirected** graph the picture simplifies: every edge is either a tree\nedge or a back edge, since forward and cross edges cannot occur, because exploring an\nedge from either endpoint reaches the other while it is still gray.\n\n## BFS or DFS?\n\nThey are one algorithm, $\\textsc{Whatever-First-Search}$, read with two\ndifferent bags. Both are $O(V + E)$ linear-time skeletons; the _order_ of removal\nis the only difference, and it dictates the structure each exposes.\n\n| | BFS (queue) | DFS (stack) |\n| --- | --- | --- |\n| Frontier bag | queue, FIFO — oldest first | stack, LIFO — newest first |\n| Search tree | shallowest paths from $s$ | nesting \u002F parenthesis structure |\n| Computes | $\\operatorname{dist}[s][v]$ (shortest hops) | start\u002Ffinish times $[s_v, f_v]$ |\n| Reveals | level sets, connectivity | back edges → cycles, finish order |\n| Typical uses | unweighted shortest paths, components | cycle detection, topological sort, strong connectivity |\n\nChoose BFS when distance-in-hops matters; choose DFS when you need a graph's\nrecursive structure, which, as the next two lessons show, is exactly what\ntopological sorting and strong connectivity demand. And keep the frame in mind:\nswap the bag for a **priority queue** and the very same skeleton becomes\nDijkstra and Prim.\n\n## Takeaways\n\n- A **graph** $G = (V, E)$ models things and their connections; the\n  sparse-versus-dense distinction drives every representation choice.\n- Prefer the **adjacency list** ($\\Theta(V + E)$ space, fast neighbor\n  iteration); use the **adjacency matrix** ($\\Theta(V^2)$) only for dense graphs\n  or constant-time edge tests.\n- **$\\textsc{Whatever-First-Search}$** is the one skeleton: grow a frontier\n  _bag_, and let the bag's discipline pick the next vertex. A **queue** gives\n  BFS, a **stack** gives DFS, a **priority queue** gives the weighted algorithms\n  to come.\n- **BFS** explores in rings from a source and computes $\\operatorname{dist}[s][v]$,\n  the shortest path _in hops_, building a breadth-first tree via a FIFO queue.\n- **DFS** plunges and backtracks, stamping **start\u002Ffinish times** $[s_v, f_v]$\n  that **nest** like parentheses (nesting + white-path theorems) and **classify\n  edges**; most importantly, a **back edge** exists exactly when the graph has a\n  cycle.\n- Both traversals run in $O(V + E)$, linear in the graph's size, and either one\n  labels connected components for free.\n\n[^skiena-graph]: **Skiena**, §5 — Graph Traversal — the hardest part is recognizing a problem as a graph problem.\n[^clrs-rep]: **CLRS**, Ch. 22 — Elementary Graph Algorithms — adjacency list versus adjacency matrix and when each is preferred.\n[^clrs-bfs]: **CLRS**, Ch. 22 — Elementary Graph Algorithms — BFS computes shortest hop-distances in $O(V + E)$.\n[^erickson-dfs]: **Erickson**, Ch. 6 — Graph Search — DFS start\u002Ffinish times and the parenthesis (nesting) theorem.\n",{"text":11565,"minutes":11566,"time":11567,"words":11568},"14 min read",13.52,811200,2704,{"title":157,"description":11539},[11571,11573,11575],{"book":11449,"ref":11572},"Ch. 22 — Elementary Graph Algorithms",{"book":11435,"ref":11574},"§5 — Graph Traversal",{"book":11515,"ref":11576},"Ch. 6 — Graph Search","available","01.algorithms\u002F06.graphs\u002F01.representations-and-traversal",[160,161],"EqcVm-Wzfa3He_i0f1PANaxVucwE99m1bKOycEQSIdY",{"\u002Falgorithms\u002Ffoundations\u002Fwhat-is-an-algorithm":11582,"\u002Falgorithms\u002Ffoundations\u002Fasymptotic-analysis":11583,"\u002Falgorithms\u002Ffoundations\u002Frecurrences":11584,"\u002Falgorithms\u002Fdivide-and-conquer\u002Fmergesort":11585,"\u002Falgorithms\u002Fdivide-and-conquer\u002Fquicksort":11586,"\u002Falgorithms\u002Fdivide-and-conquer\u002Fselection":11587,"\u002Falgorithms\u002Fsorting\u002Fheaps-and-heapsort":11588,"\u002Falgorithms\u002Fsorting\u002Fsorting-lower-bounds":11589,"\u002Falgorithms\u002Fsorting\u002Flinear-time-sorting":11590,"\u002Falgorithms\u002Fdata-structures\u002Felementary-structures":11591,"\u002Falgorithms\u002Fdata-structures\u002Fhash-tables":11592,"\u002Falgorithms\u002Fdata-structures\u002Fbinary-search-trees":11593,"\u002Falgorithms\u002Fdata-structures\u002Favl-trees":11594,"\u002Falgorithms\u002Fdata-structures\u002Fbalanced-trees":11595,"\u002Falgorithms\u002Fdata-structures\u002Funion-find":11596,"\u002Falgorithms\u002Fdata-structures\u002Ffenwick-and-segment-trees":11597,"\u002Falgorithms\u002Fsequences\u002Ftwo-pointers-and-windows":11598,"\u002Falgorithms\u002Fsequences\u002Fmonotonic-stacks":11599,"\u002Falgorithms\u002Fsequences\u002Fbinary-search-on-the-answer":11600,"\u002Falgorithms\u002Fsequences\u002Fstring-matching":11601,"\u002Falgorithms\u002Fsequences\u002Ftries":11602,"\u002Falgorithms\u002Fgraphs\u002Frepresentations-and-traversal":11568,"\u002Falgorithms\u002Fgraphs\u002Ftopological-sort-and-scc":11603,"\u002Falgorithms\u002Fgraphs\u002Fminimum-spanning-trees":11604,"\u002Falgorithms\u002Fgraphs\u002Fshortest-paths":11605,"\u002Falgorithms\u002Fgraphs\u002Fnetwork-flow":11606,"\u002Falgorithms\u002Fgraphs\u002Fbridges-and-articulation-points":11607,"\u002Falgorithms\u002Fgraphs\u002Flowest-common-ancestor":11608,"\u002Falgorithms\u002Fgraphs\u002Ftwo-sat":11609,"\u002Falgorithms\u002Fgraphs\u002Feulerian-tours":11610,"\u002Falgorithms\u002Fgreedy\u002Fthe-greedy-method":11611,"\u002Falgorithms\u002Fgreedy\u002Fscheduling-and-intervals":11612,"\u002Falgorithms\u002Fgreedy\u002Fhuffman-codes":11613,"\u002Falgorithms\u002Fgreedy\u002Fmatroids":11614,"\u002Falgorithms\u002Fdynamic-programming\u002Fprinciples":11615,"\u002Falgorithms\u002Fdynamic-programming\u002Fsequence-dp":11616,"\u002Falgorithms\u002Fdynamic-programming\u002Flongest-increasing-subsequence":11617,"\u002Falgorithms\u002Fdynamic-programming\u002Fknapsack":11618,"\u002Falgorithms\u002Fdynamic-programming\u002Fcoin-change-and-unbounded":11619,"\u002Falgorithms\u002Fdynamic-programming\u002Finterval-dp":11620,"\u002Falgorithms\u002Fdynamic-programming\u002Ftree-dp":11621,"\u002Falgorithms\u002Fdynamic-programming\u002Fbitmask-dp":11622,"\u002Falgorithms\u002Fdynamic-programming\u002Fdp-optimizations":11623,"\u002Falgorithms\u002Fdynamic-programming\u002Fdp-on-graphs":11624,"\u002Falgorithms\u002Fbacktracking\u002Fbacktracking-fundamentals":11625,"\u002Falgorithms\u002Fbacktracking\u002Fconstraint-search":11626,"\u002Falgorithms\u002Fbacktracking\u002Fbranch-and-bound":11627,"\u002Falgorithms\u002Fmathematical-algorithms\u002Fnumber-theory-basics":11598,"\u002Falgorithms\u002Fmathematical-algorithms\u002Fmodular-exponentiation-and-primality":11628,"\u002Falgorithms\u002Fmathematical-algorithms\u002Fsieve-and-factorization":11629,"\u002Falgorithms\u002Fmathematical-algorithms\u002Fcombinatorics":11630,"\u002Falgorithms\u002Fcomputational-geometry\u002Fgeometric-primitives":11631,"\u002Falgorithms\u002Fcomputational-geometry\u002Fconvex-hull":11613,"\u002Falgorithms\u002Fcomputational-geometry\u002Fsweep-line":11632,"\u002Falgorithms\u002Fintractability\u002Fp-np-reductions":11633,"\u002Falgorithms\u002Fintractability\u002Fnp-completeness":11594,"\u002Falgorithms\u002Fintractability\u002Fcoping-with-hardness":11634,"\u002Falgorithms":11635,"\u002Ftheory-of-computation":11636,"\u002Fcomputer-architecture":11636,"\u002Fphysical-computing":11636,"\u002Fdatabases":11636,"\u002Fdeep-learning":11636},1763,2107,1738,2628,1723,2048,1697,1044,1542,1565,1679,1586,1388,1465,1971,1455,1533,1483,1578,1791,1481,1658,2070,1978,2080,1568,1451,1291,1543,1883,1443,1599,2038,2241,1744,1678,2288,1929,1657,1412,1554,1418,1713,1798,1694,1762,1534,1595,1262,1495,1630,2306,2142,107,0,{"\u002Falgorithms\u002Ffoundations\u002Fwhat-is-an-algorithm":11638,"\u002Falgorithms\u002Ffoundations\u002Fasymptotic-analysis":11639,"\u002Falgorithms\u002Ffoundations\u002Frecurrences":11640,"\u002Falgorithms\u002Fdivide-and-conquer\u002Fmergesort":11641,"\u002Falgorithms\u002Fdivide-and-conquer\u002Fquicksort":11642,"\u002Falgorithms\u002Fdivide-and-conquer\u002Fselection":11643,"\u002Falgorithms\u002Fsorting\u002Fheaps-and-heapsort":11644,"\u002Falgorithms\u002Fsorting\u002Fsorting-lower-bounds":11645,"\u002Falgorithms\u002Fsorting\u002Flinear-time-sorting":11646,"\u002Falgorithms\u002Fdata-structures\u002Felementary-structures":11647,"\u002Falgorithms\u002Fdata-structures\u002Fhash-tables":11648,"\u002Falgorithms\u002Fdata-structures\u002Fbinary-search-trees":11649,"\u002Falgorithms\u002Fdata-structures\u002Favl-trees":11650,"\u002Falgorithms\u002Fdata-structures\u002Fbalanced-trees":11651,"\u002Falgorithms\u002Fdata-structures\u002Funion-find":11652,"\u002Falgorithms\u002Fdata-structures\u002Ffenwick-and-segment-trees":11653,"\u002Falgorithms\u002Fsequences\u002Ftwo-pointers-and-windows":11654,"\u002Falgorithms\u002Fsequences\u002Fmonotonic-stacks":11655,"\u002Falgorithms\u002Fsequences\u002Fbinary-search-on-the-answer":11656,"\u002Falgorithms\u002Fsequences\u002Fstring-matching":11657,"\u002Falgorithms\u002Fsequences\u002Ftries":11658,"\u002Falgorithms\u002Fgraphs\u002Frepresentations-and-traversal":11659,"\u002Falgorithms\u002Fgraphs\u002Ftopological-sort-and-scc":11660,"\u002Falgorithms\u002Fgraphs\u002Fminimum-spanning-trees":11661,"\u002Falgorithms\u002Fgraphs\u002Fshortest-paths":11662,"\u002Falgorithms\u002Fgraphs\u002Fnetwork-flow":11663,"\u002Falgorithms\u002Fgraphs\u002Fbridges-and-articulation-points":11664,"\u002Falgorithms\u002Fgraphs\u002Flowest-common-ancestor":11665,"\u002Falgorithms\u002Fgraphs\u002Ftwo-sat":11666,"\u002Falgorithms\u002Fgraphs\u002Feulerian-tours":11667,"\u002Falgorithms\u002Fgreedy\u002Fthe-greedy-method":11668,"\u002Falgorithms\u002Fgreedy\u002Fscheduling-and-intervals":11669,"\u002Falgorithms\u002Fgreedy\u002Fhuffman-codes":11670,"\u002Falgorithms\u002Fgreedy\u002Fmatroids":11671,"\u002Falgorithms\u002Fdynamic-programming\u002Fprinciples":11672,"\u002Falgorithms\u002Fdynamic-programming\u002Fsequence-dp":11673,"\u002Falgorithms\u002Fdynamic-programming\u002Flongest-increasing-subsequence":11674,"\u002Falgorithms\u002Fdynamic-programming\u002Fknapsack":11675,"\u002Falgorithms\u002Fdynamic-programming\u002Fcoin-change-and-unbounded":11676,"\u002Falgorithms\u002Fdynamic-programming\u002Finterval-dp":11677,"\u002Falgorithms\u002Fdynamic-programming\u002Ftree-dp":11678,"\u002Falgorithms\u002Fdynamic-programming\u002Fbitmask-dp":11679,"\u002Falgorithms\u002Fdynamic-programming\u002Fdp-optimizations":11680,"\u002Falgorithms\u002Fdynamic-programming\u002Fdp-on-graphs":11681,"\u002Falgorithms\u002Fbacktracking\u002Fbacktracking-fundamentals":11682,"\u002Falgorithms\u002Fbacktracking\u002Fconstraint-search":11683,"\u002Falgorithms\u002Fbacktracking\u002Fbranch-and-bound":11684,"\u002Falgorithms\u002Fmathematical-algorithms\u002Fnumber-theory-basics":11685,"\u002Falgorithms\u002Fmathematical-algorithms\u002Fmodular-exponentiation-and-primality":11686,"\u002Falgorithms\u002Fmathematical-algorithms\u002Fsieve-and-factorization":11687,"\u002Falgorithms\u002Fmathematical-algorithms\u002Fcombinatorics":11688,"\u002Falgorithms\u002Fcomputational-geometry\u002Fgeometric-primitives":11689,"\u002Falgorithms\u002Fcomputational-geometry\u002Fconvex-hull":11690,"\u002Falgorithms\u002Fcomputational-geometry\u002Fsweep-line":11691,"\u002Falgorithms\u002Fintractability\u002Fp-np-reductions":11692,"\u002Falgorithms\u002Fintractability\u002Fnp-completeness":11693,"\u002Falgorithms\u002Fintractability\u002Fcoping-with-hardness":11694,"\u002Falgorithms":11695,"\u002Ftheory-of-computation":11698,"\u002Fcomputer-architecture":11701,"\u002Fphysical-computing":11704,"\u002Fdatabases":11707,"\u002Fdeep-learning":11710},{"path":11,"title":10,"module":5,"summary":14},{"path":17,"title":16,"module":5,"summary":20},{"path":23,"title":22,"module":5,"summary":27},{"path":34,"title":33,"module":29,"summary":37},{"path":40,"title":39,"module":29,"summary":43},{"path":46,"title":45,"module":29,"summary":49},{"path":56,"title":55,"module":51,"summary":59},{"path":62,"title":61,"module":51,"summary":64},{"path":67,"title":66,"module":51,"summary":70},{"path":78,"title":77,"module":72,"summary":81},{"path":84,"title":83,"module":72,"summary":87},{"path":90,"title":89,"module":72,"summary":92},{"path":95,"title":94,"module":72,"summary":98},{"path":101,"title":100,"module":72,"summary":104},{"path":107,"title":106,"module":72,"summary":112},{"path":115,"title":114,"module":72,"summary":119},{"path":126,"title":125,"module":121,"summary":129},{"path":132,"title":131,"module":121,"summary":134},{"path":137,"title":136,"module":121,"summary":140},{"path":143,"title":142,"module":121,"summary":146},{"path":149,"title":148,"module":121,"summary":151},{"path":158,"title":157,"module":153,"summary":162},{"path":165,"title":164,"module":153,"summary":167},{"path":170,"title":169,"module":153,"summary":172},{"path":175,"title":174,"module":153,"summary":177},{"path":180,"title":179,"module":153,"summary":182},{"path":185,"title":184,"module":153,"summary":187},{"path":190,"title":189,"module":153,"summary":192},{"path":195,"title":194,"module":153,"summary":198},{"path":201,"title":200,"module":153,"summary":204},{"path":211,"title":210,"module":206,"summary":213},{"path":216,"title":215,"module":206,"summary":219},{"path":222,"title":221,"module":206,"summary":224},{"path":227,"title":226,"module":206,"summary":229},{"path":236,"title":235,"module":231,"summary":238},{"path":241,"title":240,"module":231,"summary":244},{"path":247,"title":246,"module":231,"summary":249},{"path":252,"title":251,"module":231,"summary":254},{"path":257,"title":256,"module":231,"summary":259},{"path":262,"title":261,"module":231,"summary":264},{"path":267,"title":266,"module":231,"summary":269},{"path":272,"title":271,"module":231,"summary":274},{"path":277,"title":276,"module":231,"summary":279},{"path":282,"title":281,"module":231,"summary":285},{"path":292,"title":291,"module":287,"summary":295},{"path":298,"title":297,"module":287,"summary":300},{"path":303,"title":302,"module":287,"summary":305},{"path":312,"title":311,"module":307,"summary":315},{"path":318,"title":317,"module":307,"summary":320},{"path":323,"title":322,"module":307,"summary":325},{"path":328,"title":327,"module":307,"summary":330},{"path":338,"title":337,"module":332,"summary":341},{"path":344,"title":343,"module":332,"summary":346},{"path":349,"title":348,"module":332,"summary":351},{"path":359,"title":358,"module":353,"summary":362},{"path":364,"title":361,"module":353,"summary":366},{"path":369,"title":368,"module":353,"summary":373},{"path":11696,"title":11697,"module":376,"summary":376},"\u002Falgorithms","Algorithms",{"path":11699,"title":11700,"module":376,"summary":376},"\u002Ftheory-of-computation","Theory of Computation",{"path":11702,"title":11703,"module":376,"summary":376},"\u002Fcomputer-architecture","Computer Architecture",{"path":11705,"title":11706,"module":376,"summary":376},"\u002Fphysical-computing","Physical Computing",{"path":11708,"title":11709,"module":376,"summary":376},"\u002Fdatabases","Databases",{"path":11711,"title":11712,"module":376,"summary":376},"\u002Fdeep-learning","Deep Learning",1781560523895]