[{"data":1,"prerenderedAt":5408},["ShallowReactive",2],{"nav:algorithms":3,"lesson:\u002Falgorithms\u002Fgreedy\u002Fthe-greedy-method":374,"course-wordcounts":5276,"ref-card-index":5332},[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":210,"blurb":376,"body":377,"description":5232,"extension":5233,"meta":5234,"module":206,"navigation":5236,"path":211,"practice":5237,"rawbody":5258,"readingTime":5259,"seo":5264,"sources":5265,"status":5272,"stem":5273,"summary":213,"topics":5274,"__hash__":5275},"course\u002F01.algorithms\u002F07.greedy\u002F01.the-greedy-method.md","",{"type":378,"value":379,"toc":5219},"minimark",[380,397,419,424,434,466,473,477,773,958,961,1225,1286,1291,1294,1332,1335,1482,1502,1562,1636,1640,1651,1691,2867,2902,3068,3159,3182,3186,3353,3470,3514,3596,3770,4310,4327,4350,4358,4371,4445,4775,4778,4986,5000,5013,5017,5020,5051,5054,5058,5143,5215],[381,382,383,384,388,389,393,394],"p",{},"A ",[385,386,387],"strong",{},"greedy algorithm"," builds up a solution piece by piece, and at every step it\ntakes the option that looks best ",[390,391,392],"em",{},"right now"," (the largest, the smallest, the\ncheapest, the soonest) with no regard for the choices still to come and no\nwillingness to revisit a choice already made. It is the algorithmic embodiment\nof optimism: ",[390,395,396],{},"grab the locally optimal thing and trust that it adds up to a\nglobally optimal whole.",[381,398,399,400,403,404,407,408],{},"Sometimes that optimism is justified, and the result is an algorithm of\nastonishing simplicity and speed. Sometimes it is naive, and the algorithm\nreturns confidently wrong answers. The entire art of the greedy method is\ntelling the two cases apart, and the only way to know you are in the good case\nis to ",[385,401,402],{},"prove it",". Erickson puts the warning bluntly: most greedy algorithms\nare ",[390,405,406],{},"wrong",", and a greedy strategy that has not been proved correct should be\ntreated as a plausible guess, nothing more.",[409,410,411],"sup",{},[412,413,418],"a",{"href":414,"ariaDescribedBy":415,"dataFootnoteRef":376,"id":417},"#user-content-fn-erickson-greedy",[416],"footnote-label","user-content-fnref-erickson-greedy","1",[420,421,423],"h2",{"id":422},"what-makes-greedy-work","What makes greedy work",[381,425,426,429,430,433],{},[412,427,428],{"href":236},"Dynamic programming",", which we meet in a later module, considers ",[390,431,432],{},"all"," the ways a\nproblem decomposes and picks the best. Greedy algorithms are bolder: they commit\nto one choice immediately and recurse on what remains. Two structural properties\nare what license that boldness.",[435,436,437,456],"ul",{},[438,439,440,443,451,452,455],"li",{},[385,441,442],{},"The greedy-choice property.",[409,444,445],{},[412,446,450],{"href":447,"ariaDescribedBy":448,"dataFootnoteRef":376,"id":449},"#user-content-fn-clrs-greedy",[416],"user-content-fnref-clrs-greedy","2"," There exists an optimal solution that contains\nthe greedy (locally optimal) first choice. We never have to look ahead: a\nbest-looking-now choice is ",[390,453,454],{},"safe",", since some optimal solution agrees with it.",[438,457,458,461,462,465],{},[385,459,460],{},"Optimal substructure."," After making the greedy choice, what remains is a\nsmaller instance of the ",[390,463,464],{},"same problem",", and an optimal solution to the whole\nis the greedy choice plus an optimal solution to that subproblem.",[381,467,468,469,472],{},"Optimal substructure is shared with dynamic programming. The greedy-choice\nproperty is the extra gift: it collapses the many subproblems DP would explore\ndown to a ",[390,470,471],{},"single"," one. That is why greedy algorithms, when they work, are so\nmuch faster than their DP cousins. Proving these two properties, not running\nthe code on a few examples, is what separates a correct greedy algorithm from a\nhopeful heuristic.",[420,474,476],{"id":475},"the-canonical-example-activity-selection","The canonical example: activity selection",[381,478,479,480,505,508,509,526,527,597,598,654,655,768,769,772],{},"Here is the problem on which to build all intuition. We are given ",[481,482,485],"span",{"className":483},[484],"katex",[481,486,490],{"className":487,"ariaHidden":489},[488],"katex-html","true",[481,491,494,499],{"className":492},[493],"base",[481,495],{"className":496,"style":498},[497],"strut","height:0.4306em;",[481,500,504],{"className":501},[502,503],"mord","mathnormal","n",[385,506,507],{},"activities"," that all want the same resource: a lecture hall, a tennis court,\na single CPU. Activity ",[481,510,512],{"className":511},[484],[481,513,515],{"className":514,"ariaHidden":489},[488],[481,516,518,522],{"className":517},[493],[481,519],{"className":520,"style":521},[497],"height:0.6595em;",[481,523,525],{"className":524},[502,503],"i"," has a start time ",[481,528,530],{"className":529},[484],[481,531,533],{"className":532,"ariaHidden":489},[488],[481,534,536,540],{"className":535},[493],[481,537],{"className":538,"style":539},[497],"height:0.5806em;vertical-align:-0.15em;",[481,541,543,547],{"className":542},[502],[481,544,546],{"className":545},[502,503],"s",[481,548,551],{"className":549},[550],"msupsub",[481,552,556,588],{"className":553},[554,555],"vlist-t","vlist-t2",[481,557,560,583],{"className":558},[559],"vlist-r",[481,561,565],{"className":562,"style":564},[563],"vlist","height:0.3117em;",[481,566,568,573],{"style":567},"top:-2.55em;margin-left:0em;margin-right:0.05em;",[481,569],{"className":570,"style":572},[571],"pstrut","height:2.7em;",[481,574,580],{"className":575},[576,577,578,579],"sizing","reset-size6","size3","mtight",[481,581,525],{"className":582},[502,503,579],[481,584,587],{"className":585},[586],"vlist-s","​",[481,589,591],{"className":590},[559],[481,592,595],{"className":593,"style":594},[563],"height:0.15em;",[481,596],{}," and a finish time ",[481,599,601],{"className":600},[484],[481,602,604],{"className":603,"ariaHidden":489},[488],[481,605,607,611],{"className":606},[493],[481,608],{"className":609,"style":610},[497],"height:0.8889em;vertical-align:-0.1944em;",[481,612,614,619],{"className":613},[502],[481,615,618],{"className":616,"style":617},[502,503],"margin-right:0.1076em;","f",[481,620,622],{"className":621},[550],[481,623,625,646],{"className":624},[554,555],[481,626,628,643],{"className":627},[559],[481,629,631],{"className":630,"style":564},[563],[481,632,634,637],{"style":633},"top:-2.55em;margin-left:-0.1076em;margin-right:0.05em;",[481,635],{"className":636,"style":572},[571],[481,638,640],{"className":639},[576,577,578,579],[481,641,525],{"className":642},[502,503,579],[481,644,587],{"className":645},[586],[481,647,649],{"className":648},[559],[481,650,652],{"className":651,"style":594},[563],[481,653],{},", and\noccupies the half-open interval ",[481,656,658],{"className":657},[484],[481,659,661],{"className":660,"ariaHidden":489},[488],[481,662,664,668,673,713,718,723,763],{"className":663},[493],[481,665],{"className":666,"style":667},[497],"height:1em;vertical-align:-0.25em;",[481,669,672],{"className":670},[671],"mopen","[",[481,674,676,679],{"className":675},[502],[481,677,546],{"className":678},[502,503],[481,680,682],{"className":681},[550],[481,683,685,705],{"className":684},[554,555],[481,686,688,702],{"className":687},[559],[481,689,691],{"className":690,"style":564},[563],[481,692,693,696],{"style":567},[481,694],{"className":695,"style":572},[571],[481,697,699],{"className":698},[576,577,578,579],[481,700,525],{"className":701},[502,503,579],[481,703,587],{"className":704},[586],[481,706,708],{"className":707},[559],[481,709,711],{"className":710,"style":594},[563],[481,712],{},[481,714,717],{"className":715},[716],"mpunct",",",[481,719],{"className":720,"style":722},[721],"mspace","margin-right:0.1667em;",[481,724,726,729],{"className":725},[502],[481,727,618],{"className":728,"style":617},[502,503],[481,730,732],{"className":731},[550],[481,733,735,755],{"className":734},[554,555],[481,736,738,752],{"className":737},[559],[481,739,741],{"className":740,"style":564},[563],[481,742,743,746],{"style":633},[481,744],{"className":745,"style":572},[571],[481,747,749],{"className":748},[576,577,578,579],[481,750,525],{"className":751},[502,503,579],[481,753,587],{"className":754},[586],[481,756,758],{"className":757},[559],[481,759,761],{"className":760,"style":594},[563],[481,762],{},[481,764,767],{"className":765},[766],"mclose",")",". Two activities are ",[385,770,771],{},"compatible","\nif their intervals do not overlap. We want to select a largest possible set of\nmutually compatible activities.",[774,775,777],"callout",{"type":776},"problem",[381,778,779,782,783,822,823,934,935,938,939,957],{},[385,780,781],{},"Input:"," activities ",[481,784,786],{"className":785},[484],[481,787,789],{"className":788,"ariaHidden":489},[488],[481,790,792,796,799,802,805,810,813,816,819],{"className":791},[493],[481,793],{"className":794,"style":795},[497],"height:0.8389em;vertical-align:-0.1944em;",[481,797,418],{"className":798},[502],[481,800,717],{"className":801},[716],[481,803],{"className":804,"style":722},[721],[481,806,809],{"className":807},[808],"minner","…",[481,811],{"className":812,"style":722},[721],[481,814,717],{"className":815},[716],[481,817],{"className":818,"style":722},[721],[481,820,504],{"className":821},[502,503]," with start\u002Ffinish times ",[481,824,826],{"className":825},[484],[481,827,829,888],{"className":828,"ariaHidden":489},[488],[481,830,832,836,876,880,885],{"className":831},[493],[481,833],{"className":834,"style":835},[497],"height:0.6891em;vertical-align:-0.15em;",[481,837,839,842],{"className":838},[502],[481,840,546],{"className":841},[502,503],[481,843,845],{"className":844},[550],[481,846,848,868],{"className":847},[554,555],[481,849,851,865],{"className":850},[559],[481,852,854],{"className":853,"style":564},[563],[481,855,856,859],{"style":567},[481,857],{"className":858,"style":572},[571],[481,860,862],{"className":861},[576,577,578,579],[481,863,525],{"className":864},[502,503,579],[481,866,587],{"className":867},[586],[481,869,871],{"className":870},[559],[481,872,874],{"className":873,"style":594},[563],[481,875],{},[481,877],{"className":878,"style":879},[721],"margin-right:0.2778em;",[481,881,884],{"className":882},[883],"mrel","\u003C",[481,886],{"className":887,"style":879},[721],[481,889,891,894],{"className":890},[493],[481,892],{"className":893,"style":610},[497],[481,895,897,900],{"className":896},[502],[481,898,618],{"className":899,"style":617},[502,503],[481,901,903],{"className":902},[550],[481,904,906,926],{"className":905},[554,555],[481,907,909,923],{"className":908},[559],[481,910,912],{"className":911,"style":564},[563],[481,913,914,917],{"style":633},[481,915],{"className":916,"style":572},[571],[481,918,920],{"className":919},[576,577,578,579],[481,921,525],{"className":922},[502,503,579],[481,924,587],{"className":925},[586],[481,927,929],{"className":928},[559],[481,930,932],{"className":931,"style":594},[563],[481,933],{},".\n",[385,936,937],{},"Output:"," a maximum-size set ",[481,940,942],{"className":941},[484],[481,943,945],{"className":944,"ariaHidden":489},[488],[481,946,948,952],{"className":947},[493],[481,949],{"className":950,"style":951},[497],"height:0.6833em;",[481,953,956],{"className":954,"style":955},[502,503],"margin-right:0.0576em;","S"," of pairwise compatible activities.",[381,959,960],{},"Drawn on a number line, an instance and one optimal schedule look like this. The\nshaded bars are the chosen activities; they tile the timeline without overlap.",[962,963,967,1219],"figure",{"className":964},[965,966],"tikz-figure","tikz-diagram-rendered",[968,969,974],"svg",{"xmlns":970,"width":971,"height":972,"viewBox":973},"http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg","373.222","168.470","-75 -75 279.917 126.352",[975,976,979,1000,1003,1011,1014,1021,1024,1031,1034,1041,1044,1051,1054,1061,1064,1071,1074,1081,1084,1091,1094,1101,1104,1111,1114,1121,1124,1131,1146,1159,1171,1183,1195,1207],"g",{"stroke":977,"style":978},"currentColor","stroke-miterlimit:10;stroke-width:.4",[975,980,982,987,991],{"style":981},"stroke-width:.8",[983,984],"path",{"fill":985,"d":986},"none","M-54.191 34.23h228.527",[983,988],{"fill":985,"d":989,"style":990},"M172.176 31.108c.468 1.873 1.51 2.758 2.56 3.122-1.05.365-2.092 1.25-2.56 3.123","stroke-linecap:round;stroke-linejoin:round",[975,992,994],{"transform":993},"translate(233.06 13.924)",[983,995],{"d":996,"fill":977,"stroke":977,"className":997,"style":999},"M-53.170 22.445L-53.170 19.686L-54.001 19.686L-54.001 19.427Q-53.346 19.427-53.039 18.817Q-52.731 18.207-52.731 17.494L-52.443 17.494L-52.443 19.334L-51.032 19.334L-51.032 19.686L-52.443 19.686L-52.443 22.425Q-52.443 22.840-52.304 23.153Q-52.165 23.465-51.803 23.465Q-51.462 23.465-51.310 23.136Q-51.159 22.806-51.159 22.425L-51.159 21.834L-50.871 21.834L-50.871 22.445Q-50.871 22.757-50.985 23.063Q-51.100 23.368-51.325 23.563Q-51.549 23.758-51.872 23.758Q-52.472 23.758-52.821 23.399Q-53.170 23.041-53.170 22.445M-47.819 23.646L-50.002 23.646L-50.002 23.294Q-49.660 23.294-49.440 23.241Q-49.220 23.187-49.220 22.977L-49.220 20.248Q-49.220 19.862-49.369 19.774Q-49.518 19.686-49.958 19.686L-49.958 19.334L-48.517 19.227L-48.517 22.977Q-48.517 23.187-48.327 23.241Q-48.136 23.294-47.819 23.294L-47.819 23.646M-49.577 17.508Q-49.577 17.289-49.411 17.123Q-49.245 16.957-49.030 16.957Q-48.888 16.957-48.756 17.030Q-48.625 17.103-48.551 17.235Q-48.478 17.367-48.478 17.508Q-48.478 17.723-48.644 17.889Q-48.810 18.055-49.030 18.055Q-49.245 18.055-49.411 17.889Q-49.577 17.723-49.577 17.508M-44.953 23.646L-47.243 23.646L-47.243 23.294Q-46.901 23.294-46.681 23.241Q-46.462 23.187-46.462 22.977L-46.462 20.248Q-46.462 19.979-46.542 19.859Q-46.623 19.740-46.774 19.713Q-46.925 19.686-47.243 19.686L-47.243 19.334L-45.793 19.227L-45.793 20.204Q-45.592 19.774-45.199 19.500Q-44.806 19.227-44.342 19.227Q-43.190 19.227-42.990 20.165Q-42.790 19.745-42.404 19.486Q-42.018 19.227-41.559 19.227Q-41.105 19.227-40.795 19.374Q-40.485 19.520-40.329 19.820Q-40.172 20.121-40.172 20.575L-40.172 22.977Q-40.172 23.187-39.950 23.241Q-39.728 23.294-39.391 23.294L-39.391 23.646L-41.681 23.646L-41.681 23.294Q-41.339 23.294-41.120 23.241Q-40.900 23.187-40.900 22.977L-40.900 20.604Q-40.900 20.101-41.042 19.793Q-41.183 19.486-41.623 19.486Q-42.199 19.486-42.575 19.950Q-42.951 20.414-42.951 21.004L-42.951 22.977Q-42.951 23.187-42.731 23.241Q-42.511 23.294-42.170 23.294L-42.170 23.646L-44.460 23.646L-44.460 23.294Q-44.118 23.294-43.898 23.241Q-43.678 23.187-43.678 22.977L-43.678 20.604Q-43.678 20.116-43.820 19.801Q-43.962 19.486-44.401 19.486Q-44.982 19.486-45.356 19.950Q-45.729 20.414-45.729 21.004L-45.729 22.977Q-45.729 23.187-45.509 23.241Q-45.290 23.294-44.953 23.294L-44.953 23.646M-36.720 23.758Q-37.331 23.758-37.841 23.438Q-38.351 23.119-38.642 22.584Q-38.932 22.049-38.932 21.454Q-38.932 20.868-38.666 20.340Q-38.400 19.813-37.924 19.488Q-37.448 19.164-36.862 19.164Q-36.403 19.164-36.064 19.317Q-35.724 19.471-35.504 19.745Q-35.285 20.018-35.172 20.389Q-35.060 20.760-35.060 21.205Q-35.060 21.336-35.163 21.336L-38.058 21.336L-38.058 21.444Q-38.058 22.274-37.724 22.870Q-37.389 23.465-36.632 23.465Q-36.325 23.465-36.064 23.329Q-35.802 23.192-35.609 22.948Q-35.417 22.704-35.348 22.425Q-35.338 22.391-35.312 22.364Q-35.285 22.337-35.251 22.337L-35.163 22.337Q-35.060 22.337-35.060 22.464Q-35.202 23.031-35.670 23.395Q-36.139 23.758-36.720 23.758M-38.048 21.087L-35.768 21.087Q-35.768 20.711-35.873 20.326Q-35.978 19.940-36.222 19.684Q-36.466 19.427-36.862 19.427Q-37.428 19.427-37.738 19.957Q-38.048 20.487-38.048 21.087",[998],"tikz-text","stroke-width:0.300",[983,1001],{"fill":985,"d":1002},"M-54.191 32.466v3.528",[975,1004,1006],{"transform":1005},"translate(-1.701 21.104)",[983,1007],{"d":1008,"fill":977,"stroke":977,"className":1009,"style":1010},"M-52.492 23.756Q-53.210 23.756-53.507 23.282Q-53.805 22.809-53.805 22.052Q-53.805 21.288-53.509 20.802Q-53.212 20.316-52.492 20.316Q-51.769 20.316-51.472 20.802Q-51.176 21.288-51.176 22.052Q-51.176 22.406-51.238 22.706Q-51.300 23.006-51.451 23.246Q-51.601 23.485-51.858 23.620Q-52.116 23.756-52.492 23.756M-52.492 23.570Q-52.128 23.570-51.952 23.320Q-51.776 23.070-51.736 22.744Q-51.696 22.418-51.696 21.971Q-51.696 21.539-51.736 21.242Q-51.776 20.946-51.951 20.724Q-52.126 20.501-52.492 20.501Q-52.856 20.501-53.030 20.724Q-53.205 20.946-53.245 21.242Q-53.285 21.539-53.285 21.971Q-53.285 22.418-53.245 22.744Q-53.205 23.070-53.029 23.320Q-52.853 23.570-52.492 23.570",[998],"stroke-width:0.150",[983,1012],{"fill":985,"d":1013},"M-36.55 32.466v3.528",[975,1015,1017],{"transform":1016},"translate(15.94 21.104)",[983,1018],{"d":1019,"fill":977,"stroke":977,"className":1020,"style":1010},"M-51.410 23.646L-53.451 23.646L-53.451 23.407Q-52.670 23.407-52.670 23.287L-52.670 20.741Q-52.848 20.816-53.052 20.846Q-53.256 20.875-53.485 20.875L-53.485 20.636Q-53.149 20.636-52.865 20.567Q-52.582 20.499-52.372 20.316L-52.267 20.316Q-52.240 20.316-52.216 20.340Q-52.191 20.365-52.191 20.392L-52.191 23.287Q-52.191 23.407-51.410 23.407",[998],[983,1022],{"fill":985,"d":1023},"M-18.91 32.466v3.528",[975,1025,1027],{"transform":1026},"translate(33.58 21.104)",[983,1028],{"d":1029,"fill":977,"stroke":977,"className":1030,"style":1010},"M-51.410 23.646L-53.737 23.646L-53.737 23.465Q-53.734 23.453-53.715 23.426L-52.675 22.550Q-52.367 22.291-52.213 22.147Q-52.060 22.003-51.930 21.786Q-51.801 21.568-51.801 21.327Q-51.801 21.085-51.928 20.909Q-52.055 20.733-52.259 20.644Q-52.462 20.555-52.702 20.555Q-52.909 20.555-53.105 20.643Q-53.300 20.731-53.405 20.897Q-53.285 20.897-53.208 20.989Q-53.131 21.080-53.131 21.195Q-53.131 21.322-53.218 21.411Q-53.305 21.500-53.432 21.500Q-53.561 21.500-53.649 21.410Q-53.737 21.319-53.737 21.195Q-53.737 20.914-53.564 20.715Q-53.390 20.516-53.119 20.416Q-52.848 20.316-52.575 20.316Q-52.250 20.316-51.945 20.423Q-51.640 20.531-51.443 20.758Q-51.247 20.985-51.247 21.322Q-51.247 21.559-51.360 21.751Q-51.474 21.944-51.634 22.082Q-51.794 22.220-52.076 22.408Q-52.358 22.596-52.436 22.655L-53.102 23.146L-52.646 23.146Q-52.213 23.146-51.919 23.139Q-51.625 23.133-51.610 23.121Q-51.532 23.023-51.476 22.662L-51.247 22.662",[998],[983,1032],{"fill":985,"d":1033},"M-1.27 32.466v3.528",[975,1035,1037],{"transform":1036},"translate(51.22 21.104)",[983,1038],{"d":1039,"fill":977,"stroke":977,"className":1040,"style":1010},"M-53.405 23.307Q-53.151 23.531-52.516 23.531Q-52.294 23.531-52.129 23.432Q-51.964 23.334-51.880 23.158Q-51.796 22.982-51.796 22.767Q-51.796 22.545-51.883 22.373Q-51.969 22.201-52.135 22.101Q-52.301 22-52.521 22L-52.946 22Q-53 21.988-53.012 21.937L-53.012 21.876Q-53 21.832-52.946 21.815L-52.587 21.791Q-52.401 21.791-52.245 21.679Q-52.089 21.568-52.002 21.389Q-51.916 21.209-51.916 21.031Q-51.916 20.873-51.996 20.757Q-52.077 20.641-52.211 20.583Q-52.345 20.526-52.511 20.526Q-53.026 20.526-53.261 20.755Q-53.153 20.777-53.087 20.857Q-53.022 20.936-53.022 21.046Q-53.022 21.170-53.107 21.256Q-53.192 21.341-53.322 21.341Q-53.444 21.341-53.529 21.256Q-53.615 21.170-53.615 21.046Q-53.615 20.790-53.443 20.625Q-53.271 20.460-53.017 20.388Q-52.763 20.316-52.511 20.316Q-52.279 20.316-52.010 20.392Q-51.740 20.467-51.553 20.628Q-51.366 20.790-51.366 21.031Q-51.366 21.349-51.585 21.572Q-51.803 21.795-52.130 21.896Q-51.960 21.930-51.797 22.002Q-51.635 22.074-51.496 22.185Q-51.357 22.296-51.274 22.442Q-51.191 22.589-51.191 22.767Q-51.191 23.004-51.309 23.189Q-51.427 23.375-51.630 23.503Q-51.833 23.631-52.065 23.694Q-52.296 23.756-52.511 23.756Q-52.802 23.756-53.092 23.691Q-53.383 23.626-53.587 23.457Q-53.791 23.287-53.791 22.997Q-53.791 22.862-53.700 22.772Q-53.610 22.682-53.471 22.682Q-53.383 22.682-53.311 22.723Q-53.239 22.765-53.197 22.837Q-53.156 22.909-53.156 22.997Q-53.156 23.114-53.224 23.198Q-53.293 23.282-53.405 23.307",[998],[983,1042],{"fill":985,"d":1043},"M16.371 32.466v3.528",[975,1045,1047],{"transform":1046},"translate(68.86 21.104)",[983,1048],{"d":1049,"fill":977,"stroke":977,"className":1050,"style":1010},"M-52.221 22.831L-53.876 22.831L-53.876 22.591L-52.011 20.350Q-51.984 20.316-51.930 20.316L-51.801 20.316Q-51.772 20.316-51.746 20.339Q-51.720 20.362-51.720 20.396L-51.720 22.591L-51.105 22.591L-51.105 22.831L-51.720 22.831L-51.720 23.287Q-51.720 23.407-51.110 23.407L-51.110 23.646L-52.831 23.646L-52.831 23.407Q-52.221 23.407-52.221 23.287L-52.221 22.831M-52.182 20.870L-53.610 22.591L-52.182 22.591",[998],[983,1052],{"fill":985,"d":1053},"M34.012 32.466v3.528",[975,1055,1057],{"transform":1056},"translate(86.501 21.104)",[983,1058],{"d":1059,"fill":977,"stroke":977,"className":1060,"style":1010},"M-53.427 23.136Q-53.322 23.326-53.087 23.429Q-52.853 23.531-52.611 23.531Q-52.199 23.531-51.997 23.294Q-51.796 23.058-51.796 22.640Q-51.796 22.406-51.847 22.202Q-51.899 21.998-52.038 21.865Q-52.177 21.732-52.421 21.732Q-52.978 21.732-53.246 22.096Q-53.275 22.125-53.307 22.125L-53.366 22.125Q-53.393 22.125-53.417 22.101Q-53.441 22.076-53.441 22.052L-53.441 20.377Q-53.424 20.316-53.371 20.316Q-53.366 20.316-53.346 20.321Q-52.899 20.477-52.465 20.477Q-52.028 20.477-51.581 20.321Q-51.562 20.316-51.557 20.316Q-51.503 20.316-51.486 20.377L-51.486 20.436Q-51.488 20.458-51.501 20.477Q-51.735 20.716-52.036 20.843Q-52.338 20.970-52.670 20.970Q-52.961 20.970-53.200 20.917L-53.200 21.791Q-52.909 21.546-52.421 21.546Q-52.196 21.546-51.979 21.629Q-51.762 21.712-51.601 21.856Q-51.440 22-51.343 22.202Q-51.247 22.403-51.247 22.640Q-51.247 22.892-51.366 23.104Q-51.486 23.316-51.686 23.460Q-51.886 23.604-52.129 23.680Q-52.372 23.756-52.611 23.756Q-52.890 23.756-53.149 23.648Q-53.407 23.541-53.572 23.332Q-53.737 23.124-53.737 22.845Q-53.737 22.723-53.651 22.640Q-53.566 22.557-53.446 22.557Q-53.324 22.557-53.240 22.639Q-53.156 22.721-53.156 22.845Q-53.156 22.960-53.234 23.048Q-53.312 23.136-53.427 23.136",[998],[983,1062],{"fill":985,"d":1063},"M51.652 32.466v3.528",[975,1065,1067],{"transform":1066},"translate(104.142 21.104)",[983,1068],{"d":1069,"fill":977,"stroke":977,"className":1070,"style":1010},"M-52.492 23.756Q-52.956 23.756-53.247 23.511Q-53.539 23.265-53.665 22.877Q-53.791 22.489-53.791 22.030Q-53.791 21.581-53.573 21.186Q-53.356 20.792-52.978 20.554Q-52.599 20.316-52.145 20.316Q-51.813 20.316-51.580 20.456Q-51.347 20.597-51.347 20.912Q-51.347 21.024-51.425 21.104Q-51.503 21.185-51.620 21.185Q-51.735 21.185-51.816 21.104Q-51.896 21.024-51.896 20.912Q-51.896 20.814-51.842 20.741Q-51.789 20.667-51.696 20.646Q-51.833 20.526-52.140 20.526Q-52.318 20.526-52.481 20.582Q-52.643 20.638-52.781 20.746Q-52.919 20.853-53.017 20.992Q-53.100 21.126-53.151 21.290Q-53.202 21.454-53.222 21.623Q-53.241 21.793-53.241 21.976Q-53.107 21.754-52.891 21.625Q-52.675 21.495-52.421 21.495Q-52.174 21.495-51.956 21.574Q-51.737 21.654-51.563 21.803Q-51.388 21.952-51.289 22.160Q-51.191 22.369-51.191 22.616Q-51.191 22.953-51.374 23.214Q-51.557 23.475-51.859 23.615Q-52.162 23.756-52.492 23.756M-52.492 23.531Q-52.101 23.531-51.891 23.280Q-51.789 23.153-51.764 23.004Q-51.740 22.855-51.740 22.625L-51.740 22.611Q-51.740 22.379-51.763 22.223Q-51.786 22.066-51.877 21.947Q-52.091 21.681-52.455 21.681Q-52.672 21.681-52.848 21.797Q-53.024 21.913-53.125 22.105Q-53.227 22.298-53.227 22.511Q-53.227 22.577-53.222 22.611Q-53.222 22.628-53.224 22.628Q-53.227 22.628-53.227 22.645Q-53.227 22.887-53.146 23.088Q-53.066 23.290-52.902 23.410Q-52.738 23.531-52.492 23.531",[998],[983,1072],{"fill":985,"d":1073},"M69.293 32.466v3.528",[975,1075,1077],{"transform":1076},"translate(121.783 21.104)",[983,1078],{"d":1079,"fill":977,"stroke":977,"className":1080,"style":1010},"M-52.936 23.480Q-52.936 22.923-52.704 22.400Q-52.472 21.876-52.072 21.441L-51.601 20.926L-52.206 20.926Q-52.436 20.926-52.690 20.927Q-52.943 20.929-53.131 20.934Q-53.319 20.938-53.337 20.951Q-53.422 21.051-53.476 21.412L-53.705 21.412L-53.517 20.267L-53.285 20.267L-53.285 20.282Q-53.285 20.335-53.222 20.366Q-53.158 20.396-53.095 20.396Q-52.819 20.409-52.547 20.417Q-52.274 20.426-52.162 20.426L-51.017 20.426L-51.017 20.592Q-51.017 20.611-51.037 20.641L-51.877 21.556Q-52.096 21.798-52.209 22.112Q-52.321 22.425-52.354 22.756Q-52.387 23.087-52.387 23.485Q-52.387 23.600-52.467 23.678Q-52.548 23.756-52.660 23.756Q-52.775 23.756-52.856 23.675Q-52.936 23.595-52.936 23.480",[998],[983,1082],{"fill":985,"d":1083},"M86.933 32.466v3.528",[975,1085,1087],{"transform":1086},"translate(139.423 21.104)",[983,1088],{"d":1089,"fill":977,"stroke":977,"className":1090,"style":1010},"M-53.791 22.872Q-53.791 22.540-53.561 22.319Q-53.332 22.098-52.980 21.966Q-53.173 21.866-53.307 21.765Q-53.441 21.664-53.528 21.515Q-53.615 21.366-53.615 21.175Q-53.615 20.965-53.516 20.803Q-53.417 20.641-53.249 20.531Q-53.080 20.421-52.884 20.368Q-52.687 20.316-52.492 20.316Q-52.304 20.316-52.105 20.357Q-51.906 20.399-51.740 20.489Q-51.574 20.580-51.470 20.729Q-51.366 20.877-51.366 21.080Q-51.366 21.346-51.552 21.532Q-51.737 21.717-52.025 21.837L-51.757 21.976Q-51.513 22.096-51.352 22.311Q-51.191 22.525-51.191 22.782Q-51.191 23.097-51.388 23.318Q-51.586 23.539-51.888 23.647Q-52.189 23.756-52.492 23.756Q-52.792 23.756-53.091 23.664Q-53.390 23.573-53.590 23.375Q-53.791 23.177-53.791 22.872M-53.427 22.872Q-53.427 23.192-53.130 23.362Q-52.834 23.531-52.492 23.531Q-52.292 23.531-52.074 23.478Q-51.857 23.424-51.707 23.296Q-51.557 23.167-51.557 22.960Q-51.557 22.826-51.652 22.711Q-51.747 22.596-51.886 22.525L-52.746 22.086Q-53.034 22.201-53.230 22.400Q-53.427 22.599-53.427 22.872M-53.022 21.327L-52.250 21.722Q-52.096 21.649-51.975 21.561Q-51.855 21.473-51.775 21.354Q-51.696 21.234-51.696 21.080Q-51.696 20.899-51.820 20.772Q-51.945 20.646-52.127 20.586Q-52.309 20.526-52.492 20.526Q-52.663 20.526-52.842 20.566Q-53.022 20.606-53.153 20.709Q-53.285 20.812-53.285 20.985Q-53.285 21.183-53.022 21.327",[998],[983,1092],{"fill":985,"d":1093},"M104.574 32.466v3.528",[975,1095,1097],{"transform":1096},"translate(157.064 21.104)",[983,1098],{"d":1099,"fill":977,"stroke":977,"className":1100,"style":1010},"M-53.275 23.421Q-53.168 23.490-53.042 23.511Q-52.917 23.531-52.751 23.531Q-52.497 23.531-52.287 23.407Q-52.077 23.282-51.935 23.060Q-51.818 22.865-51.779 22.622Q-51.740 22.379-51.740 22.086Q-51.877 22.311-52.094 22.439Q-52.311 22.567-52.560 22.567Q-52.795 22.567-53.020 22.486Q-53.246 22.406-53.421 22.254Q-53.595 22.103-53.693 21.898Q-53.791 21.693-53.791 21.446Q-53.791 21.185-53.677 20.973Q-53.564 20.760-53.371 20.613Q-53.178 20.465-52.945 20.390Q-52.712 20.316-52.455 20.316Q-52.106 20.316-51.861 20.460Q-51.615 20.604-51.466 20.852Q-51.317 21.100-51.254 21.396Q-51.191 21.693-51.191 22.030Q-51.191 22.464-51.391 22.866Q-51.591 23.268-51.946 23.512Q-52.301 23.756-52.751 23.756Q-52.975 23.756-53.175 23.705Q-53.376 23.653-53.506 23.521Q-53.637 23.390-53.637 23.160Q-53.637 23.043-53.556 22.965Q-53.476 22.887-53.361 22.887Q-53.244 22.887-53.164 22.964Q-53.085 23.041-53.085 23.160Q-53.085 23.253-53.138 23.326Q-53.190 23.399-53.275 23.421M-53.107 22.120Q-52.992 22.259-52.852 22.320Q-52.712 22.381-52.526 22.381Q-52.309 22.381-52.133 22.265Q-51.957 22.149-51.857 21.958Q-51.757 21.766-51.757 21.546Q-51.757 21.485-51.762 21.456Q-51.759 21.449-51.758 21.441Q-51.757 21.434-51.757 21.422Q-51.757 21.190-51.830 20.984Q-51.903 20.777-52.062 20.652Q-52.221 20.526-52.455 20.526Q-52.658 20.526-52.807 20.582Q-52.956 20.638-53.080 20.780Q-53.185 20.899-53.213 21.053Q-53.241 21.207-53.241 21.441L-53.241 21.456Q-53.241 21.688-53.218 21.842Q-53.195 21.996-53.107 22.120",[998],[983,1102],{"fill":985,"d":1103},"M122.214 32.466v3.528",[975,1105,1107],{"transform":1106},"translate(173.003 21.104)",[983,1108],{"d":1109,"fill":977,"stroke":977,"className":1110,"style":1010},"M-51.410 23.646L-53.451 23.646L-53.451 23.407Q-52.670 23.407-52.670 23.287L-52.670 20.741Q-52.848 20.816-53.052 20.846Q-53.256 20.875-53.485 20.875L-53.485 20.636Q-53.149 20.636-52.865 20.567Q-52.582 20.499-52.372 20.316L-52.267 20.316Q-52.240 20.316-52.216 20.340Q-52.191 20.365-52.191 20.392L-52.191 23.287Q-52.191 23.407-51.410 23.407L-51.410 23.646M-49.091 23.756Q-49.809 23.756-50.107 23.282Q-50.404 22.809-50.404 22.052Q-50.404 21.288-50.108 20.802Q-49.811 20.316-49.091 20.316Q-48.368 20.316-48.072 20.802Q-47.775 21.288-47.775 22.052Q-47.775 22.406-47.837 22.706Q-47.899 23.006-48.050 23.246Q-48.200 23.485-48.457 23.620Q-48.715 23.756-49.091 23.756M-49.091 23.570Q-48.727 23.570-48.551 23.320Q-48.376 23.070-48.335 22.744Q-48.295 22.418-48.295 21.971Q-48.295 21.539-48.335 21.242Q-48.376 20.946-48.550 20.724Q-48.725 20.501-49.091 20.501Q-49.455 20.501-49.629 20.724Q-49.804 20.946-49.844 21.242Q-49.884 21.539-49.884 21.971Q-49.884 22.418-49.844 22.744Q-49.804 23.070-49.628 23.320Q-49.452 23.570-49.091 23.570",[998],[983,1112],{"fill":985,"d":1113},"M139.855 32.466v3.528",[975,1115,1117],{"transform":1116},"translate(190.643 21.104)",[983,1118],{"d":1119,"fill":977,"stroke":977,"className":1120,"style":1010},"M-51.410 23.646L-53.451 23.646L-53.451 23.407Q-52.670 23.407-52.670 23.287L-52.670 20.741Q-52.848 20.816-53.052 20.846Q-53.256 20.875-53.485 20.875L-53.485 20.636Q-53.149 20.636-52.865 20.567Q-52.582 20.499-52.372 20.316L-52.267 20.316Q-52.240 20.316-52.216 20.340Q-52.191 20.365-52.191 20.392L-52.191 23.287Q-52.191 23.407-51.410 23.407L-51.410 23.646M-48.009 23.646L-50.050 23.646L-50.050 23.407Q-49.269 23.407-49.269 23.287L-49.269 20.741Q-49.447 20.816-49.651 20.846Q-49.855 20.875-50.085 20.875L-50.085 20.636Q-49.748 20.636-49.464 20.567Q-49.181 20.499-48.971 20.316L-48.866 20.316Q-48.839 20.316-48.815 20.340Q-48.791 20.365-48.791 20.392L-48.791 23.287Q-48.791 23.407-48.009 23.407",[998],[983,1122],{"fill":985,"d":1123},"M157.496 32.466v3.528",[975,1125,1127],{"transform":1126},"translate(208.284 21.104)",[983,1128],{"d":1129,"fill":977,"stroke":977,"className":1130,"style":1010},"M-51.410 23.646L-53.451 23.646L-53.451 23.407Q-52.670 23.407-52.670 23.287L-52.670 20.741Q-52.848 20.816-53.052 20.846Q-53.256 20.875-53.485 20.875L-53.485 20.636Q-53.149 20.636-52.865 20.567Q-52.582 20.499-52.372 20.316L-52.267 20.316Q-52.240 20.316-52.216 20.340Q-52.191 20.365-52.191 20.392L-52.191 23.287Q-52.191 23.407-51.410 23.407L-51.410 23.646M-48.009 23.646L-50.336 23.646L-50.336 23.465Q-50.334 23.453-50.314 23.426L-49.274 22.550Q-48.966 22.291-48.813 22.147Q-48.659 22.003-48.529 21.786Q-48.400 21.568-48.400 21.327Q-48.400 21.085-48.527 20.909Q-48.654 20.733-48.858 20.644Q-49.062 20.555-49.301 20.555Q-49.508 20.555-49.704 20.643Q-49.899 20.731-50.004 20.897Q-49.884 20.897-49.807 20.989Q-49.731 21.080-49.731 21.195Q-49.731 21.322-49.817 21.411Q-49.904 21.500-50.031 21.500Q-50.160 21.500-50.248 21.410Q-50.336 21.319-50.336 21.195Q-50.336 20.914-50.163 20.715Q-49.989 20.516-49.718 20.416Q-49.447 20.316-49.174 20.316Q-48.849 20.316-48.544 20.423Q-48.239 20.531-48.042 20.758Q-47.846 20.985-47.846 21.322Q-47.846 21.559-47.959 21.751Q-48.073 21.944-48.233 22.082Q-48.393 22.220-48.675 22.408Q-48.957 22.596-49.035 22.655L-49.701 23.146L-49.245 23.146Q-48.813 23.146-48.518 23.139Q-48.224 23.133-48.210 23.121Q-48.131 23.023-48.075 22.662L-47.846 22.662",[998],[975,1132,1136,1139],{"fill":1133,"stroke":1134,"style":1135},"var(--tk-soft-accent)","var(--tk-accent)","stroke-width:1.2",[983,1137],{"d":1138},"M-12.098-71.67h-48.905a4 4 0 0 0-4 4v6.226a4 4 0 0 0 4 4h48.905a4 4 0 0 0 4-4v-6.226a4 4 0 0 0-4-4Zm-52.905 14.226",[975,1140,1142],{"transform":1141},"translate(14.998 -86.05)",[983,1143],{"d":1144,"fill":977,"stroke":977,"className":1145,"style":999},"M-52.453 23.758Q-53.083 23.758-53.446 23.282Q-53.810 22.806-53.810 22.157Q-53.810 21.517-53.478 20.829Q-53.146 20.140-52.582 19.684Q-52.018 19.227-51.369 19.227Q-51.071 19.227-50.837 19.388Q-50.602 19.549-50.470 19.828Q-50.358 19.427-50.031 19.427Q-49.904 19.427-49.818 19.503Q-49.733 19.579-49.733 19.706Q-49.733 19.735-49.735 19.750Q-49.738 19.764-49.743 19.784L-50.441 22.577Q-50.509 22.875-50.509 23.065Q-50.509 23.495-50.221 23.495Q-49.909 23.495-49.745 23.097Q-49.582 22.699-49.469 22.176Q-49.450 22.118-49.391 22.118L-49.269 22.118Q-49.230 22.118-49.206 22.152Q-49.181 22.186-49.181 22.215Q-49.357 22.914-49.565 23.336Q-49.772 23.758-50.241 23.758Q-50.578 23.758-50.837 23.561Q-51.095 23.363-51.159 23.036Q-51.803 23.758-52.453 23.758M-52.443 23.495Q-52.082 23.495-51.742 23.224Q-51.403 22.953-51.159 22.586Q-51.149 22.577-51.149 22.557L-50.612 20.384L-50.602 20.355Q-50.661 19.999-50.858 19.742Q-51.056 19.486-51.393 19.486Q-51.730 19.486-52.021 19.762Q-52.311 20.038-52.511 20.414Q-52.707 20.814-52.885 21.512Q-53.063 22.210-53.063 22.596Q-53.063 22.943-52.914 23.219Q-52.765 23.495-52.443 23.495",[998],[975,1147,1149,1152],{"fill":1148,"style":981},"var(--tk-soft-neutral)",[983,1150],{"d":1151},"M28.59-54.03H-48.77a4 4 0 0 0-4 4v6.227a4 4 0 0 0 4 4H28.59a4 4 0 0 0 4-4v-6.226a4 4 0 0 0-4-4ZM-52.77-39.802",[975,1153,1155],{"transform":1154},"translate(41.956 -67.09)",[983,1156],{"d":1157,"fill":977,"stroke":977,"className":1158,"style":999},"M-52.462 23.758Q-53.068 23.758-53.405 23.285Q-53.742 22.811-53.742 22.176Q-53.742 22.084-53.695 21.813Q-53.649 21.542-53.649 21.478L-52.682 17.596Q-52.643 17.425-52.633 17.328Q-52.633 17.167-53.283 17.167Q-53.380 17.167-53.380 17.035Q-53.376 17.010-53.358 16.947Q-53.341 16.883-53.315 16.849Q-53.288 16.815-53.239 16.815L-51.891 16.708Q-51.769 16.708-51.769 16.834L-52.511 19.784Q-51.945 19.227-51.369 19.227Q-50.944 19.227-50.639 19.452Q-50.334 19.676-50.182 20.042Q-50.031 20.409-50.031 20.824Q-50.031 21.307-50.219 21.822Q-50.407 22.337-50.739 22.779Q-51.071 23.221-51.515 23.490Q-51.960 23.758-52.462 23.758M-52.443 23.495Q-52.101 23.495-51.803 23.209Q-51.505 22.923-51.320 22.567Q-51.120 22.167-50.946 21.480Q-50.773 20.794-50.773 20.384Q-50.773 20.028-50.922 19.757Q-51.071 19.486-51.393 19.486Q-51.754 19.486-52.084 19.752Q-52.414 20.018-52.663 20.384L-52.941 21.517Q-53.102 22.147-53.112 22.528Q-53.112 22.904-52.948 23.199Q-52.785 23.495-52.443 23.495",[998],[975,1160,1161,1164],{"fill":1133,"stroke":1134,"style":1135},[983,1162],{"d":1163},"M40.824-36.389H-8.082a4 4 0 0 0-4 4v6.226a4 4 0 0 0 4 4h48.906a4 4 0 0 0 4-4v-6.226a4 4 0 0 0-4-4Zm-52.906 14.226",[975,1165,1167],{"transform":1166},"translate(68.398 -50.769)",[983,1168],{"d":1169,"fill":977,"stroke":977,"className":1170,"style":999},"M-53.019 22.455Q-53.019 22.889-52.797 23.192Q-52.575 23.495-52.160 23.495Q-51.564 23.495-51.015 23.221Q-50.465 22.948-50.119 22.464Q-50.089 22.435-50.041 22.435Q-49.992 22.435-49.941 22.491Q-49.889 22.547-49.889 22.596Q-49.889 22.635-49.909 22.655Q-50.275 23.167-50.895 23.463Q-51.515 23.758-52.179 23.758Q-52.658 23.758-53.024 23.531Q-53.390 23.304-53.590 22.923Q-53.791 22.542-53.791 22.064Q-53.791 21.390-53.415 20.726Q-53.039 20.062-52.414 19.645Q-51.789 19.227-51.100 19.227Q-50.651 19.227-50.292 19.444Q-49.933 19.662-49.933 20.086Q-49.933 20.360-50.092 20.553Q-50.251 20.746-50.519 20.746Q-50.680 20.746-50.790 20.646Q-50.900 20.545-50.900 20.384Q-50.900 20.150-50.729 19.984Q-50.558 19.818-50.329 19.818L-50.309 19.818Q-50.426 19.647-50.649 19.566Q-50.871 19.486-51.110 19.486Q-51.696 19.486-52.135 19.986Q-52.575 20.487-52.797 21.183Q-53.019 21.878-53.019 22.455",[998],[975,1172,1173,1176],{"fill":1148,"style":981},[983,1174],{"d":1175},"M86.917-18.748h-105.81a4 4 0 0 0-4 4v6.226a4 4 0 0 0 4 4h105.81a4 4 0 0 0 4-4v-6.226a4 4 0 0 0-4-4ZM-22.893-4.522",[975,1177,1179],{"transform":1178},"translate(85.6 -31.809)",[983,1180],{"d":1181,"fill":977,"stroke":977,"className":1182,"style":999},"M-52.453 23.758Q-53.083 23.758-53.446 23.282Q-53.810 22.806-53.810 22.157Q-53.810 21.517-53.478 20.829Q-53.146 20.140-52.582 19.684Q-52.018 19.227-51.369 19.227Q-51.076 19.227-50.839 19.391Q-50.602 19.554-50.470 19.828L-49.909 17.596Q-49.870 17.425-49.860 17.328Q-49.860 17.167-50.509 17.167Q-50.612 17.167-50.612 17.035Q-50.607 17.010-50.590 16.947Q-50.573 16.883-50.546 16.849Q-50.519 16.815-50.470 16.815L-49.123 16.708Q-49.001 16.708-49.001 16.834L-50.441 22.586Q-50.509 22.752-50.509 23.065Q-50.509 23.495-50.221 23.495Q-49.909 23.495-49.745 23.097Q-49.582 22.699-49.469 22.176Q-49.450 22.118-49.391 22.118L-49.269 22.118Q-49.230 22.118-49.206 22.152Q-49.181 22.186-49.181 22.215Q-49.357 22.914-49.565 23.336Q-49.772 23.758-50.241 23.758Q-50.578 23.758-50.837 23.561Q-51.095 23.363-51.159 23.036Q-51.803 23.758-52.453 23.758M-52.443 23.495Q-52.082 23.495-51.742 23.224Q-51.403 22.953-51.159 22.586Q-51.149 22.577-51.149 22.547L-50.602 20.345Q-50.661 19.994-50.861 19.740Q-51.061 19.486-51.393 19.486Q-51.730 19.486-52.021 19.762Q-52.311 20.038-52.511 20.414Q-52.707 20.814-52.885 21.512Q-53.063 22.210-53.063 22.596Q-53.063 22.943-52.914 23.219Q-52.765 23.495-52.443 23.495",[998],[975,1184,1185,1188],{"fill":1133,"stroke":1134,"style":1135},[983,1186],{"d":1187},"M76.105-1.108H27.199a4 4 0 0 0-4 4V9.12a4 4 0 0 0 4 4h48.906a4 4 0 0 0 4-4V2.892a4 4 0 0 0-4-4ZM23.199 13.12",[975,1189,1191],{"transform":1190},"translate(103.515 -15.488)",[983,1192],{"d":1193,"fill":977,"stroke":977,"className":1194,"style":999},"M-52.179 23.758Q-52.658 23.758-53.017 23.509Q-53.376 23.260-53.564 22.838Q-53.752 22.416-53.752 21.947Q-53.752 21.234-53.393 20.606Q-53.034 19.979-52.419 19.603Q-51.803 19.227-51.100 19.227Q-50.670 19.227-50.351 19.449Q-50.031 19.671-50.031 20.086Q-50.031 20.663-50.490 20.943Q-50.949 21.224-51.525 21.290Q-52.101 21.356-52.799 21.356L-52.829 21.356Q-52.990 21.952-52.990 22.376Q-52.990 22.821-52.785 23.158Q-52.580 23.495-52.160 23.495Q-51.564 23.495-51.015 23.221Q-50.465 22.948-50.119 22.464Q-50.089 22.435-50.041 22.435Q-49.992 22.435-49.941 22.491Q-49.889 22.547-49.889 22.596Q-49.889 22.635-49.909 22.655Q-50.275 23.167-50.895 23.463Q-51.515 23.758-52.179 23.758M-52.770 21.097Q-52.189 21.097-51.696 21.043Q-51.203 20.990-50.802 20.772Q-50.402 20.555-50.402 20.096Q-50.402 19.911-50.504 19.771Q-50.607 19.632-50.771 19.559Q-50.934 19.486-51.110 19.486Q-51.535 19.486-51.874 19.715Q-52.213 19.945-52.433 20.313Q-52.653 20.682-52.770 21.097",[998],[975,1196,1197,1200],{"fill":1133,"stroke":1134,"style":1135},[983,1198],{"d":1199},"M134.433-54.03H57.074a4 4 0 0 0-4 4v6.227a4 4 0 0 0 4 4h77.359a4 4 0 0 0 4-4v-6.226a4 4 0 0 0-4-4ZM53.074-39.802",[975,1201,1203],{"transform":1202},"translate(147.38 -69.382)",[983,1204],{"d":1205,"fill":977,"stroke":977,"className":1206,"style":999},"M-54.049 25.077Q-54.049 24.833-53.881 24.649Q-53.712 24.466-53.473 24.466Q-53.312 24.466-53.202 24.566Q-53.092 24.667-53.092 24.828Q-53.092 25.008-53.195 25.152Q-53.297 25.296-53.459 25.355Q-53.190 25.438-52.619 25.438Q-52.160 25.438-51.779 25.084Q-51.398 24.730-51.281 24.266L-50.993 23.094Q-51.535 23.646-52.121 23.646Q-52.550 23.646-52.856 23.426Q-53.161 23.207-53.322 22.840Q-53.483 22.474-53.483 22.064Q-53.483 21.605-53.295 21.102Q-53.107 20.599-52.768 20.169Q-52.428 19.740-51.989 19.483Q-51.549 19.227-51.061 19.227Q-50.768 19.227-50.534 19.388Q-50.299 19.549-50.163 19.818Q-50.065 19.427-49.733 19.427Q-49.606 19.427-49.518 19.503Q-49.430 19.579-49.430 19.706Q-49.430 19.735-49.433 19.750Q-49.435 19.764-49.440 19.784L-50.583 24.325Q-50.661 24.637-50.871 24.896Q-51.081 25.155-51.364 25.328Q-51.647 25.501-51.984 25.599Q-52.321 25.697-52.633 25.697Q-53.205 25.697-53.627 25.587Q-54.049 25.477-54.049 25.077M-52.101 23.387Q-51.462 23.387-50.841 22.508L-50.290 20.326Q-50.358 19.979-50.563 19.732Q-50.768 19.486-51.081 19.486Q-51.413 19.486-51.708 19.757Q-52.004 20.028-52.199 20.404Q-52.384 20.765-52.558 21.441Q-52.731 22.118-52.731 22.508Q-52.731 22.850-52.575 23.119Q-52.419 23.387-52.101 23.387",[998],[975,1208,1209,1212],{"fill":1148,"style":981},[983,1210],{"d":1211},"M157.48 16.533H51.667a4 4 0 0 0-4 4v6.226a4 4 0 0 0 4 4H157.48a4 4 0 0 0 4-4v-6.226a4 4 0 0 0-4-4ZM47.667 30.759",[975,1213,1215],{"transform":1214},"translate(155.884 3.472)",[983,1216],{"d":1217,"fill":977,"stroke":977,"className":1218,"style":999},"M-53.659 23.465Q-53.659 23.407-53.649 23.377L-52.199 17.596Q-52.160 17.425-52.150 17.328Q-52.150 17.167-52.799 17.167Q-52.902 17.167-52.902 17.035Q-52.897 17.010-52.880 16.947Q-52.863 16.883-52.836 16.849Q-52.809 16.815-52.760 16.815L-51.413 16.708L-51.383 16.708Q-51.383 16.717-51.349 16.734Q-51.315 16.751-51.310 16.756Q-51.291 16.805-51.291 16.834L-52.072 19.955Q-51.457 19.227-50.612 19.227Q-50.260 19.227-50.004 19.349Q-49.748 19.471-49.604 19.718Q-49.460 19.964-49.460 20.306Q-49.460 20.716-49.643 21.297Q-49.826 21.878-50.099 22.596Q-50.241 22.923-50.241 23.197Q-50.241 23.495-50.011 23.495Q-49.621 23.495-49.359 23.077Q-49.098 22.660-48.991 22.176Q-48.971 22.118-48.913 22.118L-48.791 22.118Q-48.752 22.118-48.727 22.145Q-48.703 22.171-48.703 22.206Q-48.703 22.215-48.712 22.235Q-48.800 22.596-48.974 22.945Q-49.147 23.294-49.411 23.526Q-49.674 23.758-50.031 23.758Q-50.382 23.758-50.631 23.517Q-50.880 23.275-50.880 22.928Q-50.880 22.743-50.802 22.538Q-50.519 21.786-50.331 21.195Q-50.143 20.604-50.143 20.155Q-50.143 19.867-50.255 19.676Q-50.368 19.486-50.631 19.486Q-51.169 19.486-51.569 19.815Q-51.969 20.145-52.262 20.687L-52.941 23.417Q-52.980 23.568-53.092 23.663Q-53.205 23.758-53.351 23.758Q-53.478 23.758-53.568 23.673Q-53.659 23.587-53.659 23.465",[998],[1220,1221,1224],"figcaption",{"className":1222},[1223],"tikz-cap","Timeline of activities as interval bars with a maximum compatible set shaded.",[381,1226,1227,1228,1281,1282,1285],{},"The chosen set ",[481,1229,1231],{"className":1230},[484],[481,1232,1234],{"className":1233,"ariaHidden":489},[488],[481,1235,1237,1240,1244,1247,1250,1253,1257,1260,1263,1267,1270,1273,1277],{"className":1236},[493],[481,1238],{"className":1239,"style":667},[497],[481,1241,1243],{"className":1242},[671],"{",[481,1245,412],{"className":1246},[502,503],[481,1248,717],{"className":1249},[716],[481,1251],{"className":1252,"style":722},[721],[481,1254,1256],{"className":1255},[502,503],"c",[481,1258,717],{"className":1259},[716],[481,1261],{"className":1262,"style":722},[721],[481,1264,1266],{"className":1265},[502,503],"e",[481,1268,717],{"className":1269},[716],[481,1271],{"className":1272,"style":722},[721],[481,1274,975],{"className":1275,"style":1276},[502,503],"margin-right:0.0359em;",[481,1278,1280],{"className":1279},[766],"}"," uses four activities; no compatible set is\nlarger. The question is ",[390,1283,1284],{},"which"," greedy rule finds such a set.",[1287,1288,1290],"h3",{"id":1289},"choosing-the-right-greedy-rule","Choosing the right greedy rule",[381,1292,1293],{},"Several plausible rules suggest themselves, and most are wrong:",[435,1295,1296,1320,1326],{},[438,1297,1298,1301,1302,1319],{},[390,1299,1300],{},"Earliest start first?"," A single activity that starts at time ",[481,1303,1305],{"className":1304},[484],[481,1306,1308],{"className":1307,"ariaHidden":489},[488],[481,1309,1311,1315],{"className":1310},[493],[481,1312],{"className":1313,"style":1314},[497],"height:0.6444em;",[481,1316,1318],{"className":1317},[502],"0"," but runs\nforever blocks everything — wrong.",[438,1321,1322,1325],{},[390,1323,1324],{},"Shortest duration first?"," A short activity wedged between two longer ones can\nknock out two compatible activities to gain one — wrong.",[438,1327,1328,1331],{},[390,1329,1330],{},"Fewest conflicts first?"," Tempting, but constructible counterexamples defeat\nit too.",[381,1333,1334],{},"Two of these failures are easy to picture. Earliest-start picks the long bar\nthat hogs the whole timeline; shortest-job picks the little wedge that destroys\nboth of its neighbors.",[962,1336,1338,1478],{"className":1337},[965,966],[968,1339,1343],{"xmlns":970,"width":1340,"height":1341,"viewBox":1342},"303.696","139.716","-75 -75 227.772 104.787",[975,1344,1345,1363,1393,1398,1403,1408,1416,1431,1436,1458,1463],{"stroke":977,"style":978},[975,1346,1349,1357],{"stroke":985,"fontFamily":1347,"fontSize":1348},"cmr8","8",[975,1350,1352],{"transform":1351},"translate(-71.294 -89.495)",[983,1353],{"d":1354,"fill":977,"stroke":977,"className":1355,"style":1356},"M13.165 24.084Q13.165 23.604 13.398 23.188Q13.630 22.772 14.040 22.522Q14.450 22.272 14.927 22.272Q15.657 22.272 16.056 22.713Q16.454 23.154 16.454 23.885Q16.454 23.990 16.361 24.014L13.911 24.014L13.911 24.084Q13.911 24.494 14.032 24.850Q14.154 25.205 14.425 25.422Q14.697 25.639 15.126 25.639Q15.489 25.639 15.786 25.410Q16.083 25.182 16.185 24.830Q16.193 24.783 16.279 24.768L16.361 24.768Q16.454 24.795 16.454 24.877Q16.454 24.885 16.447 24.916Q16.384 25.143 16.245 25.326Q16.107 25.510 15.915 25.643Q15.724 25.776 15.505 25.846Q15.286 25.916 15.048 25.916Q14.677 25.916 14.339 25.779Q14.001 25.643 13.734 25.391Q13.466 25.139 13.316 24.799Q13.165 24.459 13.165 24.084M13.919 23.776L15.880 23.776Q15.880 23.471 15.779 23.180Q15.677 22.889 15.460 22.707Q15.243 22.526 14.927 22.526Q14.626 22.526 14.396 22.713Q14.165 22.901 14.042 23.192Q13.919 23.483 13.919 23.776M17.040 25.006Q17.040 24.522 17.443 24.227Q17.845 23.932 18.396 23.813Q18.947 23.693 19.439 23.693L19.439 23.404Q19.439 23.178 19.323 22.971Q19.208 22.764 19.011 22.645Q18.814 22.526 18.583 22.526Q18.157 22.526 17.872 22.631Q17.943 22.658 17.989 22.713Q18.036 22.768 18.062 22.838Q18.087 22.908 18.087 22.983Q18.087 23.088 18.036 23.180Q17.986 23.272 17.894 23.322Q17.802 23.373 17.697 23.373Q17.591 23.373 17.499 23.322Q17.407 23.272 17.357 23.180Q17.306 23.088 17.306 22.983Q17.306 22.565 17.695 22.418Q18.083 22.272 18.583 22.272Q18.915 22.272 19.269 22.402Q19.622 22.533 19.851 22.787Q20.079 23.041 20.079 23.389L20.079 25.190Q20.079 25.322 20.152 25.432Q20.224 25.541 20.353 25.541Q20.478 25.541 20.546 25.436Q20.614 25.330 20.614 25.190L20.614 24.678L20.896 24.678L20.896 25.190Q20.896 25.393 20.779 25.551Q20.661 25.709 20.480 25.793Q20.298 25.877 20.095 25.877Q19.864 25.877 19.712 25.705Q19.560 25.533 19.529 25.303Q19.368 25.584 19.060 25.750Q18.751 25.916 18.400 25.916Q17.888 25.916 17.464 25.693Q17.040 25.471 17.040 25.006M17.728 25.006Q17.728 25.291 17.954 25.477Q18.181 25.662 18.474 25.662Q18.720 25.662 18.945 25.545Q19.169 25.428 19.304 25.225Q19.439 25.022 19.439 24.768L19.439 23.936Q19.173 23.936 18.888 23.990Q18.603 24.045 18.331 24.174Q18.060 24.303 17.894 24.510Q17.728 24.717 17.728 25.006M23.197 25.838L21.216 25.838L21.216 25.541Q21.486 25.541 21.654 25.496Q21.822 25.451 21.822 25.279L21.822 23.143Q21.822 22.928 21.759 22.832Q21.697 22.736 21.579 22.715Q21.462 22.693 21.216 22.693L21.216 22.397L22.384 22.311L22.384 23.096Q22.462 22.885 22.614 22.699Q22.767 22.514 22.966 22.412Q23.165 22.311 23.392 22.311Q23.638 22.311 23.829 22.455Q24.021 22.600 24.021 22.830Q24.021 22.986 23.915 23.096Q23.810 23.205 23.654 23.205Q23.497 23.205 23.388 23.096Q23.279 22.986 23.279 22.830Q23.279 22.670 23.384 22.565Q23.060 22.565 22.845 22.793Q22.630 23.022 22.534 23.361Q22.439 23.701 22.439 24.006L22.439 25.279Q22.439 25.447 22.665 25.494Q22.892 25.541 23.197 25.541L23.197 25.838M26.415 25.838L24.583 25.838L24.583 25.541Q24.857 25.541 25.025 25.494Q25.193 25.447 25.193 25.279L25.193 21.119Q25.193 20.904 25.130 20.809Q25.068 20.713 24.948 20.692Q24.829 20.670 24.583 20.670L24.583 20.373L25.806 20.287L25.806 25.279Q25.806 25.447 25.974 25.494Q26.142 25.541 26.415 25.541L26.415 25.838M28.720 25.838L26.943 25.838L26.943 25.541Q27.216 25.541 27.384 25.494Q27.552 25.447 27.552 25.279L27.552 23.143Q27.552 22.928 27.495 22.832Q27.439 22.736 27.325 22.715Q27.212 22.693 26.966 22.693L26.966 22.397L28.165 22.311L28.165 25.279Q28.165 25.447 28.312 25.494Q28.458 25.541 28.720 25.541L28.720 25.838M27.279 20.916Q27.279 20.725 27.413 20.594Q27.548 20.463 27.743 20.463Q27.864 20.463 27.968 20.526Q28.072 20.588 28.134 20.692Q28.197 20.795 28.197 20.916Q28.197 21.111 28.066 21.246Q27.935 21.381 27.743 21.381Q27.544 21.381 27.411 21.248Q27.279 21.115 27.279 20.916M29.220 24.084Q29.220 23.604 29.452 23.188Q29.685 22.772 30.095 22.522Q30.505 22.272 30.982 22.272Q31.712 22.272 32.111 22.713Q32.509 23.154 32.509 23.885Q32.509 23.990 32.415 24.014L29.966 24.014L29.966 24.084Q29.966 24.494 30.087 24.850Q30.208 25.205 30.480 25.422Q30.751 25.639 31.181 25.639Q31.544 25.639 31.841 25.410Q32.138 25.182 32.239 24.830Q32.247 24.783 32.333 24.768L32.415 24.768Q32.509 24.795 32.509 24.877Q32.509 24.885 32.501 24.916Q32.439 25.143 32.300 25.326Q32.161 25.510 31.970 25.643Q31.779 25.776 31.560 25.846Q31.341 25.916 31.103 25.916Q30.732 25.916 30.394 25.779Q30.056 25.643 29.788 25.391Q29.521 25.139 29.370 24.799Q29.220 24.459 29.220 24.084M29.974 23.776L31.935 23.776Q31.935 23.471 31.833 23.180Q31.732 22.889 31.515 22.707Q31.298 22.526 30.982 22.526Q30.681 22.526 30.450 22.713Q30.220 22.901 30.097 23.192Q29.974 23.483 29.974 23.776M33.040 25.830L33.040 24.608Q33.040 24.580 33.072 24.549Q33.103 24.518 33.126 24.518L33.232 24.518Q33.302 24.518 33.318 24.580Q33.380 24.901 33.519 25.141Q33.657 25.381 33.890 25.522Q34.122 25.662 34.431 25.662Q34.669 25.662 34.878 25.602Q35.087 25.541 35.224 25.393Q35.361 25.244 35.361 24.998Q35.361 24.744 35.150 24.578Q34.939 24.412 34.669 24.358L34.048 24.244Q33.642 24.166 33.341 23.910Q33.040 23.654 33.040 23.279Q33.040 22.912 33.241 22.690Q33.443 22.467 33.767 22.369Q34.091 22.272 34.431 22.272Q34.896 22.272 35.193 22.479L35.415 22.295Q35.439 22.272 35.470 22.272L35.521 22.272Q35.552 22.272 35.579 22.299Q35.607 22.326 35.607 22.358L35.607 23.342Q35.607 23.373 35.581 23.402Q35.556 23.432 35.521 23.432L35.415 23.432Q35.380 23.432 35.353 23.404Q35.325 23.377 35.325 23.342Q35.325 22.943 35.073 22.723Q34.822 22.502 34.423 22.502Q34.068 22.502 33.784 22.625Q33.501 22.748 33.501 23.053Q33.501 23.272 33.702 23.404Q33.904 23.537 34.150 23.580L34.775 23.693Q35.204 23.783 35.513 24.080Q35.822 24.377 35.822 24.791Q35.822 25.361 35.423 25.639Q35.025 25.916 34.431 25.916Q33.880 25.916 33.529 25.580L33.232 25.893Q33.208 25.916 33.173 25.916L33.126 25.916Q33.103 25.916 33.072 25.885Q33.040 25.854 33.040 25.830M36.974 24.877L36.974 22.686L36.271 22.686L36.271 22.432Q36.626 22.432 36.868 22.199Q37.111 21.967 37.222 21.619Q37.333 21.272 37.333 20.916L37.614 20.916L37.614 22.389L38.790 22.389L38.790 22.686L37.614 22.686L37.614 24.861Q37.614 25.182 37.734 25.410Q37.853 25.639 38.134 25.639Q38.314 25.639 38.431 25.516Q38.548 25.393 38.601 25.213Q38.654 25.033 38.654 24.861L38.654 24.389L38.935 24.389L38.935 24.877Q38.935 25.131 38.829 25.371Q38.724 25.611 38.527 25.764Q38.329 25.916 38.072 25.916Q37.755 25.916 37.503 25.793Q37.251 25.670 37.113 25.436Q36.974 25.201 36.974 24.877",[998],"stroke-width:0.240",[975,1358,1359],{"transform":1351},[983,1360],{"d":1361,"fill":977,"stroke":977,"className":1362,"style":1356},"M22.180 35.330L22.180 34.108Q22.180 34.080 22.212 34.049Q22.243 34.018 22.266 34.018L22.372 34.018Q22.442 34.018 22.458 34.080Q22.520 34.401 22.659 34.641Q22.797 34.881 23.030 35.022Q23.262 35.162 23.571 35.162Q23.809 35.162 24.018 35.102Q24.227 35.041 24.364 34.893Q24.501 34.744 24.501 34.498Q24.501 34.244 24.290 34.078Q24.079 33.912 23.809 33.858L23.188 33.744Q22.782 33.666 22.481 33.410Q22.180 33.154 22.180 32.779Q22.180 32.412 22.381 32.190Q22.583 31.967 22.907 31.869Q23.231 31.772 23.571 31.772Q24.036 31.772 24.333 31.979L24.555 31.795Q24.579 31.772 24.610 31.772L24.661 31.772Q24.692 31.772 24.719 31.799Q24.747 31.826 24.747 31.858L24.747 32.842Q24.747 32.873 24.721 32.902Q24.696 32.932 24.661 32.932L24.555 32.932Q24.520 32.932 24.493 32.904Q24.465 32.877 24.465 32.842Q24.465 32.443 24.213 32.223Q23.962 32.002 23.563 32.002Q23.208 32.002 22.924 32.125Q22.641 32.248 22.641 32.553Q22.641 32.772 22.842 32.904Q23.044 33.037 23.290 33.080L23.915 33.193Q24.344 33.283 24.653 33.580Q24.962 33.877 24.962 34.291Q24.962 34.861 24.563 35.139Q24.165 35.416 23.571 35.416Q23.020 35.416 22.669 35.080L22.372 35.393Q22.348 35.416 22.313 35.416L22.266 35.416Q22.243 35.416 22.212 35.385Q22.180 35.354 22.180 35.330M26.114 34.377L26.114 32.186L25.411 32.186L25.411 31.932Q25.766 31.932 26.008 31.699Q26.251 31.467 26.362 31.119Q26.473 30.772 26.473 30.416L26.754 30.416L26.754 31.889L27.930 31.889L27.930 32.186L26.754 32.186L26.754 34.361Q26.754 34.682 26.874 34.910Q26.993 35.139 27.274 35.139Q27.454 35.139 27.571 35.016Q27.688 34.893 27.741 34.713Q27.794 34.533 27.794 34.361L27.794 33.889L28.075 33.889L28.075 34.377Q28.075 34.631 27.969 34.871Q27.864 35.111 27.667 35.264Q27.469 35.416 27.212 35.416Q26.895 35.416 26.643 35.293Q26.391 35.170 26.253 34.936Q26.114 34.701 26.114 34.377M28.891 34.506Q28.891 34.022 29.294 33.727Q29.696 33.432 30.247 33.313Q30.797 33.193 31.290 33.193L31.290 32.904Q31.290 32.678 31.174 32.471Q31.059 32.264 30.862 32.145Q30.665 32.026 30.434 32.026Q30.008 32.026 29.723 32.131Q29.794 32.158 29.840 32.213Q29.887 32.268 29.913 32.338Q29.938 32.408 29.938 32.483Q29.938 32.588 29.887 32.680Q29.837 32.772 29.745 32.822Q29.653 32.873 29.547 32.873Q29.442 32.873 29.350 32.822Q29.258 32.772 29.208 32.680Q29.157 32.588 29.157 32.483Q29.157 32.065 29.545 31.918Q29.934 31.772 30.434 31.772Q30.766 31.772 31.120 31.902Q31.473 32.033 31.702 32.287Q31.930 32.541 31.930 32.889L31.930 34.690Q31.930 34.822 32.003 34.932Q32.075 35.041 32.204 35.041Q32.329 35.041 32.397 34.936Q32.465 34.830 32.465 34.690L32.465 34.178L32.747 34.178L32.747 34.690Q32.747 34.893 32.629 35.051Q32.512 35.209 32.331 35.293Q32.149 35.377 31.946 35.377Q31.715 35.377 31.563 35.205Q31.411 35.033 31.379 34.803Q31.219 35.084 30.911 35.250Q30.602 35.416 30.251 35.416Q29.739 35.416 29.315 35.193Q28.891 34.971 28.891 34.506M29.579 34.506Q29.579 34.791 29.805 34.977Q30.032 35.162 30.325 35.162Q30.571 35.162 30.795 35.045Q31.020 34.928 31.155 34.725Q31.290 34.522 31.290 34.268L31.290 33.436Q31.024 33.436 30.739 33.490Q30.454 33.545 30.182 33.674Q29.911 33.803 29.745 34.010Q29.579 34.217 29.579 34.506M35.047 35.338L33.067 35.338L33.067 35.041Q33.337 35.041 33.504 34.996Q33.672 34.951 33.672 34.779L33.672 32.643Q33.672 32.428 33.610 32.332Q33.547 32.236 33.430 32.215Q33.313 32.193 33.067 32.193L33.067 31.897L34.235 31.811L34.235 32.596Q34.313 32.385 34.465 32.199Q34.618 32.014 34.817 31.912Q35.016 31.811 35.243 31.811Q35.489 31.811 35.680 31.955Q35.872 32.100 35.872 32.330Q35.872 32.486 35.766 32.596Q35.661 32.705 35.504 32.705Q35.348 32.705 35.239 32.596Q35.129 32.486 35.129 32.330Q35.129 32.170 35.235 32.065Q34.911 32.065 34.696 32.293Q34.481 32.522 34.385 32.861Q34.290 33.201 34.290 33.506L34.290 34.779Q34.290 34.947 34.516 34.994Q34.743 35.041 35.047 35.041L35.047 35.338M36.977 34.377L36.977 32.186L36.274 32.186L36.274 31.932Q36.629 31.932 36.872 31.699Q37.114 31.467 37.225 31.119Q37.337 30.772 37.337 30.416L37.618 30.416L37.618 31.889L38.794 31.889L38.794 32.186L37.618 32.186L37.618 34.361Q37.618 34.682 37.737 34.910Q37.856 35.139 38.137 35.139Q38.317 35.139 38.434 35.016Q38.551 34.893 38.604 34.713Q38.657 34.533 38.657 34.361L38.657 33.889L38.938 33.889L38.938 34.377Q38.938 34.631 38.833 34.871Q38.727 35.111 38.530 35.264Q38.333 35.416 38.075 35.416Q37.758 35.416 37.506 35.293Q37.254 35.170 37.116 34.936Q36.977 34.701 36.977 34.377",[998],[975,1364,1367,1370],{"fill":1365,"stroke":1366,"style":1135},"var(--tk-soft-warn)","var(--tk-warn)",[983,1368],{"d":1369},"M-21.216-53.908h170.717v-15.555H-21.216Z",[975,1371,1374,1381,1387],{"fill":977,"stroke":985,"fontFamily":1372,"fontSize":1373},"cmr10","10",[975,1375,1377],{"transform":1376},"translate(30.604 -94.523)",[983,1378],{"d":1379,"fill":977,"stroke":977,"className":1380,"style":999},"M15.476 37.276L13.186 37.276L13.186 36.930Q13.528 36.930 13.747 36.871Q13.967 36.813 13.967 36.608L13.967 31.788Q13.967 31.515 13.772 31.446Q13.576 31.378 13.186 31.378L13.186 31.026L14.665 30.919L14.665 31.539Q14.939 31.236 15.302 31.078Q15.666 30.919 16.076 30.919Q16.667 30.919 17.141 31.239Q17.614 31.559 17.881 32.079Q18.147 32.599 18.147 33.180Q18.147 33.785 17.851 34.308Q17.556 34.830 17.046 35.140Q16.535 35.450 15.925 35.450Q15.198 35.450 14.695 34.859L14.695 36.608Q14.695 36.813 14.917 36.871Q15.139 36.930 15.476 36.930L15.476 37.276M14.695 31.979L14.695 34.366Q14.870 34.723 15.183 34.955Q15.495 35.187 15.866 35.187Q16.213 35.187 16.479 35.001Q16.745 34.816 16.926 34.503Q17.107 34.191 17.192 33.846Q17.278 33.502 17.278 33.180Q17.278 32.779 17.134 32.313Q16.989 31.847 16.694 31.527Q16.399 31.207 15.979 31.207Q15.573 31.207 15.234 31.415Q14.895 31.622 14.695 31.979M20.969 35.338L18.786 35.338L18.786 34.986Q19.128 34.986 19.348 34.933Q19.568 34.879 19.568 34.669L19.568 31.940Q19.568 31.554 19.419 31.466Q19.270 31.378 18.830 31.378L18.830 31.026L20.271 30.919L20.271 34.669Q20.271 34.879 20.461 34.933Q20.652 34.986 20.969 34.986L20.969 35.338M19.211 29.200Q19.211 28.981 19.377 28.815Q19.543 28.649 19.758 28.649Q19.900 28.649 20.031 28.722Q20.163 28.795 20.237 28.927Q20.310 29.059 20.310 29.200Q20.310 29.415 20.144 29.581Q19.978 29.747 19.758 29.747Q19.543 29.747 19.377 29.581Q19.211 29.415 19.211 29.200M23.738 35.450Q23.132 35.450 22.639 35.135Q22.146 34.820 21.863 34.296Q21.579 33.771 21.579 33.180Q21.579 32.589 21.860 32.047Q22.141 31.505 22.636 31.180Q23.132 30.856 23.738 30.856Q24.323 30.856 24.804 31.085Q25.285 31.315 25.285 31.837Q25.285 32.032 25.146 32.176Q25.007 32.320 24.807 32.320Q24.607 32.320 24.468 32.176Q24.328 32.032 24.328 31.837Q24.328 31.661 24.441 31.532Q24.553 31.402 24.719 31.368Q24.372 31.149 23.747 31.149Q23.269 31.149 22.976 31.466Q22.683 31.783 22.566 32.252Q22.448 32.721 22.448 33.180Q22.448 33.663 22.593 34.115Q22.737 34.567 23.056 34.862Q23.376 35.157 23.860 35.157Q24.333 35.157 24.665 34.867Q24.997 34.576 25.119 34.108Q25.119 34.049 25.198 34.049L25.320 34.049Q25.349 34.049 25.373 34.076Q25.398 34.103 25.398 34.137L25.398 34.166Q25.246 34.757 24.797 35.104Q24.348 35.450 23.738 35.450",[998],[975,1382,1383],{"transform":1376},[983,1384],{"d":1385,"fill":977,"stroke":977,"className":1386,"style":999},"M27.917 35.338L25.686 35.338L25.686 34.986Q26.028 34.986 26.247 34.933Q26.467 34.879 26.467 34.669L26.467 29.420Q26.467 29.151 26.386 29.032Q26.306 28.912 26.155 28.885Q26.003 28.859 25.686 28.859L25.686 28.507L27.165 28.400L27.165 33.146L28.508 31.969Q28.708 31.778 28.708 31.617Q28.708 31.500 28.625 31.439Q28.542 31.378 28.425 31.378L28.425 31.026L30.305 31.026L30.305 31.378Q29.626 31.378 28.948 31.969L28.235 32.589L29.509 34.396Q29.773 34.772 29.951 34.879Q30.129 34.986 30.539 34.986L30.539 35.338L28.547 35.338L28.547 34.986Q28.889 34.986 28.889 34.776Q28.889 34.625 28.708 34.396L27.746 33.028L27.136 33.556L27.136 34.669Q27.136 34.879 27.358 34.933Q27.580 34.986 27.917 34.986L27.917 35.338M31.028 35.367L31.028 33.736Q31.028 33.658 31.115 33.658L31.238 33.658Q31.296 33.658 31.316 33.736Q31.594 35.187 32.663 35.187Q33.137 35.187 33.457 34.972Q33.777 34.757 33.777 34.308Q33.777 33.985 33.528 33.758Q33.279 33.531 32.937 33.448L32.268 33.317Q31.931 33.243 31.655 33.092Q31.379 32.941 31.203 32.689Q31.028 32.438 31.028 32.106Q31.028 31.666 31.260 31.385Q31.491 31.105 31.863 30.980Q32.234 30.856 32.663 30.856Q33.176 30.856 33.557 31.129L33.845 30.880Q33.845 30.856 33.894 30.856L33.967 30.856Q33.996 30.856 34.021 30.882Q34.045 30.909 34.045 30.939L34.045 32.247Q34.045 32.340 33.967 32.340L33.845 32.340Q33.757 32.340 33.757 32.247Q33.757 31.725 33.467 31.407Q33.176 31.090 32.654 31.090Q32.204 31.090 31.875 31.256Q31.545 31.422 31.545 31.827Q31.545 32.106 31.782 32.284Q32.019 32.462 32.336 32.540L33.015 32.667Q33.357 32.745 33.652 32.931Q33.948 33.116 34.121 33.400Q34.294 33.683 34.294 34.039Q34.294 34.401 34.170 34.667Q34.045 34.933 33.823 35.109Q33.601 35.284 33.298 35.367Q32.995 35.450 32.663 35.450Q32.038 35.450 31.594 35.030L31.228 35.426Q31.228 35.450 31.174 35.450L31.115 35.450Q31.028 35.450 31.028 35.367",[998],[975,1388,1389],{"transform":1376},[983,1390],{"d":1391,"fill":977,"stroke":977,"className":1392,"style":999},"M39.004 34.137L39.004 31.378L38.173 31.378L38.173 31.119Q38.828 31.119 39.135 30.509Q39.443 29.899 39.443 29.186L39.731 29.186L39.731 31.026L41.142 31.026L41.142 31.378L39.731 31.378L39.731 34.117Q39.731 34.532 39.870 34.845Q40.009 35.157 40.371 35.157Q40.712 35.157 40.864 34.828Q41.015 34.498 41.015 34.117L41.015 33.526L41.303 33.526L41.303 34.137Q41.303 34.449 41.189 34.755Q41.074 35.060 40.849 35.255Q40.625 35.450 40.302 35.450Q39.702 35.450 39.353 35.091Q39.004 34.733 39.004 34.137M44.453 35.338L42.163 35.338L42.163 34.986Q42.504 34.986 42.724 34.933Q42.944 34.879 42.944 34.669L42.944 29.420Q42.944 29.151 42.863 29.032Q42.783 28.912 42.631 28.885Q42.480 28.859 42.163 28.859L42.163 28.507L43.647 28.400L43.647 31.837Q43.857 31.422 44.233 31.171Q44.609 30.919 45.063 30.919Q45.756 30.919 46.106 31.251Q46.455 31.583 46.455 32.267L46.455 34.669Q46.455 34.879 46.674 34.933Q46.894 34.986 47.236 34.986L47.236 35.338L44.946 35.338L44.946 34.986Q45.288 34.986 45.507 34.933Q45.727 34.879 45.727 34.669L45.727 32.296Q45.727 31.808 45.586 31.493Q45.444 31.178 45.004 31.178Q44.423 31.178 44.050 31.642Q43.676 32.106 43.676 32.696L43.676 34.669Q43.676 34.879 43.896 34.933Q44.116 34.986 44.453 34.986L44.453 35.338M49.907 35.338L47.724 35.338L47.724 34.986Q48.066 34.986 48.286 34.933Q48.505 34.879 48.505 34.669L48.505 31.940Q48.505 31.554 48.357 31.466Q48.208 31.378 47.768 31.378L47.768 31.026L49.209 30.919L49.209 34.669Q49.209 34.879 49.399 34.933Q49.589 34.986 49.907 34.986L49.907 35.338M48.149 29.200Q48.149 28.981 48.315 28.815Q48.481 28.649 48.696 28.649Q48.837 28.649 48.969 28.722Q49.101 28.795 49.174 28.927Q49.248 29.059 49.248 29.200Q49.248 29.415 49.082 29.581Q48.916 29.747 48.696 29.747Q48.481 29.747 48.315 29.581Q48.149 29.415 48.149 29.200M50.517 35.367L50.517 33.736Q50.517 33.658 50.605 33.658L50.727 33.658Q50.786 33.658 50.805 33.736Q51.084 35.187 52.153 35.187Q52.627 35.187 52.946 34.972Q53.266 34.757 53.266 34.308Q53.266 33.985 53.017 33.758Q52.768 33.531 52.426 33.448L51.757 33.317Q51.420 33.243 51.145 33.092Q50.869 32.941 50.693 32.689Q50.517 32.438 50.517 32.106Q50.517 31.666 50.749 31.385Q50.981 31.105 51.352 30.980Q51.723 30.856 52.153 30.856Q52.666 30.856 53.046 31.129L53.335 30.880Q53.335 30.856 53.383 30.856L53.457 30.856Q53.486 30.856 53.510 30.882Q53.535 30.909 53.535 30.939L53.535 32.247Q53.535 32.340 53.457 32.340L53.335 32.340Q53.247 32.340 53.247 32.247Q53.247 31.725 52.956 31.407Q52.666 31.090 52.143 31.090Q51.694 31.090 51.364 31.256Q51.035 31.422 51.035 31.827Q51.035 32.106 51.272 32.284Q51.508 32.462 51.826 32.540L52.504 32.667Q52.846 32.745 53.142 32.931Q53.437 33.116 53.610 33.400Q53.784 33.683 53.784 34.039Q53.784 34.401 53.659 34.667Q53.535 34.933 53.313 35.109Q53.090 35.284 52.788 35.367Q52.485 35.450 52.153 35.450Q51.528 35.450 51.084 35.030L50.717 35.426Q50.717 35.450 50.664 35.450L50.605 35.450Q50.517 35.450 50.517 35.367",[998],[975,1394,1395],{"fill":1133,"stroke":1134,"style":1135},[983,1396],{"d":1397},"M3.822-39.407h45.525v-12.804H3.822Z",[975,1399,1400],{"fill":1133,"stroke":1134,"style":1135},[983,1401],{"d":1402},"M41.38-39.407h45.525v-12.804H41.38Z",[975,1404,1405],{"fill":1133,"stroke":1134,"style":1135},[983,1406],{"d":1407},"M78.938-39.407h45.525v-12.804H78.938Z",[975,1409,1410,1413],{"style":981},[983,1411],{"fill":985,"d":1412},"M7.806-33.46H119.68",[983,1414],{"fill":985,"d":1415,"style":990},"M117.52-36.583c.467 1.873 1.51 2.758 2.56 3.122-1.05.365-2.093 1.25-2.56 3.123",[975,1417,1418,1425],{"stroke":985,"fontFamily":1347,"fontSize":1348},[975,1419,1421],{"transform":1420},"translate(-72.734 -28.531)",[983,1422],{"d":1423,"fill":977,"stroke":977,"className":1424,"style":1356},"M13.208 25.830L13.208 24.608Q13.208 24.580 13.239 24.549Q13.271 24.518 13.294 24.518L13.400 24.518Q13.470 24.518 13.486 24.580Q13.548 24.901 13.687 25.141Q13.825 25.381 14.058 25.522Q14.290 25.662 14.599 25.662Q14.837 25.662 15.046 25.602Q15.255 25.541 15.392 25.393Q15.529 25.244 15.529 24.998Q15.529 24.744 15.318 24.578Q15.107 24.412 14.837 24.358L14.216 24.244Q13.810 24.166 13.509 23.910Q13.208 23.654 13.208 23.279Q13.208 22.912 13.409 22.690Q13.611 22.467 13.935 22.369Q14.259 22.272 14.599 22.272Q15.064 22.272 15.361 22.479L15.583 22.295Q15.607 22.272 15.638 22.272L15.689 22.272Q15.720 22.272 15.747 22.299Q15.775 22.326 15.775 22.358L15.775 23.342Q15.775 23.373 15.749 23.402Q15.724 23.432 15.689 23.432L15.583 23.432Q15.548 23.432 15.521 23.404Q15.493 23.377 15.493 23.342Q15.493 22.943 15.241 22.723Q14.989 22.502 14.591 22.502Q14.236 22.502 13.952 22.625Q13.669 22.748 13.669 23.053Q13.669 23.272 13.870 23.404Q14.072 23.537 14.318 23.580L14.943 23.693Q15.372 23.783 15.681 24.080Q15.989 24.377 15.989 24.791Q15.989 25.361 15.591 25.639Q15.193 25.916 14.599 25.916Q14.048 25.916 13.697 25.580L13.400 25.893Q13.376 25.916 13.341 25.916L13.294 25.916Q13.271 25.916 13.239 25.885Q13.208 25.854 13.208 25.830M18.447 25.838L16.591 25.838L16.591 25.541Q16.864 25.541 17.032 25.494Q17.200 25.447 17.200 25.279L17.200 21.119Q17.200 20.904 17.138 20.809Q17.075 20.713 16.956 20.692Q16.837 20.670 16.591 20.670L16.591 20.373L17.814 20.287L17.814 22.990Q17.939 22.779 18.126 22.629Q18.314 22.479 18.540 22.395Q18.767 22.311 19.013 22.311Q20.181 22.311 20.181 23.389L20.181 25.279Q20.181 25.447 20.351 25.494Q20.521 25.541 20.790 25.541L20.790 25.838L18.935 25.838L18.935 25.541Q19.208 25.541 19.376 25.494Q19.544 25.447 19.544 25.279L19.544 23.404Q19.544 23.022 19.423 22.793Q19.302 22.565 18.950 22.565Q18.638 22.565 18.384 22.727Q18.130 22.889 17.984 23.158Q17.837 23.428 17.837 23.725L17.837 25.279Q17.837 25.447 18.007 25.494Q18.177 25.541 18.447 25.541L18.447 25.838M21.236 24.143Q21.236 23.639 21.491 23.207Q21.747 22.776 22.183 22.524Q22.618 22.272 23.118 22.272Q23.505 22.272 23.847 22.416Q24.189 22.561 24.450 22.822Q24.712 23.084 24.855 23.420Q24.997 23.756 24.997 24.143Q24.997 24.635 24.734 25.045Q24.470 25.455 24.040 25.686Q23.611 25.916 23.118 25.916Q22.626 25.916 22.193 25.684Q21.759 25.451 21.497 25.043Q21.236 24.635 21.236 24.143M23.118 25.639Q23.575 25.639 23.827 25.416Q24.079 25.193 24.167 24.842Q24.255 24.490 24.255 24.045Q24.255 23.615 24.161 23.277Q24.068 22.940 23.814 22.733Q23.560 22.526 23.118 22.526Q22.470 22.526 22.226 22.942Q21.982 23.358 21.982 24.045Q21.982 24.490 22.070 24.842Q22.157 25.193 22.409 25.416Q22.661 25.639 23.118 25.639M27.489 25.838L25.509 25.838L25.509 25.541Q25.779 25.541 25.947 25.496Q26.114 25.451 26.114 25.279L26.114 23.143Q26.114 22.928 26.052 22.832Q25.989 22.736 25.872 22.715Q25.755 22.693 25.509 22.693L25.509 22.397L26.677 22.311L26.677 23.096Q26.755 22.885 26.907 22.699Q27.060 22.514 27.259 22.412Q27.458 22.311 27.685 22.311Q27.931 22.311 28.122 22.455Q28.314 22.600 28.314 22.830Q28.314 22.986 28.208 23.096Q28.103 23.205 27.947 23.205Q27.790 23.205 27.681 23.096Q27.572 22.986 27.572 22.830Q27.572 22.670 27.677 22.565Q27.353 22.565 27.138 22.793Q26.923 23.022 26.827 23.361Q26.732 23.701 26.732 24.006L26.732 25.279Q26.732 25.447 26.958 25.494Q27.185 25.541 27.489 25.541L27.489 25.838M29.419 24.877L29.419 22.686L28.716 22.686L28.716 22.432Q29.072 22.432 29.314 22.199Q29.556 21.967 29.667 21.619Q29.779 21.272 29.779 20.916L30.060 20.916L30.060 22.389L31.236 22.389L31.236 22.686L30.060 22.686L30.060 24.861Q30.060 25.182 30.179 25.410Q30.298 25.639 30.579 25.639Q30.759 25.639 30.876 25.516Q30.993 25.393 31.046 25.213Q31.099 25.033 31.099 24.861L31.099 24.389L31.380 24.389L31.380 24.877Q31.380 25.131 31.275 25.371Q31.169 25.611 30.972 25.764Q30.775 25.916 30.517 25.916Q30.200 25.916 29.948 25.793Q29.697 25.670 29.558 25.436Q29.419 25.201 29.419 24.877M32.099 24.084Q32.099 23.604 32.331 23.188Q32.564 22.772 32.974 22.522Q33.384 22.272 33.861 22.272Q34.591 22.272 34.989 22.713Q35.388 23.154 35.388 23.885Q35.388 23.990 35.294 24.014L32.845 24.014L32.845 24.084Q32.845 24.494 32.966 24.850Q33.087 25.205 33.359 25.422Q33.630 25.639 34.060 25.639Q34.423 25.639 34.720 25.410Q35.017 25.182 35.118 24.830Q35.126 24.783 35.212 24.768L35.294 24.768Q35.388 24.795 35.388 24.877Q35.388 24.885 35.380 24.916Q35.318 25.143 35.179 25.326Q35.040 25.510 34.849 25.643Q34.657 25.776 34.439 25.846Q34.220 25.916 33.982 25.916Q33.611 25.916 33.273 25.779Q32.935 25.643 32.667 25.391Q32.400 25.139 32.249 24.799Q32.099 24.459 32.099 24.084M32.853 23.776L34.814 23.776Q34.814 23.471 34.712 23.180Q34.611 22.889 34.394 22.707Q34.177 22.526 33.861 22.526Q33.560 22.526 33.329 22.713Q33.099 22.901 32.976 23.192Q32.853 23.483 32.853 23.776M35.919 25.830L35.919 24.608Q35.919 24.580 35.950 24.549Q35.982 24.518 36.005 24.518L36.111 24.518Q36.181 24.518 36.197 24.580Q36.259 24.901 36.398 25.141Q36.536 25.381 36.769 25.522Q37.001 25.662 37.310 25.662Q37.548 25.662 37.757 25.602Q37.966 25.541 38.103 25.393Q38.239 25.244 38.239 24.998Q38.239 24.744 38.029 24.578Q37.818 24.412 37.548 24.358L36.927 24.244Q36.521 24.166 36.220 23.910Q35.919 23.654 35.919 23.279Q35.919 22.912 36.120 22.690Q36.322 22.467 36.646 22.369Q36.970 22.272 37.310 22.272Q37.775 22.272 38.072 22.479L38.294 22.295Q38.318 22.272 38.349 22.272L38.400 22.272Q38.431 22.272 38.458 22.299Q38.486 22.326 38.486 22.358L38.486 23.342Q38.486 23.373 38.460 23.402Q38.435 23.432 38.400 23.432L38.294 23.432Q38.259 23.432 38.232 23.404Q38.204 23.377 38.204 23.342Q38.204 22.943 37.952 22.723Q37.700 22.502 37.302 22.502Q36.947 22.502 36.663 22.625Q36.380 22.748 36.380 23.053Q36.380 23.272 36.581 23.404Q36.782 23.537 37.029 23.580L37.654 23.693Q38.083 23.783 38.392 24.080Q38.700 24.377 38.700 24.791Q38.700 25.361 38.302 25.639Q37.904 25.916 37.310 25.916Q36.759 25.916 36.407 25.580L36.111 25.893Q36.087 25.916 36.052 25.916L36.005 25.916Q35.982 25.916 35.950 25.885Q35.919 25.854 35.919 25.830M39.853 24.877L39.853 22.686L39.150 22.686L39.150 22.432Q39.505 22.432 39.747 22.199Q39.989 21.967 40.101 21.619Q40.212 21.272 40.212 20.916L40.493 20.916L40.493 22.389L41.669 22.389L41.669 22.686L40.493 22.686L40.493 24.861Q40.493 25.182 40.613 25.410Q40.732 25.639 41.013 25.639Q41.193 25.639 41.310 25.516Q41.427 25.393 41.480 25.213Q41.532 25.033 41.532 24.861L41.532 24.389L41.814 24.389L41.814 24.877Q41.814 25.131 41.708 25.371Q41.603 25.611 41.406 25.764Q41.208 25.916 40.950 25.916Q40.634 25.916 40.382 25.793Q40.130 25.670 39.991 25.436Q39.853 25.201 39.853 24.877",[998],[975,1426,1427],{"transform":1420},[983,1428],{"d":1429,"fill":977,"stroke":977,"className":1430,"style":1356},"M30.417 36.315Q30.417 36.209 30.467 36.117Q30.518 36.026 30.610 35.975Q30.702 35.924 30.807 35.924Q30.917 35.924 31.008 35.975Q31.100 36.026 31.151 36.117Q31.202 36.209 31.202 36.315Q31.202 36.529 31.010 36.651Q31.167 36.713 31.393 36.713Q31.694 36.713 31.823 36.404Q31.952 36.096 31.952 35.729L31.952 32.643Q31.952 32.338 31.805 32.266Q31.659 32.193 31.280 32.193L31.280 31.897L32.569 31.811L32.569 35.752Q32.569 36.072 32.409 36.356Q32.249 36.639 31.971 36.805Q31.694 36.971 31.378 36.971Q31.018 36.971 30.717 36.807Q30.417 36.643 30.417 36.315M31.647 30.416Q31.647 30.233 31.786 30.098Q31.924 29.963 32.112 29.963Q32.299 29.963 32.434 30.094Q32.569 30.225 32.569 30.416Q32.569 30.615 32.436 30.748Q32.303 30.881 32.112 30.881Q31.921 30.881 31.784 30.744Q31.647 30.608 31.647 30.416M33.569 33.643Q33.569 33.139 33.825 32.707Q34.081 32.276 34.516 32.024Q34.952 31.772 35.452 31.772Q35.839 31.772 36.180 31.916Q36.522 32.061 36.784 32.322Q37.046 32.584 37.188 32.920Q37.331 33.256 37.331 33.643Q37.331 34.135 37.067 34.545Q36.803 34.955 36.374 35.186Q35.944 35.416 35.452 35.416Q34.960 35.416 34.526 35.184Q34.092 34.951 33.831 34.543Q33.569 34.135 33.569 33.643M35.452 35.139Q35.909 35.139 36.161 34.916Q36.413 34.693 36.501 34.342Q36.589 33.990 36.589 33.545Q36.589 33.115 36.495 32.777Q36.401 32.440 36.147 32.233Q35.893 32.026 35.452 32.026Q34.803 32.026 34.559 32.442Q34.315 32.858 34.315 33.545Q34.315 33.990 34.403 34.342Q34.491 34.693 34.743 34.916Q34.995 35.139 35.452 35.139M38.729 35.338L38.448 35.338L38.448 30.619Q38.448 30.404 38.385 30.309Q38.323 30.213 38.206 30.192Q38.089 30.170 37.842 30.170L37.842 29.873L39.065 29.787L39.065 32.276Q39.542 31.811 40.241 31.811Q40.721 31.811 41.130 32.055Q41.538 32.299 41.774 32.713Q42.010 33.127 42.010 33.611Q42.010 33.986 41.862 34.315Q41.714 34.643 41.444 34.895Q41.174 35.147 40.831 35.281Q40.487 35.416 40.128 35.416Q39.807 35.416 39.508 35.268Q39.210 35.119 39.003 34.858L38.729 35.338M39.089 32.666L39.089 34.506Q39.241 34.803 39.501 34.983Q39.760 35.162 40.073 35.162Q40.499 35.162 40.766 34.943Q41.034 34.725 41.149 34.379Q41.264 34.033 41.264 33.611Q41.264 32.963 41.016 32.514Q40.768 32.065 40.171 32.065Q39.835 32.065 39.546 32.223Q39.257 32.381 39.089 32.666",[998],[975,1432,1433],{"fill":1133,"stroke":1134,"style":1135},[983,1434],{"d":1435},"M4.392 6.458h68.286V-6.345H4.392Z",[975,1437,1438,1441],{"fill":1365,"stroke":1366,"style":1135},[983,1439],{"d":1440},"M39.389 6.458h51.215V-6.345H39.389Z",[975,1442,1445,1452],{"fill":977,"stroke":985,"fontFamily":1443,"fontSize":1444},"cmr5","5",[975,1446,1448],{"transform":1447},"translate(44.586 -34.031)",[983,1449],{"d":1450,"fill":977,"stroke":977,"className":1451,"style":1010},"M14.592 36.307L13.298 36.307L13.298 36.068Q13.713 36.068 13.713 35.948L13.713 33.568Q13.713 33.475 13.590 33.450Q13.467 33.424 13.298 33.424L13.298 33.182L14.157 33.129L14.157 33.397Q14.331 33.260 14.569 33.194Q14.807 33.129 15.051 33.129Q15.293 33.129 15.520 33.210Q15.747 33.292 15.930 33.443Q16.113 33.595 16.218 33.802Q16.323 34.010 16.323 34.259Q16.323 34.601 16.120 34.859Q15.918 35.118 15.599 35.256Q15.281 35.394 14.951 35.394Q14.739 35.394 14.537 35.323Q14.336 35.253 14.177 35.118L14.177 35.948Q14.177 36.068 14.592 36.068L14.592 36.307M14.177 33.678L14.177 34.803Q14.258 34.933 14.370 35.022Q14.482 35.111 14.620 35.160Q14.758 35.209 14.902 35.209Q15.154 35.209 15.359 35.078Q15.564 34.947 15.683 34.726Q15.803 34.505 15.803 34.259Q15.803 34.022 15.697 33.807Q15.591 33.592 15.400 33.461Q15.210 33.329 14.973 33.329Q14.741 33.329 14.524 33.415Q14.306 33.502 14.177 33.678M18.318 35.338L17.082 35.338L17.082 35.099Q17.497 35.099 17.497 34.979L17.497 33.702Q17.497 33.509 17.414 33.467Q17.331 33.424 17.102 33.424L17.102 33.182L17.942 33.129L17.942 34.979Q17.942 35.099 18.318 35.099L18.318 35.338M17.322 32.269Q17.322 32.142 17.416 32.048Q17.510 31.954 17.636 31.954Q17.693 31.954 17.755 31.980Q17.817 32.005 17.859 32.047Q17.900 32.088 17.926 32.151Q17.951 32.213 17.951 32.269Q17.951 32.396 17.857 32.490Q17.763 32.584 17.636 32.584Q17.556 32.584 17.483 32.540Q17.409 32.496 17.365 32.423Q17.322 32.350 17.322 32.269M19.035 34.259Q19.035 34.003 19.150 33.786Q19.265 33.570 19.461 33.415Q19.658 33.260 19.896 33.179Q20.134 33.097 20.385 33.097Q20.791 33.097 21.072 33.177Q21.352 33.258 21.352 33.553Q21.352 33.624 21.316 33.690Q21.279 33.756 21.213 33.793Q21.147 33.829 21.076 33.829Q20.964 33.829 20.882 33.750Q20.801 33.671 20.801 33.553Q20.801 33.424 20.906 33.334Q20.757 33.297 20.390 33.297Q20.183 33.297 20.029 33.370Q19.875 33.443 19.767 33.580Q19.658 33.717 19.607 33.889Q19.555 34.061 19.555 34.259Q19.555 34.525 19.670 34.740Q19.785 34.955 19.999 35.074Q20.212 35.194 20.476 35.194Q20.732 35.194 20.926 35.069Q21.120 34.945 21.196 34.708Q21.216 34.676 21.257 34.669L21.362 34.669Q21.421 34.686 21.421 34.737Q21.421 34.742 21.416 34.762Q21.345 34.977 21.187 35.119Q21.030 35.262 20.824 35.328Q20.617 35.394 20.385 35.394Q20.053 35.394 19.741 35.254Q19.428 35.113 19.232 34.855Q19.035 34.596 19.035 34.259",[998],[975,1453,1454],{"transform":1447},[983,1455],{"d":1456,"fill":977,"stroke":977,"className":1457,"style":1010},"M23.199 35.338L21.944 35.338L21.944 35.099Q22.359 35.099 22.359 34.979L22.359 32.442Q22.359 32.252 22.269 32.208Q22.178 32.164 21.944 32.164L21.944 31.922L22.803 31.869L22.803 34.198L23.558 33.683Q23.719 33.570 23.719 33.487Q23.719 33.461 23.697 33.442Q23.675 33.424 23.643 33.424L23.643 33.182L24.759 33.182L24.759 33.424Q24.346 33.424 23.963 33.683L23.519 33.988L24.298 34.838Q24.403 34.952 24.481 35.007Q24.559 35.062 24.653 35.080Q24.747 35.099 24.898 35.099L24.898 35.338L23.743 35.338L23.743 35.099Q23.863 35.099 23.863 35.033Q23.863 34.984 23.833 34.940Q23.802 34.896 23.748 34.838L23.177 34.222L22.784 34.493L22.784 34.979Q22.784 35.099 23.199 35.099L23.199 35.338M25.496 35.328L25.496 34.537Q25.509 34.491 25.562 34.479L25.667 34.479Q25.716 34.491 25.723 34.518Q25.897 35.209 26.517 35.209Q26.805 35.209 27.038 35.118Q27.271 35.028 27.271 34.784Q27.271 34.606 27.102 34.507Q26.932 34.408 26.717 34.379L26.263 34.308Q25.958 34.261 25.727 34.119Q25.496 33.976 25.496 33.712Q25.496 33.473 25.657 33.335Q25.819 33.197 26.046 33.147Q26.273 33.097 26.517 33.097Q26.849 33.097 27.083 33.234L27.242 33.109Q27.252 33.104 27.259 33.102Q27.266 33.099 27.276 33.097L27.323 33.097Q27.369 33.114 27.381 33.158L27.381 33.793Q27.369 33.846 27.323 33.859L27.218 33.859Q27.164 33.846 27.152 33.793Q27.152 33.614 27.065 33.496Q26.978 33.378 26.833 33.323Q26.688 33.268 26.512 33.268Q26.234 33.268 25.998 33.340Q25.762 33.412 25.762 33.624Q25.762 33.876 26.282 33.954L26.741 34.027Q26.944 34.061 27.121 34.140Q27.298 34.220 27.418 34.364Q27.537 34.508 27.537 34.703Q27.537 35.077 27.233 35.235Q26.929 35.394 26.517 35.394Q26.124 35.394 25.853 35.172L25.653 35.372Q25.643 35.377 25.606 35.394L25.562 35.394Q25.509 35.377 25.496 35.328",[998],[975,1459,1460],{"fill":1133,"stroke":1134,"style":1135},[983,1461],{"d":1462},"M57.314 6.458h68.287V-6.345H57.314Z",[975,1464,1465,1468,1471],{"style":981},[983,1466],{"fill":985,"d":1467},"M7.806 17.697H119.68",[983,1469],{"fill":985,"d":1470,"style":990},"M117.52 14.574c.467 1.874 1.51 2.759 2.56 3.123-1.05.364-2.093 1.249-2.56 3.123",[975,1472,1474],{"transform":1473},"translate(111.285 -14.958)",[983,1475],{"d":1476,"fill":977,"stroke":977,"className":1477,"style":1356},"M13.790 34.377L13.790 32.186L13.087 32.186L13.087 31.932Q13.443 31.932 13.685 31.699Q13.927 31.467 14.038 31.119Q14.150 30.772 14.150 30.416L14.431 30.416L14.431 31.889L15.607 31.889L15.607 32.186L14.431 32.186L14.431 34.361Q14.431 34.682 14.550 34.910Q14.669 35.139 14.950 35.139Q15.130 35.139 15.247 35.016Q15.364 34.893 15.417 34.713Q15.470 34.533 15.470 34.361L15.470 33.889L15.751 33.889L15.751 34.377Q15.751 34.631 15.646 34.871Q15.540 35.111 15.343 35.264Q15.146 35.416 14.888 35.416Q14.572 35.416 14.320 35.293Q14.068 35.170 13.929 34.936Q13.790 34.701 13.790 34.377M18.329 35.338L16.552 35.338L16.552 35.041Q16.825 35.041 16.993 34.994Q17.161 34.947 17.161 34.779L17.161 32.643Q17.161 32.428 17.105 32.332Q17.048 32.236 16.935 32.215Q16.822 32.193 16.575 32.193L16.575 31.897L17.775 31.811L17.775 34.779Q17.775 34.947 17.921 34.994Q18.068 35.041 18.329 35.041L18.329 35.338M16.888 30.416Q16.888 30.225 17.023 30.094Q17.157 29.963 17.353 29.963Q17.474 29.963 17.577 30.026Q17.681 30.088 17.743 30.192Q17.806 30.295 17.806 30.416Q17.806 30.611 17.675 30.746Q17.544 30.881 17.353 30.881Q17.154 30.881 17.021 30.748Q16.888 30.615 16.888 30.416M20.759 35.338L18.904 35.338L18.904 35.041Q19.177 35.041 19.345 34.994Q19.513 34.947 19.513 34.779L19.513 32.643Q19.513 32.428 19.450 32.332Q19.388 32.236 19.269 32.215Q19.150 32.193 18.904 32.193L18.904 31.897L20.095 31.811L20.095 32.545Q20.208 32.330 20.402 32.162Q20.595 31.994 20.833 31.902Q21.072 31.811 21.325 31.811Q22.286 31.811 22.462 32.522Q22.646 32.193 22.974 32.002Q23.302 31.811 23.681 31.811Q24.857 31.811 24.857 32.889L24.857 34.779Q24.857 34.947 25.025 34.994Q25.193 35.041 25.462 35.041L25.462 35.338L23.607 35.338L23.607 35.041Q23.880 35.041 24.048 34.996Q24.216 34.951 24.216 34.779L24.216 32.904Q24.216 32.518 24.091 32.291Q23.966 32.065 23.614 32.065Q23.310 32.065 23.054 32.227Q22.798 32.389 22.650 32.658Q22.501 32.928 22.501 33.225L22.501 34.779Q22.501 34.947 22.671 34.994Q22.841 35.041 23.111 35.041L23.111 35.338L21.255 35.338L21.255 35.041Q21.529 35.041 21.697 34.994Q21.864 34.947 21.864 34.779L21.864 32.904Q21.864 32.518 21.739 32.291Q21.614 32.065 21.263 32.065Q20.958 32.065 20.702 32.227Q20.447 32.389 20.298 32.658Q20.150 32.928 20.150 33.225L20.150 34.779Q20.150 34.947 20.320 34.994Q20.489 35.041 20.759 35.041L20.759 35.338M25.907 33.584Q25.907 33.104 26.140 32.688Q26.372 32.272 26.782 32.022Q27.193 31.772 27.669 31.772Q28.400 31.772 28.798 32.213Q29.197 32.654 29.197 33.385Q29.197 33.490 29.103 33.514L26.654 33.514L26.654 33.584Q26.654 33.994 26.775 34.350Q26.896 34.705 27.167 34.922Q27.439 35.139 27.868 35.139Q28.232 35.139 28.529 34.910Q28.825 34.682 28.927 34.330Q28.935 34.283 29.021 34.268L29.103 34.268Q29.197 34.295 29.197 34.377Q29.197 34.385 29.189 34.416Q29.126 34.643 28.988 34.826Q28.849 35.010 28.657 35.143Q28.466 35.276 28.247 35.346Q28.029 35.416 27.790 35.416Q27.419 35.416 27.081 35.279Q26.743 35.143 26.476 34.891Q26.208 34.639 26.058 34.299Q25.907 33.959 25.907 33.584M26.661 33.276L28.622 33.276Q28.622 32.971 28.521 32.680Q28.419 32.389 28.202 32.207Q27.986 32.026 27.669 32.026Q27.368 32.026 27.138 32.213Q26.907 32.401 26.784 32.692Q26.661 32.983 26.661 33.276",[998],[1220,1479,1481],{"className":1480},[1223],"Two greedy rules that fail activity selection. Top, earliest-start: a single early-starting job (red) blocks three compatible ones (green). Bottom, shortest-duration: a short job (red) evicts the two longer jobs (green) flanking it.",[381,1483,1484,1485,1488,1489,1497,1498,1501],{},"The rule that works is ",[385,1486,1487],{},"earliest finish time first",": repeatedly pick the\ncompatible activity that finishes soonest.",[409,1490,1491],{},[412,1492,1496],{"href":1493,"ariaDescribedBy":1494,"dataFootnoteRef":376,"id":1495},"#user-content-fn-clrs-activity",[416],"user-content-fnref-clrs-activity","3"," The intuition is resource-centric:\nfinishing early frees the hall as soon as possible, leaving the most room for\neverything that follows. This is the heart of ",[412,1499,1500],{"href":216},"interval scheduling",".",[1503,1504,1508],"pre",{"className":1505,"code":1506,"language":1507,"meta":376,"style":376},"language-algorithm shiki shiki-themes Vesper Light - Orange Boost (Quick Open Adjusted) vesper","caption: $\\textsc{Greedy-Activity-Select}(s, f)$ — choose a max set of compatible activities\nnumber: 1\nsort activities so that $f_1 \\le f_2 \\le \\cdots \\le f_n$\n$S \\gets \\set{1}$ \u002F\u002F earliest finish is safe\n$k \\gets 1$ \u002F\u002F last activity added to $S$\nfor $m \\gets 2$ to $n$ do\n  if $s_m \\ge f_k$ then \u002F\u002F $m$ starts after $k$ finishes\n    $S \\gets S \\cup \\set{m}$\n    $k \\gets m$\nreturn $S$\n","algorithm",[1509,1510,1511,1517,1522,1527,1532,1537,1542,1547,1552,1557],"code",{"__ignoreMap":376},[481,1512,1514],{"class":1513,"line":6},"line",[481,1515,1516],{},"caption: $\\textsc{Greedy-Activity-Select}(s, f)$ — choose a max set of compatible activities\n",[481,1518,1519],{"class":1513,"line":18},[481,1520,1521],{},"number: 1\n",[481,1523,1524],{"class":1513,"line":24},[481,1525,1526],{},"sort activities so that $f_1 \\le f_2 \\le \\cdots \\le f_n$\n",[481,1528,1529],{"class":1513,"line":73},[481,1530,1531],{},"$S \\gets \\set{1}$ \u002F\u002F earliest finish is safe\n",[481,1533,1534],{"class":1513,"line":102},[481,1535,1536],{},"$k \\gets 1$ \u002F\u002F last activity added to $S$\n",[481,1538,1539],{"class":1513,"line":108},[481,1540,1541],{},"for $m \\gets 2$ to $n$ do\n",[481,1543,1544],{"class":1513,"line":116},[481,1545,1546],{},"  if $s_m \\ge f_k$ then \u002F\u002F $m$ starts after $k$ finishes\n",[481,1548,1549],{"class":1513,"line":196},[481,1550,1551],{},"    $S \\gets S \\cup \\set{m}$\n",[481,1553,1554],{"class":1513,"line":202},[481,1555,1556],{},"    $k \\gets m$\n",[481,1558,1559],{"class":1513,"line":283},[481,1560,1561],{},"return $S$\n",[381,1563,1564,1565,1591,1592,1635],{},"After the one-time sort by finish time, a single linear scan does the rest:\n",[481,1566,1568],{"className":1567},[484],[481,1569,1571],{"className":1570,"ariaHidden":489},[488],[481,1572,1574,1577,1581,1585,1588],{"className":1573},[493],[481,1575],{"className":1576,"style":667},[497],[481,1578,1580],{"className":1579},[502],"Θ",[481,1582,1584],{"className":1583},[671],"(",[481,1586,504],{"className":1587},[502,503],[481,1589,767],{"className":1590},[766]," work, for ",[481,1593,1595],{"className":1594},[484],[481,1596,1598],{"className":1597,"ariaHidden":489},[488],[481,1599,1601,1604,1607,1610,1613,1616,1626,1629,1632],{"className":1600},[493],[481,1602],{"className":1603,"style":667},[497],[481,1605,1580],{"className":1606},[502],[481,1608,1584],{"className":1609},[671],[481,1611,504],{"className":1612},[502,503],[481,1614],{"className":1615,"style":722},[721],[481,1617,1620],{"className":1618},[1619],"mop",[481,1621,1625],{"className":1622,"style":1624},[502,1623],"mathrm","margin-right:0.0139em;","log",[481,1627],{"className":1628,"style":722},[721],[481,1630,504],{"className":1631},[502,503],[481,1633,767],{"className":1634},[766]," total, dominated entirely by the sort.\nIf the finish times arrive already sorted, the selection itself is linear.",[420,1637,1639],{"id":1638},"correctness-by-the-exchange-argument","Correctness by the exchange argument",[381,1641,1642,1643,1646,1647,1650],{},"The usual proof technique for greedy algorithms is the ",[385,1644,1645],{},"exchange\nargument",": take any optimal solution, and show you can ",[390,1648,1649],{},"transform"," it, swapping\none of its choices for the greedy choice, without making it worse. Since the\nresult is no worse, it is still optimal, and it now agrees with greedy on the\nfirst choice. That establishes the greedy-choice property; optimal substructure\nthen finishes the job by induction.",[774,1652,1654],{"type":1653},"lemma",[381,1655,1656,1659,1660,1675,1676,1501],{},[385,1657,1658],{},"Lemma (Greedy choice)."," Let activity ",[481,1661,1663],{"className":1662},[484],[481,1664,1666],{"className":1665,"ariaHidden":489},[488],[481,1667,1669,1672],{"className":1668},[493],[481,1670],{"className":1671,"style":1314},[497],[481,1673,418],{"className":1674},[502]," be the activity with the earliest\nfinish time. Then some maximum-size compatible set contains activity ",[481,1677,1679],{"className":1678},[484],[481,1680,1682],{"className":1681,"ariaHidden":489},[488],[481,1683,1685,1688],{"className":1684},[493],[481,1686],{"className":1687,"style":1314},[497],[481,1689,418],{"className":1690},[502],[774,1692,1694,2029,2573,2786],{"type":1693},"proof",[381,1695,1696,1699,1700,1745,1746,1764,1765,1806,1807,1841,1842,1997,1998,2013,2014,1501],{},[385,1697,1698],{},"Proof."," Let ",[481,1701,1703],{"className":1702},[484],[481,1704,1706],{"className":1705,"ariaHidden":489},[488],[481,1707,1709,1713],{"className":1708},[493],[481,1710],{"className":1711,"style":1712},[497],"height:0.6887em;",[481,1714,1716,1719],{"className":1715},[502],[481,1717,956],{"className":1718,"style":955},[502,503],[481,1720,1722],{"className":1721},[550],[481,1723,1725],{"className":1724},[554],[481,1726,1728],{"className":1727},[559],[481,1729,1731],{"className":1730,"style":1712},[563],[481,1732,1734,1737],{"style":1733},"top:-3.063em;margin-right:0.05em;",[481,1735],{"className":1736,"style":572},[571],[481,1738,1740],{"className":1739},[576,577,578,579],[481,1741,1744],{"className":1742},[1743,579],"mbin","⋆"," be any optimal solution, and let ",[481,1747,1749],{"className":1748},[484],[481,1750,1752],{"className":1751,"ariaHidden":489},[488],[481,1753,1755,1759],{"className":1754},[493],[481,1756],{"className":1757,"style":1758},[497],"height:0.854em;vertical-align:-0.1944em;",[481,1760,1763],{"className":1761,"style":1762},[502,503],"margin-right:0.0572em;","j"," be the activity in\n",[481,1766,1768],{"className":1767},[484],[481,1769,1771],{"className":1770,"ariaHidden":489},[488],[481,1772,1774,1777],{"className":1773},[493],[481,1775],{"className":1776,"style":1712},[497],[481,1778,1780,1783],{"className":1779},[502],[481,1781,956],{"className":1782,"style":955},[502,503],[481,1784,1786],{"className":1785},[550],[481,1787,1789],{"className":1788},[554],[481,1790,1792],{"className":1791},[559],[481,1793,1795],{"className":1794,"style":1712},[563],[481,1796,1797,1800],{"style":1733},[481,1798],{"className":1799,"style":572},[571],[481,1801,1803],{"className":1802},[576,577,578,579],[481,1804,1744],{"className":1805},[1743,579]," with the earliest finish time. If ",[481,1808,1810],{"className":1809},[484],[481,1811,1813,1832],{"className":1812,"ariaHidden":489},[488],[481,1814,1816,1819,1822,1825,1829],{"className":1815},[493],[481,1817],{"className":1818,"style":1758},[497],[481,1820,1763],{"className":1821,"style":1762},[502,503],[481,1823],{"className":1824,"style":879},[721],[481,1826,1828],{"className":1827},[883],"=",[481,1830],{"className":1831,"style":879},[721],[481,1833,1835,1838],{"className":1834},[493],[481,1836],{"className":1837,"style":1314},[497],[481,1839,418],{"className":1840},[502]," we are done. Otherwise,\nbuild ",[481,1843,1845],{"className":1844},[484],[481,1846,1848,1897,1946,1979],{"className":1847,"ariaHidden":489},[488],[481,1849,1851,1855,1888,1891,1894],{"className":1850},[493],[481,1852],{"className":1853,"style":1854},[497],"height:0.7519em;",[481,1856,1858,1861],{"className":1857},[502],[481,1859,956],{"className":1860,"style":955},[502,503],[481,1862,1864],{"className":1863},[550],[481,1865,1867],{"className":1866},[554],[481,1868,1870],{"className":1869},[559],[481,1871,1873],{"className":1872,"style":1854},[563],[481,1874,1875,1878],{"style":1733},[481,1876],{"className":1877,"style":572},[571],[481,1879,1881],{"className":1880},[576,577,578,579],[481,1882,1884],{"className":1883},[502,579],[481,1885,1887],{"className":1886},[502,579],"′",[481,1889],{"className":1890,"style":879},[721],[481,1892,1828],{"className":1893},[883],[481,1895],{"className":1896,"style":879},[721],[481,1898,1900,1903,1906,1935,1939,1943],{"className":1899},[493],[481,1901],{"className":1902,"style":667},[497],[481,1904,1584],{"className":1905},[671],[481,1907,1909,1912],{"className":1908},[502],[481,1910,956],{"className":1911,"style":955},[502,503],[481,1913,1915],{"className":1914},[550],[481,1916,1918],{"className":1917},[554],[481,1919,1921],{"className":1920},[559],[481,1922,1924],{"className":1923,"style":1712},[563],[481,1925,1926,1929],{"style":1733},[481,1927],{"className":1928,"style":572},[571],[481,1930,1932],{"className":1931},[576,577,578,579],[481,1933,1744],{"className":1934},[1743,579],[481,1936],{"className":1937,"style":1938},[721],"margin-right:0.2222em;",[481,1940,1942],{"className":1941},[1743],"∖",[481,1944],{"className":1945,"style":1938},[721],[481,1947,1949,1952,1966,1969,1972,1976],{"className":1948},[493],[481,1950],{"className":1951,"style":667},[497],[481,1953,1955,1960,1963],{"className":1954},[808],[481,1956,1243],{"className":1957,"style":1959},[671,1958],"delimcenter","top:0em;",[481,1961,1763],{"className":1962,"style":1762},[502,503],[481,1964,1280],{"className":1965,"style":1959},[766,1958],[481,1967,767],{"className":1968},[766],[481,1970],{"className":1971,"style":1938},[721],[481,1973,1975],{"className":1974},[1743],"∪",[481,1977],{"className":1978,"style":1938},[721],[481,1980,1982,1985],{"className":1981},[493],[481,1983],{"className":1984,"style":667},[497],[481,1986,1988,1991,1994],{"className":1987},[808],[481,1989,1243],{"className":1990,"style":1959},[671,1958],[481,1992,418],{"className":1993},[502],[481,1995,1280],{"className":1996,"style":1959},[766,1958]," — evict ",[481,1999,2001],{"className":2000},[484],[481,2002,2004],{"className":2003,"ariaHidden":489},[488],[481,2005,2007,2010],{"className":2006},[493],[481,2008],{"className":2009,"style":1758},[497],[481,2011,1763],{"className":2012,"style":1762},[502,503],", admit ",[481,2015,2017],{"className":2016},[484],[481,2018,2020],{"className":2019,"ariaHidden":489},[488],[481,2021,2023,2026],{"className":2022},[493],[481,2024],{"className":2025,"style":1314},[497],[481,2027,418],{"className":2028},[502],[381,2030,2031,2032,2076,2077,2092,2093,2108,2109,2124,2125,2236,2237,2298,2299,2314,2315,2330,2331,2495,2496,2511,2512,2527,2528,2572],{},"We must check ",[481,2033,2035],{"className":2034},[484],[481,2036,2038],{"className":2037,"ariaHidden":489},[488],[481,2039,2041,2044],{"className":2040},[493],[481,2042],{"className":2043,"style":1854},[497],[481,2045,2047,2050],{"className":2046},[502],[481,2048,956],{"className":2049,"style":955},[502,503],[481,2051,2053],{"className":2052},[550],[481,2054,2056],{"className":2055},[554],[481,2057,2059],{"className":2058},[559],[481,2060,2062],{"className":2061,"style":1854},[563],[481,2063,2064,2067],{"style":1733},[481,2065],{"className":2066,"style":572},[571],[481,2068,2070],{"className":2069},[576,577,578,579],[481,2071,2073],{"className":2072},[502,579],[481,2074,1887],{"className":2075},[502,579]," is still a valid schedule. Activity ",[481,2078,2080],{"className":2079},[484],[481,2081,2083],{"className":2082,"ariaHidden":489},[488],[481,2084,2086,2089],{"className":2085},[493],[481,2087],{"className":2088,"style":1314},[497],[481,2090,418],{"className":2091},[502]," finishes no later\nthan ",[481,2094,2096],{"className":2095},[484],[481,2097,2099],{"className":2098,"ariaHidden":489},[488],[481,2100,2102,2105],{"className":2101},[493],[481,2103],{"className":2104,"style":1758},[497],[481,2106,1763],{"className":2107,"style":1762},[502,503],", because ",[481,2110,2112],{"className":2111},[484],[481,2113,2115],{"className":2114,"ariaHidden":489},[488],[481,2116,2118,2121],{"className":2117},[493],[481,2119],{"className":2120,"style":1314},[497],[481,2122,418],{"className":2123},[502]," has the globally earliest finish: ",[481,2126,2128],{"className":2127},[484],[481,2129,2131,2188],{"className":2130,"ariaHidden":489},[488],[481,2132,2134,2137,2178,2181,2185],{"className":2133},[493],[481,2135],{"className":2136,"style":610},[497],[481,2138,2140,2143],{"className":2139},[502],[481,2141,618],{"className":2142,"style":617},[502,503],[481,2144,2146],{"className":2145},[550],[481,2147,2149,2170],{"className":2148},[554,555],[481,2150,2152,2167],{"className":2151},[559],[481,2153,2156],{"className":2154,"style":2155},[563],"height:0.3011em;",[481,2157,2158,2161],{"style":633},[481,2159],{"className":2160,"style":572},[571],[481,2162,2164],{"className":2163},[576,577,578,579],[481,2165,418],{"className":2166},[502,579],[481,2168,587],{"className":2169},[586],[481,2171,2173],{"className":2172},[559],[481,2174,2176],{"className":2175,"style":594},[563],[481,2177],{},[481,2179],{"className":2180,"style":879},[721],[481,2182,2184],{"className":2183},[883],"≤",[481,2186],{"className":2187,"style":879},[721],[481,2189,2191,2195],{"className":2190},[493],[481,2192],{"className":2193,"style":2194},[497],"height:0.9805em;vertical-align:-0.2861em;",[481,2196,2198,2201],{"className":2197},[502],[481,2199,618],{"className":2200,"style":617},[502,503],[481,2202,2204],{"className":2203},[550],[481,2205,2207,2227],{"className":2206},[554,555],[481,2208,2210,2224],{"className":2209},[559],[481,2211,2213],{"className":2212,"style":564},[563],[481,2214,2215,2218],{"style":633},[481,2216],{"className":2217,"style":572},[571],[481,2219,2221],{"className":2220},[576,577,578,579],[481,2222,1763],{"className":2223,"style":1762},[502,503,579],[481,2225,587],{"className":2226},[586],[481,2228,2230],{"className":2229},[559],[481,2231,2234],{"className":2232,"style":2233},[563],"height:0.2861em;",[481,2235],{},". Every\nother activity ",[481,2238,2240],{"className":2239},[484],[481,2241,2243,2263],{"className":2242,"ariaHidden":489},[488],[481,2244,2246,2250,2253,2256,2260],{"className":2245},[493],[481,2247],{"className":2248,"style":2249},[497],"height:0.6986em;vertical-align:-0.0391em;",[481,2251,525],{"className":2252},[502,503],[481,2254],{"className":2255,"style":879},[721],[481,2257,2259],{"className":2258},[883],"∈",[481,2261],{"className":2262,"style":879},[721],[481,2264,2266,2269],{"className":2265},[493],[481,2267],{"className":2268,"style":1712},[497],[481,2270,2272,2275],{"className":2271},[502],[481,2273,956],{"className":2274,"style":955},[502,503],[481,2276,2278],{"className":2277},[550],[481,2279,2281],{"className":2280},[554],[481,2282,2284],{"className":2283},[559],[481,2285,2287],{"className":2286,"style":1712},[563],[481,2288,2289,2292],{"style":1733},[481,2290],{"className":2291,"style":572},[571],[481,2293,2295],{"className":2294},[576,577,578,579],[481,2296,1744],{"className":2297},[1743,579]," was compatible with ",[481,2300,2302],{"className":2301},[484],[481,2303,2305],{"className":2304,"ariaHidden":489},[488],[481,2306,2308,2311],{"className":2307},[493],[481,2309],{"className":2310,"style":1758},[497],[481,2312,1763],{"className":2313,"style":1762},[502,503],", so it started after ",[481,2316,2318],{"className":2317},[484],[481,2319,2321],{"className":2320,"ariaHidden":489},[488],[481,2322,2324,2327],{"className":2323},[493],[481,2325],{"className":2326,"style":1758},[497],[481,2328,1763],{"className":2329,"style":1762},[502,503],"\nfinished, ",[481,2332,2334],{"className":2333},[484],[481,2335,2337,2394,2449],{"className":2336,"ariaHidden":489},[488],[481,2338,2340,2344,2384,2387,2391],{"className":2339},[493],[481,2341],{"className":2342,"style":2343},[497],"height:0.786em;vertical-align:-0.15em;",[481,2345,2347,2350],{"className":2346},[502],[481,2348,546],{"className":2349},[502,503],[481,2351,2353],{"className":2352},[550],[481,2354,2356,2376],{"className":2355},[554,555],[481,2357,2359,2373],{"className":2358},[559],[481,2360,2362],{"className":2361,"style":564},[563],[481,2363,2364,2367],{"style":567},[481,2365],{"className":2366,"style":572},[571],[481,2368,2370],{"className":2369},[576,577,578,579],[481,2371,525],{"className":2372},[502,503,579],[481,2374,587],{"className":2375},[586],[481,2377,2379],{"className":2378},[559],[481,2380,2382],{"className":2381,"style":594},[563],[481,2383],{},[481,2385],{"className":2386,"style":879},[721],[481,2388,2390],{"className":2389},[883],"≥",[481,2392],{"className":2393,"style":879},[721],[481,2395,2397,2400,2440,2443,2446],{"className":2396},[493],[481,2398],{"className":2399,"style":2194},[497],[481,2401,2403,2406],{"className":2402},[502],[481,2404,618],{"className":2405,"style":617},[502,503],[481,2407,2409],{"className":2408},[550],[481,2410,2412,2432],{"className":2411},[554,555],[481,2413,2415,2429],{"className":2414},[559],[481,2416,2418],{"className":2417,"style":564},[563],[481,2419,2420,2423],{"style":633},[481,2421],{"className":2422,"style":572},[571],[481,2424,2426],{"className":2425},[576,577,578,579],[481,2427,1763],{"className":2428,"style":1762},[502,503,579],[481,2430,587],{"className":2431},[586],[481,2433,2435],{"className":2434},[559],[481,2436,2438],{"className":2437,"style":2233},[563],[481,2439],{},[481,2441],{"className":2442,"style":879},[721],[481,2444,2390],{"className":2445},[883],[481,2447],{"className":2448,"style":879},[721],[481,2450,2452,2455],{"className":2451},[493],[481,2453],{"className":2454,"style":610},[497],[481,2456,2458,2461],{"className":2457},[502],[481,2459,618],{"className":2460,"style":617},[502,503],[481,2462,2464],{"className":2463},[550],[481,2465,2467,2487],{"className":2466},[554,555],[481,2468,2470,2484],{"className":2469},[559],[481,2471,2473],{"className":2472,"style":2155},[563],[481,2474,2475,2478],{"style":633},[481,2476],{"className":2477,"style":572},[571],[481,2479,2481],{"className":2480},[576,577,578,579],[481,2482,418],{"className":2483},[502,579],[481,2485,587],{"className":2486},[586],[481,2488,2490],{"className":2489},[559],[481,2491,2493],{"className":2492,"style":594},[563],[481,2494],{},". Hence ",[481,2497,2499],{"className":2498},[484],[481,2500,2502],{"className":2501,"ariaHidden":489},[488],[481,2503,2505,2508],{"className":2504},[493],[481,2506],{"className":2507,"style":521},[497],[481,2509,525],{"className":2510},[502,503]," is compatible with ",[481,2513,2515],{"className":2514},[484],[481,2516,2518],{"className":2517,"ariaHidden":489},[488],[481,2519,2521,2524],{"className":2520},[493],[481,2522],{"className":2523,"style":1314},[497],[481,2525,418],{"className":2526},[502]," as well. So\n",[481,2529,2531],{"className":2530},[484],[481,2532,2534],{"className":2533,"ariaHidden":489},[488],[481,2535,2537,2540],{"className":2536},[493],[481,2538],{"className":2539,"style":1854},[497],[481,2541,2543,2546],{"className":2542},[502],[481,2544,956],{"className":2545,"style":955},[502,503],[481,2547,2549],{"className":2548},[550],[481,2550,2552],{"className":2551},[554],[481,2553,2555],{"className":2554},[559],[481,2556,2558],{"className":2557,"style":1854},[563],[481,2559,2560,2563],{"style":1733},[481,2561],{"className":2562,"style":572},[571],[481,2564,2566],{"className":2565},[576,577,578,579],[481,2567,2569],{"className":2568},[502,579],[481,2570,1887],{"className":2571},[502,579]," is a set of pairwise compatible activities, and",[481,2574,2577],{"className":2575},[2576],"katex-display",[481,2578,2580],{"className":2579},[484],[481,2581,2583,2643,2698,2718,2736],{"className":2582,"ariaHidden":489},[488],[481,2584,2586,2590,2634,2637,2640],{"className":2585},[493],[481,2587],{"className":2588,"style":2589},[497],"height:1.0519em;vertical-align:-0.25em;",[481,2591,2593,2597,2631],{"className":2592},[808],[481,2594,2596],{"className":2595,"style":1959},[671,1958],"∣",[481,2598,2600,2603],{"className":2599},[502],[481,2601,956],{"className":2602,"style":955},[502,503],[481,2604,2606],{"className":2605},[550],[481,2607,2609],{"className":2608},[554],[481,2610,2612],{"className":2611},[559],[481,2613,2616],{"className":2614,"style":2615},[563],"height:0.8019em;",[481,2617,2619,2622],{"style":2618},"top:-3.113em;margin-right:0.05em;",[481,2620],{"className":2621,"style":572},[571],[481,2623,2625],{"className":2624},[576,577,578,579],[481,2626,2628],{"className":2627},[502,579],[481,2629,1887],{"className":2630},[502,579],[481,2632,2596],{"className":2633,"style":1959},[766,1958],[481,2635],{"className":2636,"style":879},[721],[481,2638,1828],{"className":2639},[883],[481,2641],{"className":2642,"style":879},[721],[481,2644,2646,2649,2688,2691,2695],{"className":2645},[493],[481,2647],{"className":2648,"style":667},[497],[481,2650,2652,2655,2685],{"className":2651},[808],[481,2653,2596],{"className":2654,"style":1959},[671,1958],[481,2656,2658,2661],{"className":2657},[502],[481,2659,956],{"className":2660,"style":955},[502,503],[481,2662,2664],{"className":2663},[550],[481,2665,2667],{"className":2666},[554],[481,2668,2670],{"className":2669},[559],[481,2671,2674],{"className":2672,"style":2673},[563],"height:0.7387em;",[481,2675,2676,2679],{"style":2618},[481,2677],{"className":2678,"style":572},[571],[481,2680,2682],{"className":2681},[576,577,578,579],[481,2683,1744],{"className":2684},[1743,579],[481,2686,2596],{"className":2687,"style":1959},[766,1958],[481,2689],{"className":2690,"style":1938},[721],[481,2692,2694],{"className":2693},[1743],"−",[481,2696],{"className":2697,"style":1938},[721],[481,2699,2701,2705,2708,2711,2715],{"className":2700},[493],[481,2702],{"className":2703,"style":2704},[497],"height:0.7278em;vertical-align:-0.0833em;",[481,2706,418],{"className":2707},[502],[481,2709],{"className":2710,"style":1938},[721],[481,2712,2714],{"className":2713},[1743],"+",[481,2716],{"className":2717,"style":1938},[721],[481,2719,2721,2724,2727,2730,2733],{"className":2720},[493],[481,2722],{"className":2723,"style":1314},[497],[481,2725,418],{"className":2726},[502],[481,2728],{"className":2729,"style":879},[721],[481,2731,1828],{"className":2732},[883],[481,2734],{"className":2735,"style":879},[721],[481,2737,2739,2742,2780,2783],{"className":2738},[493],[481,2740],{"className":2741,"style":667},[497],[481,2743,2745,2748,2777],{"className":2744},[808],[481,2746,2596],{"className":2747,"style":1959},[671,1958],[481,2749,2751,2754],{"className":2750},[502],[481,2752,956],{"className":2753,"style":955},[502,503],[481,2755,2757],{"className":2756},[550],[481,2758,2760],{"className":2759},[554],[481,2761,2763],{"className":2762},[559],[481,2764,2766],{"className":2765,"style":2673},[563],[481,2767,2768,2771],{"style":2618},[481,2769],{"className":2770,"style":572},[571],[481,2772,2774],{"className":2773},[576,577,578,579],[481,2775,1744],{"className":2776},[1743,579],[481,2778,2596],{"className":2779,"style":1959},[766,1958],[481,2781],{"className":2782,"style":722},[721],[481,2784,1501],{"className":2785},[502],[381,2787,2788,2832,2833,2848,2849],{},[481,2789,2791],{"className":2790},[484],[481,2792,2794],{"className":2793,"ariaHidden":489},[488],[481,2795,2797,2800],{"className":2796},[493],[481,2798],{"className":2799,"style":1854},[497],[481,2801,2803,2806],{"className":2802},[502],[481,2804,956],{"className":2805,"style":955},[502,503],[481,2807,2809],{"className":2808},[550],[481,2810,2812],{"className":2811},[554],[481,2813,2815],{"className":2814},[559],[481,2816,2818],{"className":2817,"style":1854},[563],[481,2819,2820,2823],{"style":1733},[481,2821],{"className":2822,"style":572},[571],[481,2824,2826],{"className":2825},[576,577,578,579],[481,2827,2829],{"className":2828},[502,579],[481,2830,1887],{"className":2831},[502,579]," is just as large as the optimum, so it is itself optimal — and it contains\nactivity ",[481,2834,2836],{"className":2835},[484],[481,2837,2839],{"className":2838,"ariaHidden":489},[488],[481,2840,2842,2845],{"className":2841},[493],[481,2843],{"className":2844,"style":1314},[497],[481,2846,418],{"className":2847},[502],". ",[481,2850,2852],{"className":2851},[484],[481,2853,2855],{"className":2854,"ariaHidden":489},[488],[481,2856,2858,2862],{"className":2857},[493],[481,2859],{"className":2860,"style":2861},[497],"height:0.675em;",[481,2863,2866],{"className":2864},[502,2865],"amsrm","■",[381,2868,2869,2870,2885,2886,2901],{},"The picture of the swap is the whole argument in one image. Activity ",[481,2871,2873],{"className":2872},[484],[481,2874,2876],{"className":2875,"ariaHidden":489},[488],[481,2877,2879,2882],{"className":2878},[493],[481,2880],{"className":2881,"style":1314},[497],[481,2883,418],{"className":2884},[502]," slides in where\n",[481,2887,2889],{"className":2888},[484],[481,2890,2892],{"className":2891,"ariaHidden":489},[488],[481,2893,2895,2898],{"className":2894},[493],[481,2896],{"className":2897,"style":1758},[497],[481,2899,1763],{"className":2900,"style":1762},[502,503]," was, finishing at least as early, so nothing downstream can break.",[962,2903,2905,3033],{"className":2904},[965,966],[968,2906,2910],{"xmlns":970,"width":2907,"height":2908,"viewBox":2909},"325.918","86.749","-75 -75 244.439 65.062",[975,2911,2912,2927,2939,2966,2978,3001,3010],{"stroke":977,"style":978},[975,2913,2914,2917,2920],{"style":981},[983,2915],{"fill":985,"d":2916},"M-48.132-19.88h186.99",[983,2918],{"fill":985,"d":2919,"style":990},"M136.698-23.003c.468 1.874 1.51 2.758 2.56 3.123-1.05.364-2.092 1.249-2.56 3.122",[975,2921,2923],{"transform":2922},"translate(191.523 13.582)",[983,2924],{"d":2925,"fill":977,"stroke":977,"className":2926,"style":999},"M-47.111-31.325L-47.111-34.084L-47.942-34.084L-47.942-34.343Q-47.287-34.343-46.980-34.953Q-46.672-35.563-46.672-36.276L-46.384-36.276L-46.384-34.436L-44.973-34.436L-44.973-34.084L-46.384-34.084L-46.384-31.345Q-46.384-30.930-46.245-30.617Q-46.106-30.305-45.744-30.305Q-45.403-30.305-45.251-30.634Q-45.100-30.964-45.100-31.345L-45.100-31.936L-44.812-31.936L-44.812-31.325Q-44.812-31.013-44.926-30.707Q-45.041-30.402-45.266-30.207Q-45.490-30.012-45.813-30.012Q-46.413-30.012-46.762-30.371Q-47.111-30.729-47.111-31.325M-41.760-30.124L-43.943-30.124L-43.943-30.476Q-43.601-30.476-43.381-30.529Q-43.161-30.583-43.161-30.793L-43.161-33.522Q-43.161-33.908-43.310-33.996Q-43.459-34.084-43.899-34.084L-43.899-34.436L-42.458-34.543L-42.458-30.793Q-42.458-30.583-42.268-30.529Q-42.077-30.476-41.760-30.476L-41.760-30.124M-43.518-36.262Q-43.518-36.481-43.352-36.647Q-43.186-36.813-42.971-36.813Q-42.829-36.813-42.697-36.740Q-42.566-36.667-42.492-36.535Q-42.419-36.403-42.419-36.262Q-42.419-36.047-42.585-35.881Q-42.751-35.715-42.971-35.715Q-43.186-35.715-43.352-35.881Q-43.518-36.047-43.518-36.262M-38.894-30.124L-41.184-30.124L-41.184-30.476Q-40.842-30.476-40.622-30.529Q-40.403-30.583-40.403-30.793L-40.403-33.522Q-40.403-33.791-40.483-33.911Q-40.564-34.030-40.715-34.057Q-40.866-34.084-41.184-34.084L-41.184-34.436L-39.734-34.543L-39.734-33.566Q-39.533-33.996-39.140-34.270Q-38.747-34.543-38.283-34.543Q-37.131-34.543-36.931-33.605Q-36.731-34.025-36.345-34.284Q-35.959-34.543-35.500-34.543Q-35.046-34.543-34.736-34.396Q-34.426-34.250-34.270-33.950Q-34.113-33.649-34.113-33.195L-34.113-30.793Q-34.113-30.583-33.891-30.529Q-33.669-30.476-33.332-30.476L-33.332-30.124L-35.622-30.124L-35.622-30.476Q-35.280-30.476-35.061-30.529Q-34.841-30.583-34.841-30.793L-34.841-33.166Q-34.841-33.669-34.983-33.977Q-35.124-34.284-35.564-34.284Q-36.140-34.284-36.516-33.820Q-36.892-33.356-36.892-32.766L-36.892-30.793Q-36.892-30.583-36.672-30.529Q-36.452-30.476-36.111-30.476L-36.111-30.124L-38.401-30.124L-38.401-30.476Q-38.059-30.476-37.839-30.529Q-37.619-30.583-37.619-30.793L-37.619-33.166Q-37.619-33.654-37.761-33.969Q-37.903-34.284-38.342-34.284Q-38.923-34.284-39.297-33.820Q-39.670-33.356-39.670-32.766L-39.670-30.793Q-39.670-30.583-39.450-30.529Q-39.231-30.476-38.894-30.476L-38.894-30.124M-30.661-30.012Q-31.272-30.012-31.782-30.332Q-32.292-30.651-32.583-31.186Q-32.873-31.721-32.873-32.316Q-32.873-32.902-32.607-33.430Q-32.341-33.957-31.865-34.282Q-31.389-34.606-30.803-34.606Q-30.344-34.606-30.005-34.453Q-29.665-34.299-29.445-34.025Q-29.226-33.752-29.113-33.381Q-29.001-33.010-29.001-32.565Q-29.001-32.434-29.104-32.434L-31.999-32.434L-31.999-32.326Q-31.999-31.496-31.665-30.900Q-31.330-30.305-30.573-30.305Q-30.266-30.305-30.005-30.441Q-29.743-30.578-29.550-30.822Q-29.358-31.066-29.289-31.345Q-29.279-31.379-29.253-31.406Q-29.226-31.433-29.192-31.433L-29.104-31.433Q-29.001-31.433-29.001-31.306Q-29.143-30.739-29.611-30.375Q-30.080-30.012-30.661-30.012M-31.989-32.683L-29.709-32.683Q-29.709-33.059-29.814-33.444Q-29.919-33.830-30.163-34.086Q-30.407-34.343-30.803-34.343Q-31.369-34.343-31.679-33.813Q-31.989-33.283-31.989-32.683",[998],[975,2928,2929,2932],{"style":981},[983,2930],{"fill":985,"d":2931},"M16.155-71.87h-77.358a4 4 0 0 0-4 4v7.206a4 4 0 0 0 4 4h77.358a4 4 0 0 0 4-4v-7.206a4 4 0 0 0-4-4Zm-81.358 15.206",[975,2933,2935],{"transform":2934},"translate(23.262 -31.818)",[983,2936],{"d":2937,"fill":977,"stroke":977,"className":2938,"style":999},"M-48.264-28.703Q-48.264-28.947-48.095-29.125Q-47.927-29.304-47.683-29.304Q-47.522-29.304-47.412-29.204Q-47.302-29.103-47.302-28.942Q-47.302-28.752-47.422-28.598Q-47.541-28.444-47.722-28.395Q-47.546-28.332-47.370-28.332Q-46.945-28.332-46.633-28.725Q-46.320-29.118-46.194-29.606L-45.251-33.366Q-45.183-33.654-45.183-33.854Q-45.183-34.284-45.481-34.284Q-45.920-34.284-46.250-33.886Q-46.579-33.488-46.784-32.966Q-46.804-32.902-46.862-32.902L-46.980-32.902Q-47.063-32.902-47.063-32.995L-47.063-33.024Q-46.838-33.625-46.423-34.084Q-46.008-34.543-45.461-34.543Q-45.046-34.543-44.780-34.284Q-44.514-34.025-44.514-33.625Q-44.514-33.483-44.543-33.342L-45.490-29.543Q-45.593-29.138-45.881-28.801Q-46.169-28.464-46.569-28.269Q-46.970-28.073-47.390-28.073Q-47.727-28.073-47.995-28.234Q-48.264-28.395-48.264-28.703M-45.100-36.184Q-45.100-36.403-44.929-36.569Q-44.758-36.735-44.543-36.735Q-44.372-36.735-44.262-36.630Q-44.153-36.525-44.153-36.364Q-44.153-36.140-44.331-35.971Q-44.509-35.803-44.724-35.803Q-44.885-35.803-44.992-35.915Q-45.100-36.027-45.100-36.184",[998],[975,2940,2941,2944],{"style":981},[983,2942],{"fill":985,"d":2943},"M73.061-71.38H9.929a4 4 0 0 0-4 4v6.226a4 4 0 0 0 4 4h63.132a4 4 0 0 0 4-4v-6.226a4 4 0 0 0-4-4ZM5.929-57.154",[975,2945,2947,2954,2960],{"stroke":985,"fontFamily":2946,"fontSize":1373},"cmsy10",[975,2948,2950],{"transform":2949},"translate(82.96 -31.921)",[983,2951],{"d":2952,"fill":977,"stroke":977,"className":2953,"style":999},"M-47.292-32.624Q-47.292-32.766-47.219-32.893Q-47.146-33.020-47.016-33.098Q-46.887-33.176-46.740-33.176Q-46.599-33.176-46.469-33.098Q-46.340-33.020-46.267-32.893Q-46.194-32.766-46.194-32.624Q-46.194-32.399-46.352-32.236Q-46.511-32.072-46.740-32.072Q-46.965-32.072-47.129-32.236Q-47.292-32.399-47.292-32.624",[998],[975,2955,2956],{"transform":2949},[983,2957],{"d":2958,"fill":977,"stroke":977,"className":2959,"style":999},"M-42.848-32.624Q-42.848-32.766-42.775-32.893Q-42.702-33.020-42.572-33.098Q-42.443-33.176-42.296-33.176Q-42.155-33.176-42.025-33.098Q-41.896-33.020-41.823-32.893Q-41.750-32.766-41.750-32.624Q-41.750-32.399-41.908-32.236Q-42.067-32.072-42.296-32.072Q-42.521-32.072-42.685-32.236Q-42.848-32.399-42.848-32.624",[998],[975,2961,2962],{"transform":2949},[983,2963],{"d":2964,"fill":977,"stroke":977,"className":2965,"style":999},"M-38.403-32.624Q-38.403-32.766-38.330-32.893Q-38.257-33.020-38.127-33.098Q-37.998-33.176-37.851-33.176Q-37.710-33.176-37.580-33.098Q-37.451-33.020-37.378-32.893Q-37.305-32.766-37.305-32.624Q-37.305-32.399-37.463-32.236Q-37.622-32.072-37.851-32.072Q-38.076-32.072-38.240-32.236Q-38.403-32.399-38.403-32.624",[998],[975,2967,2968,2971],{"fill":1133,"stroke":1134,"style":1135},[983,2969],{"d":2970},"M-6.607-44.065h-48.906a4 4 0 0 0-4 4v6.226a4 4 0 0 0 4 4h48.906a4 4 0 0 0 4-4v-6.226a4 4 0 0 0-4-4ZM-59.513-29.84",[975,2972,2974],{"transform":2973},"translate(14.572 -3.606)",[983,2975],{"d":2976,"fill":977,"stroke":977,"className":2977,"style":999},"M-43.923-30.124L-47.204-30.124L-47.204-30.476Q-45.954-30.476-45.954-30.793L-45.954-36.042Q-46.472-35.793-47.263-35.793L-47.263-36.145Q-46.037-36.145-45.412-36.784L-45.271-36.784Q-45.236-36.784-45.205-36.757Q-45.173-36.730-45.173-36.696L-45.173-30.793Q-45.173-30.476-43.923-30.476",[998],[975,2979,2980,2983],{"style":981},[983,2981],{"fill":985,"d":2982},"M73.061-44.065H9.929a4 4 0 0 0-4 4v6.226a4 4 0 0 0 4 4h63.132a4 4 0 0 0 4-4v-6.226a4 4 0 0 0-4-4ZM5.929-29.84",[975,2984,2985,2991,2996],{"stroke":985,"fontFamily":2946,"fontSize":1373},[975,2986,2988],{"transform":2987},"translate(82.96 -4.606)",[983,2989],{"d":2952,"fill":977,"stroke":977,"className":2990,"style":999},[998],[975,2992,2993],{"transform":2987},[983,2994],{"d":2958,"fill":977,"stroke":977,"className":2995,"style":999},[998],[975,2997,2998],{"transform":2987},[983,2999],{"d":2964,"fill":977,"stroke":977,"className":3000,"style":999},[998],[975,3002,3003,3006],{"fill":1366,"stroke":1366,"style":1135},[983,3004],{"fill":985,"d":3005},"M-3.745-58.292c-5.229 6.618-9.806 9.67-16.77 11.626",[983,3007],{"fill":985,"d":3008,"style":3009},"M-17.127-43.624c-1.158-2.071-2.644-2.785-3.966-2.88 1.08-.769 1.976-2.152 1.887-4.524","stroke-linecap:round;stroke-linejoin:round;stroke-width:1.199928",[975,3011,3012],{"fill":1366,"stroke":1366},[975,3013,3014,3021,3027],{"fill":1366,"stroke":985,"fontFamily":1347,"fontSize":1348},[975,3015,3017],{"transform":3016},"translate(54.215 -20.289)",[983,3018],{"d":3019,"fill":1366,"stroke":1366,"className":3020,"style":1356},"M-47.851-30.132L-47.851-31.354Q-47.851-31.382-47.819-31.413Q-47.788-31.444-47.765-31.444L-47.659-31.444Q-47.589-31.444-47.573-31.382Q-47.511-31.061-47.372-30.821Q-47.234-30.581-47.001-30.440Q-46.769-30.300-46.460-30.300Q-46.222-30.300-46.013-30.360Q-45.804-30.421-45.667-30.569Q-45.530-30.718-45.530-30.964Q-45.530-31.218-45.741-31.384Q-45.952-31.550-46.222-31.604L-46.843-31.718Q-47.249-31.796-47.550-32.052Q-47.851-32.308-47.851-32.683Q-47.851-33.050-47.650-33.272Q-47.448-33.495-47.124-33.593Q-46.800-33.690-46.460-33.690Q-45.995-33.690-45.698-33.483L-45.476-33.667Q-45.452-33.690-45.421-33.690L-45.370-33.690Q-45.339-33.690-45.312-33.663Q-45.284-33.636-45.284-33.604L-45.284-32.620Q-45.284-32.589-45.310-32.560Q-45.335-32.530-45.370-32.530L-45.476-32.530Q-45.511-32.530-45.538-32.558Q-45.566-32.585-45.566-32.620Q-45.566-33.019-45.818-33.239Q-46.069-33.460-46.468-33.460Q-46.823-33.460-47.107-33.337Q-47.390-33.214-47.390-32.909Q-47.390-32.690-47.189-32.558Q-46.987-32.425-46.741-32.382L-46.116-32.269Q-45.687-32.179-45.378-31.882Q-45.069-31.585-45.069-31.171Q-45.069-30.601-45.468-30.323Q-45.866-30.046-46.460-30.046Q-47.011-30.046-47.362-30.382L-47.659-30.069Q-47.683-30.046-47.718-30.046L-47.765-30.046Q-47.788-30.046-47.819-30.077Q-47.851-30.108-47.851-30.132M-42.956-30.155L-44.027-33.011Q-44.093-33.190-44.224-33.233Q-44.355-33.276-44.612-33.276L-44.612-33.573L-42.933-33.573L-42.933-33.276Q-43.382-33.276-43.382-33.077Q-43.378-33.061-43.376-33.044Q-43.374-33.026-43.374-33.011L-42.581-30.917L-41.870-32.827Q-41.905-32.921-41.905-32.966Q-41.905-33.011-41.941-33.011Q-42.007-33.190-42.138-33.233Q-42.269-33.276-42.523-33.276L-42.523-33.573L-40.933-33.573L-40.933-33.276Q-41.382-33.276-41.382-33.077Q-41.378-33.058-41.376-33.040Q-41.374-33.022-41.374-33.011L-40.542-30.796L-39.788-32.796Q-39.765-32.854-39.765-32.925Q-39.765-33.085-39.902-33.181Q-40.038-33.276-40.206-33.276L-40.206-33.573L-38.819-33.573L-38.819-33.276Q-39.054-33.276-39.232-33.149Q-39.409-33.022-39.491-32.796L-40.476-30.155Q-40.530-30.046-40.644-30.046L-40.702-30.046Q-40.816-30.046-40.859-30.155L-41.718-32.429L-42.573-30.155Q-42.612-30.046-42.734-30.046L-42.788-30.046Q-42.902-30.046-42.956-30.155",[998],[975,3022,3023],{"transform":3016},[983,3024],{"d":3025,"fill":1366,"stroke":1366,"className":3026,"style":1356},"M-38.540-30.956Q-38.540-31.440-38.138-31.735Q-37.735-32.030-37.185-32.149Q-36.634-32.269-36.142-32.269L-36.142-32.558Q-36.142-32.784-36.257-32.991Q-36.372-33.198-36.569-33.317Q-36.767-33.436-36.997-33.436Q-37.423-33.436-37.708-33.331Q-37.638-33.304-37.591-33.249Q-37.544-33.194-37.519-33.124Q-37.493-33.054-37.493-32.979Q-37.493-32.874-37.544-32.782Q-37.595-32.690-37.687-32.640Q-37.778-32.589-37.884-32.589Q-37.989-32.589-38.081-32.640Q-38.173-32.690-38.224-32.782Q-38.274-32.874-38.274-32.979Q-38.274-33.397-37.886-33.544Q-37.497-33.690-36.997-33.690Q-36.665-33.690-36.312-33.560Q-35.958-33.429-35.730-33.175Q-35.501-32.921-35.501-32.573L-35.501-30.772Q-35.501-30.640-35.429-30.530Q-35.356-30.421-35.228-30.421Q-35.103-30.421-35.034-30.526Q-34.966-30.632-34.966-30.772L-34.966-31.284L-34.685-31.284L-34.685-30.772Q-34.685-30.569-34.802-30.411Q-34.919-30.253-35.101-30.169Q-35.282-30.085-35.485-30.085Q-35.716-30.085-35.868-30.257Q-36.021-30.429-36.052-30.659Q-36.212-30.378-36.521-30.212Q-36.829-30.046-37.181-30.046Q-37.692-30.046-38.116-30.269Q-38.540-30.491-38.540-30.956M-37.853-30.956Q-37.853-30.671-37.626-30.485Q-37.399-30.300-37.106-30.300Q-36.860-30.300-36.636-30.417Q-36.411-30.534-36.276-30.737Q-36.142-30.940-36.142-31.194L-36.142-32.026Q-36.407-32.026-36.692-31.972Q-36.978-31.917-37.249-31.788Q-37.521-31.659-37.687-31.452Q-37.853-31.245-37.853-30.956M-32.509-28.573L-34.364-28.573L-34.364-28.866Q-34.095-28.866-33.927-28.911Q-33.759-28.956-33.759-29.132L-33.759-32.956Q-33.759-33.163-33.915-33.216Q-34.071-33.269-34.364-33.269L-34.364-33.565L-33.142-33.651L-33.142-33.186Q-32.911-33.409-32.597-33.530Q-32.282-33.651-31.942-33.651Q-31.470-33.651-31.065-33.405Q-30.661-33.159-30.429-32.743Q-30.196-32.327-30.196-31.851Q-30.196-31.476-30.345-31.147Q-30.493-30.819-30.763-30.567Q-31.032-30.315-31.376-30.181Q-31.720-30.046-32.079-30.046Q-32.368-30.046-32.640-30.167Q-32.911-30.288-33.118-30.499L-33.118-29.132Q-33.118-28.956-32.950-28.911Q-32.782-28.866-32.509-28.866L-32.509-28.573M-33.118-32.788L-33.118-30.948Q-32.966-30.659-32.704-30.479Q-32.442-30.300-32.134-30.300Q-31.849-30.300-31.626-30.438Q-31.403-30.577-31.251-30.808Q-31.099-31.038-31.021-31.310Q-30.942-31.581-30.942-31.851Q-30.942-32.183-31.067-32.540Q-31.192-32.897-31.440-33.134Q-31.688-33.370-32.036-33.370Q-32.360-33.370-32.655-33.214Q-32.950-33.058-33.118-32.788",[998],[975,3028,3029],{"transform":3016},[983,3030],{"d":3031,"fill":1366,"stroke":1366,"className":3032,"style":1356},"M-24.973-30.124L-26.751-30.124L-26.751-30.421Q-26.477-30.421-26.309-30.468Q-26.141-30.515-26.141-30.683L-26.141-32.819Q-26.141-33.034-26.198-33.130Q-26.255-33.226-26.368-33.247Q-26.481-33.269-26.727-33.269L-26.727-33.565L-25.528-33.651L-25.528-30.683Q-25.528-30.515-25.382-30.468Q-25.235-30.421-24.973-30.421L-24.973-30.124M-26.415-35.046Q-26.415-35.237-26.280-35.368Q-26.145-35.499-25.950-35.499Q-25.829-35.499-25.725-35.436Q-25.622-35.374-25.559-35.270Q-25.497-35.167-25.497-35.046Q-25.497-34.851-25.628-34.716Q-25.759-34.581-25.950-34.581Q-26.149-34.581-26.282-34.714Q-26.415-34.847-26.415-35.046M-22.544-30.124L-24.399-30.124L-24.399-30.421Q-24.126-30.421-23.958-30.468Q-23.790-30.515-23.790-30.683L-23.790-32.819Q-23.790-33.034-23.852-33.130Q-23.915-33.226-24.034-33.247Q-24.153-33.269-24.399-33.269L-24.399-33.565L-23.208-33.651L-23.208-32.917Q-23.094-33.132-22.901-33.300Q-22.708-33.468-22.469-33.560Q-22.231-33.651-21.977-33.651Q-20.809-33.651-20.809-32.573L-20.809-30.683Q-20.809-30.515-20.639-30.468Q-20.469-30.421-20.200-30.421L-20.200-30.124L-22.055-30.124L-22.055-30.421Q-21.782-30.421-21.614-30.468Q-21.446-30.515-21.446-30.683L-21.446-32.558Q-21.446-32.940-21.567-33.169Q-21.688-33.397-22.040-33.397Q-22.352-33.397-22.606-33.235Q-22.860-33.073-23.007-32.804Q-23.153-32.534-23.153-32.237L-23.153-30.683Q-23.153-30.515-22.983-30.468Q-22.813-30.421-22.544-30.421",[998],[1220,3034,3036,3037,3052,3053,1501],{"className":3035},[1223],"Exchange argument swapping activity ",[481,3038,3040],{"className":3039},[484],[481,3041,3043],{"className":3042,"ariaHidden":489},[488],[481,3044,3046,3049],{"className":3045},[493],[481,3047],{"className":3048,"style":1758},[497],[481,3050,1763],{"className":3051,"style":1762},[502,503]," for the earliest-finishing activity ",[481,3054,3056],{"className":3055},[484],[481,3057,3059],{"className":3058,"ariaHidden":489},[488],[481,3060,3062,3065],{"className":3061},[493],[481,3063],{"className":3064,"style":1314},[497],[481,3066,418],{"className":3067},[502],[381,3069,3070,3071,3074,3075,3090,3091,3143,3144],{},"With the greedy-choice lemma in hand, ",[385,3072,3073],{},"optimal substructure"," completes the\nproof by induction. After committing to activity ",[481,3076,3078],{"className":3077},[484],[481,3079,3081],{"className":3080,"ariaHidden":489},[488],[481,3082,3084,3087],{"className":3083},[493],[481,3085],{"className":3086,"style":1314},[497],[481,3088,418],{"className":3089},[502],", every remaining feasible\nactivity must start at or after ",[481,3092,3094],{"className":3093},[484],[481,3095,3097],{"className":3096,"ariaHidden":489},[488],[481,3098,3100,3103],{"className":3099},[493],[481,3101],{"className":3102,"style":610},[497],[481,3104,3106,3109],{"className":3105},[502],[481,3107,618],{"className":3108,"style":617},[502,503],[481,3110,3112],{"className":3111},[550],[481,3113,3115,3135],{"className":3114},[554,555],[481,3116,3118,3132],{"className":3117},[559],[481,3119,3121],{"className":3120,"style":2155},[563],[481,3122,3123,3126],{"style":633},[481,3124],{"className":3125,"style":572},[571],[481,3127,3129],{"className":3128},[576,577,578,579],[481,3130,418],{"className":3131},[502,579],[481,3133,587],{"className":3134},[586],[481,3136,3138],{"className":3137},[559],[481,3139,3141],{"className":3140,"style":594},[563],[481,3142],{},"; the leftover problem is just\nactivity selection on that smaller set, which the same rule solves optimally by\nthe induction hypothesis. The greedy choice plus the optimal subsolution is\noptimal for the whole. ",[481,3145,3147],{"className":3146},[484],[481,3148,3150],{"className":3149,"ariaHidden":489},[488],[481,3151,3153,3156],{"className":3152},[493],[481,3154],{"className":3155,"style":2861},[497],[481,3157,2866],{"className":3158},[502,2865],[381,3160,3161,3162,3165,3166,3169,3170,3173,3174,3177,3178,3181],{},"This two-step shape, ",[385,3163,3164],{},"(1)"," an exchange argument for the greedy-choice\nproperty and ",[385,3167,3168],{},"(2)"," induction via optimal substructure, is the template for\n",[390,3171,3172],{},"every"," greedy correctness proof in this course, ",[412,3175,3176],{"href":222},"Huffman codes"," and ",[412,3179,3180],{"href":170},"minimum\nspanning trees"," included.",[420,3183,3185],{"id":3184},"when-greedy-fails-the-01-knapsack","When greedy fails: the 0\u002F1 knapsack",[381,3187,3188,3189,3192,3193,3177,3210,3225,3226,3241,3242,3297,3298,3352],{},"Greed is not a universal solvent, and the cleanest way to feel its limits is the\n",[385,3190,3191],{},"knapsack problem",". We have a knapsack of capacity ",[481,3194,3196],{"className":3195},[484],[481,3197,3199],{"className":3198,"ariaHidden":489},[488],[481,3200,3202,3205],{"className":3201},[493],[481,3203],{"className":3204,"style":951},[497],[481,3206,3209],{"className":3207,"style":3208},[502,503],"margin-right:0.1389em;","W",[481,3211,3213],{"className":3212},[484],[481,3214,3216],{"className":3215,"ariaHidden":489},[488],[481,3217,3219,3222],{"className":3218},[493],[481,3220],{"className":3221,"style":498},[497],[481,3223,504],{"className":3224},[502,503]," items, item ",[481,3227,3229],{"className":3228},[484],[481,3230,3232],{"className":3231,"ariaHidden":489},[488],[481,3233,3235,3238],{"className":3234},[493],[481,3236],{"className":3237,"style":521},[497],[481,3239,525],{"className":3240},[502,503],"\nhaving weight ",[481,3243,3245],{"className":3244},[484],[481,3246,3248],{"className":3247,"ariaHidden":489},[488],[481,3249,3251,3254],{"className":3250},[493],[481,3252],{"className":3253,"style":539},[497],[481,3255,3257,3262],{"className":3256},[502],[481,3258,3261],{"className":3259,"style":3260},[502,503],"margin-right:0.0269em;","w",[481,3263,3265],{"className":3264},[550],[481,3266,3268,3289],{"className":3267},[554,555],[481,3269,3271,3286],{"className":3270},[559],[481,3272,3274],{"className":3273,"style":564},[563],[481,3275,3277,3280],{"style":3276},"top:-2.55em;margin-left:-0.0269em;margin-right:0.05em;",[481,3278],{"className":3279,"style":572},[571],[481,3281,3283],{"className":3282},[576,577,578,579],[481,3284,525],{"className":3285},[502,503,579],[481,3287,587],{"className":3288},[586],[481,3290,3292],{"className":3291},[559],[481,3293,3295],{"className":3294,"style":594},[563],[481,3296],{}," and value ",[481,3299,3301],{"className":3300},[484],[481,3302,3304],{"className":3303,"ariaHidden":489},[488],[481,3305,3307,3310],{"className":3306},[493],[481,3308],{"className":3309,"style":539},[497],[481,3311,3313,3317],{"className":3312},[502],[481,3314,3316],{"className":3315,"style":1276},[502,503],"v",[481,3318,3320],{"className":3319},[550],[481,3321,3323,3344],{"className":3322},[554,555],[481,3324,3326,3341],{"className":3325},[559],[481,3327,3329],{"className":3328,"style":564},[563],[481,3330,3332,3335],{"style":3331},"top:-2.55em;margin-left:-0.0359em;margin-right:0.05em;",[481,3333],{"className":3334,"style":572},[571],[481,3336,3338],{"className":3337},[576,577,578,579],[481,3339,525],{"className":3340},[502,503,579],[481,3342,587],{"className":3343},[586],[481,3345,3347],{"className":3346},[559],[481,3348,3350],{"className":3349,"style":594},[563],[481,3351],{},". We want the most valuable load that fits.",[381,3354,3355,3356,3359,3360,3363,3364,3460,3461,3469],{},"In the ",[385,3357,3358],{},"fractional knapsack",", we may take ",[390,3361,3362],{},"any fraction"," of an item. Here\ngreed works perfectly: sort by value density ",[481,3365,3367],{"className":3366},[484],[481,3368,3370],{"className":3369,"ariaHidden":489},[488],[481,3371,3373,3376,3416,3420],{"className":3372},[493],[481,3374],{"className":3375,"style":667},[497],[481,3377,3379,3382],{"className":3378},[502],[481,3380,3316],{"className":3381,"style":1276},[502,503],[481,3383,3385],{"className":3384},[550],[481,3386,3388,3408],{"className":3387},[554,555],[481,3389,3391,3405],{"className":3390},[559],[481,3392,3394],{"className":3393,"style":564},[563],[481,3395,3396,3399],{"style":3331},[481,3397],{"className":3398,"style":572},[571],[481,3400,3402],{"className":3401},[576,577,578,579],[481,3403,525],{"className":3404},[502,503,579],[481,3406,587],{"className":3407},[586],[481,3409,3411],{"className":3410},[559],[481,3412,3414],{"className":3413,"style":594},[563],[481,3415],{},[481,3417,3419],{"className":3418},[502],"\u002F",[481,3421,3423,3426],{"className":3422},[502],[481,3424,3261],{"className":3425,"style":3260},[502,503],[481,3427,3429],{"className":3428},[550],[481,3430,3432,3452],{"className":3431},[554,555],[481,3433,3435,3449],{"className":3434},[559],[481,3436,3438],{"className":3437,"style":564},[563],[481,3439,3440,3443],{"style":3276},[481,3441],{"className":3442,"style":572},[571],[481,3444,3446],{"className":3445},[576,577,578,579],[481,3447,525],{"className":3448},[502,503,579],[481,3450,587],{"className":3451},[586],[481,3453,3455],{"className":3454},[559],[481,3456,3458],{"className":3457,"style":594},[563],[481,3459],{},", and greedily fill with\nthe densest item, taking a fraction of the last one to top off the capacity\nexactly.",[409,3462,3463],{},[412,3464,3468],{"href":3465,"ariaDescribedBy":3466,"dataFootnoteRef":376,"id":3467},"#user-content-fn-skiena-greedy",[416],"user-content-fnref-skiena-greedy","4"," An exchange argument proves it: any optimal solution that takes less\nof a denser item and more of a sparser one can be nudged toward the greedy\nchoice without losing value.",[381,3471,3355,3472,3475,3476,3479,3480,3513],{},[385,3473,3474],{},"0\u002F1 knapsack",", each item is all-or-nothing: take it whole or leave it.\nAnd here the ",[390,3477,3478],{},"same"," density rule collapses. Consider ",[481,3481,3483],{"className":3482},[484],[481,3484,3486,3504],{"className":3485,"ariaHidden":489},[488],[481,3487,3489,3492,3495,3498,3501],{"className":3488},[493],[481,3490],{"className":3491,"style":951},[497],[481,3493,3209],{"className":3494,"style":3208},[502,503],[481,3496],{"className":3497,"style":879},[721],[481,3499,1828],{"className":3500},[883],[481,3502],{"className":3503,"style":879},[721],[481,3505,3507,3510],{"className":3506},[493],[481,3508],{"className":3509,"style":1314},[497],[481,3511,1373],{"className":3512},[502]," and:",[3515,3516,3517,3557],"table",{},[3518,3519,3520],"thead",{},[3521,3522,3523,3527,3530,3533],"tr",{},[3524,3525,3526],"th",{},"Item",[3524,3528,3529],{},"Weight",[3524,3531,3532],{},"Value",[3524,3534,3535,3536],{},"Density ",[481,3537,3539],{"className":3538},[484],[481,3540,3542],{"className":3541,"ariaHidden":489},[488],[481,3543,3545,3548,3551,3554],{"className":3544},[493],[481,3546],{"className":3547,"style":667},[497],[481,3549,3316],{"className":3550,"style":1276},[502,503],[481,3552,3419],{"className":3553},[502],[481,3555,3261],{"className":3556,"style":3260},[502,503],[3558,3559,3560,3574,3586],"tbody",{},[3521,3561,3562,3565,3568,3571],{},[3563,3564,418],"td",{},[3563,3566,3567],{},"6",[3563,3569,3570],{},"12",[3563,3572,3573],{},"2.0",[3521,3575,3576,3578,3580,3583],{},[3563,3577,450],{},[3563,3579,1444],{},[3563,3581,3582],{},"9",[3563,3584,3585],{},"1.8",[3521,3587,3588,3590,3592,3594],{},[3563,3589,1496],{},[3563,3591,1444],{},[3563,3593,3582],{},[3563,3595,3585],{},[381,3597,3598,3599,3614,3615,3630,3631,3646,3647,3650,3651,3666,3667,3682,3683,3702,3703,3177,3718,3733,3734,3749,3750,3769],{},"Greedy by density grabs item ",[481,3600,3602],{"className":3601},[484],[481,3603,3605],{"className":3604,"ariaHidden":489},[488],[481,3606,3608,3611],{"className":3607},[493],[481,3609],{"className":3610,"style":1314},[497],[481,3612,418],{"className":3613},[502]," (value ",[481,3616,3618],{"className":3617},[484],[481,3619,3621],{"className":3620,"ariaHidden":489},[488],[481,3622,3624,3627],{"className":3623},[493],[481,3625],{"className":3626,"style":1314},[497],[481,3628,3570],{"className":3629},[502],", weight ",[481,3632,3634],{"className":3633},[484],[481,3635,3637],{"className":3636,"ariaHidden":489},[488],[481,3638,3640,3643],{"className":3639},[493],[481,3641],{"className":3642,"style":1314},[497],[481,3644,3567],{"className":3645},[502],"), then ",[390,3648,3649],{},"cannot"," fit\neither remaining item, since both need weight ",[481,3652,3654],{"className":3653},[484],[481,3655,3657],{"className":3656,"ariaHidden":489},[488],[481,3658,3660,3663],{"className":3659},[493],[481,3661],{"className":3662,"style":1314},[497],[481,3664,1444],{"className":3665},[502]," but only ",[481,3668,3670],{"className":3669},[484],[481,3671,3673],{"className":3672,"ariaHidden":489},[488],[481,3674,3676,3679],{"className":3675},[493],[481,3677],{"className":3678,"style":1314},[497],[481,3680,3468],{"className":3681},[502]," is left. It returns\nvalue ",[481,3684,3686],{"className":3685},[484],[481,3687,3689],{"className":3688,"ariaHidden":489},[488],[481,3690,3692,3695],{"className":3691},[493],[481,3693],{"className":3694,"style":1314},[497],[481,3696,3698],{"className":3697},[502],[481,3699,3570],{"className":3700},[502,3701],"mathbf",". Yet items ",[481,3704,3706],{"className":3705},[484],[481,3707,3709],{"className":3708,"ariaHidden":489},[488],[481,3710,3712,3715],{"className":3711},[493],[481,3713],{"className":3714,"style":1314},[497],[481,3716,450],{"className":3717},[502],[481,3719,3721],{"className":3720},[484],[481,3722,3724],{"className":3723,"ariaHidden":489},[488],[481,3725,3727,3730],{"className":3726},[493],[481,3728],{"className":3729,"style":1314},[497],[481,3731,1496],{"className":3732},[502]," together weigh exactly ",[481,3735,3737],{"className":3736},[484],[481,3738,3740],{"className":3739,"ariaHidden":489},[488],[481,3741,3743,3746],{"className":3742},[493],[481,3744],{"className":3745,"style":1314},[497],[481,3747,1373],{"className":3748},[502]," and are\nworth ",[481,3751,3753],{"className":3752},[484],[481,3754,3756],{"className":3755,"ariaHidden":489},[488],[481,3757,3759,3762],{"className":3758},[493],[481,3760],{"className":3761,"style":1314},[497],[481,3763,3765],{"className":3764},[502],[481,3766,3768],{"className":3767},[502,3701],"18",". Greedy loses by a mile.",[962,3771,3773,4111],{"className":3772},[965,966],[968,3774,3778],{"xmlns":970,"width":3775,"height":3776,"viewBox":3777},"246.253","236.290","-75 -75 184.690 177.218",[975,3779,3780,3783,3787,3790,3807,3858,3887,3914,3935,3938,3941,3944,3947,3961,3975,4020,4063,4090],{"stroke":977,"style":978},[983,3781],{"fill":985,"d":3782,"style":981},"M-57.415 83.97V-58.292h51.214V83.971ZM-6.201-58.292",[983,3784],{"fill":985,"stroke":3785,"d":3786},"silver","M-57.415 55.518h51.214M-57.415 27.065h51.214M-57.415-1.387h51.214M-57.415-29.84h51.214",[983,3788],{"fill":1365,"stroke":977,"d":3789,"style":981},"M-57.415 83.97V-1.386h51.214V83.97ZM-6.201-1.386",[975,3791,3793,3801],{"stroke":985,"fontFamily":3792,"fontSize":3582},"cmr9",[975,3794,3796],{"transform":3795},"translate(12.758 -39.668)",[983,3797],{"d":3798,"fill":977,"stroke":977,"className":3799,"style":3800},"M-55.121 83.971L-57.107 83.971L-57.107 83.655Q-56.800 83.655-56.609 83.602Q-56.417 83.549-56.417 83.360L-56.417 80.912Q-56.417 80.666-56.483 80.561Q-56.549 80.455-56.675 80.431Q-56.800 80.407-57.072 80.407L-57.072 80.091L-55.741 79.994L-55.741 83.360Q-55.741 83.554-55.576 83.604Q-55.411 83.655-55.121 83.655L-55.121 83.971M-56.721 78.447Q-56.721 78.241-56.571 78.091Q-56.422 77.942-56.220 77.942Q-56.088 77.942-55.971 78.012Q-55.855 78.082-55.785 78.199Q-55.714 78.315-55.714 78.447Q-55.714 78.649-55.864 78.799Q-56.013 78.948-56.220 78.948Q-56.422 78.948-56.571 78.799Q-56.721 78.649-56.721 78.447M-53.913 82.899L-53.913 80.407L-54.677 80.407L-54.677 80.148Q-54.273 80.148-54.007 79.882Q-53.741 79.616-53.620 79.216Q-53.499 78.816-53.499 78.434L-53.209 78.434L-53.209 80.091L-51.922 80.091L-51.922 80.407L-53.209 80.407L-53.209 82.864Q-53.209 83.233-53.084 83.507Q-52.959 83.782-52.634 83.782Q-52.335 83.782-52.196 83.488Q-52.058 83.193-52.058 82.864L-52.058 82.341L-51.772 82.341L-51.772 82.899Q-51.772 83.176-51.882 83.448Q-51.992 83.721-52.205 83.896Q-52.418 84.072-52.700 84.072Q-53.060 84.072-53.332 83.934Q-53.605 83.795-53.759 83.532Q-53.913 83.268-53.913 82.899M-48.947 84.072Q-49.505 84.072-49.977 83.789Q-50.450 83.505-50.724 83.028Q-50.999 82.552-50.999 81.998Q-50.999 81.602-50.856 81.227Q-50.713 80.851-50.456 80.563Q-50.199 80.275-49.841 80.106Q-49.483 79.937-49.079 79.937Q-48.534 79.937-48.162 80.174Q-47.791 80.411-47.604 80.829Q-47.417 81.246-47.417 81.783Q-47.417 81.835-47.442 81.873Q-47.466 81.910-47.514 81.910L-50.186 81.910L-50.186 81.989Q-50.186 82.736-49.874 83.259Q-49.562 83.782-48.863 83.782Q-48.459 83.782-48.138 83.525Q-47.817 83.268-47.694 82.864Q-47.677 82.784-47.593 82.784L-47.514 82.784Q-47.475 82.784-47.446 82.815Q-47.417 82.846-47.417 82.890L-47.417 82.925Q-47.523 83.268-47.745 83.527Q-47.967 83.786-48.281 83.929Q-48.595 84.072-48.947 84.072M-50.177 81.659L-48.063 81.659Q-48.063 81.391-48.116 81.145Q-48.169 80.899-48.290 80.677Q-48.411 80.455-48.608 80.328Q-48.806 80.200-49.079 80.200Q-49.421 80.200-49.674 80.425Q-49.927 80.649-50.052 80.987Q-50.177 81.325-50.177 81.659M-44.759 83.971L-46.846 83.971L-46.846 83.655Q-46.539 83.655-46.347 83.602Q-46.156 83.549-46.156 83.360L-46.156 80.912Q-46.156 80.671-46.227 80.563Q-46.297 80.455-46.431 80.431Q-46.565 80.407-46.846 80.407L-46.846 80.091L-45.506 79.994L-45.506 80.829Q-45.308 80.451-44.948 80.222Q-44.587 79.994-44.165 79.994Q-43.120 79.994-42.935 80.803Q-42.733 80.433-42.375 80.214Q-42.017 79.994-41.599 79.994Q-40.975 79.994-40.650 80.288Q-40.325 80.583-40.325 81.207L-40.325 83.360Q-40.325 83.549-40.131 83.602Q-39.938 83.655-39.630 83.655L-39.630 83.971L-41.718 83.971L-41.718 83.655Q-41.410 83.655-41.217 83.602Q-41.023 83.549-41.023 83.360L-41.023 81.242Q-41.023 80.811-41.151 80.532Q-41.278 80.253-41.665 80.253Q-42.008 80.253-42.291 80.442Q-42.575 80.631-42.731 80.943Q-42.887 81.255-42.887 81.602L-42.887 83.360Q-42.887 83.549-42.696 83.602Q-42.504 83.655-42.197 83.655L-42.197 83.971L-44.284 83.971L-44.284 83.655Q-43.972 83.655-43.781 83.602Q-43.590 83.549-43.590 83.360L-43.590 81.242Q-43.590 80.983-43.634 80.761Q-43.678 80.539-43.823 80.396Q-43.968 80.253-44.227 80.253Q-44.763 80.253-45.108 80.660Q-45.453 81.066-45.453 81.602L-45.453 83.360Q-45.453 83.549-45.260 83.602Q-45.066 83.655-44.759 83.655",[998],"stroke-width:0.270",[975,3802,3803],{"transform":3795},[983,3804],{"d":3805,"fill":977,"stroke":977,"className":3806,"style":3800},"M-32.436 83.971L-35.468 83.971L-35.468 83.655Q-34.317 83.655-34.317 83.360L-34.317 78.636Q-34.805 78.869-35.526 78.869L-35.526 78.553Q-34.396 78.553-33.834 77.977L-33.689 77.977Q-33.654 77.977-33.621 78.010Q-33.588 78.043-33.588 78.078L-33.588 83.360Q-33.588 83.655-32.436 83.655",[998],[975,3808,3810,3813],{"fill":3809},"var(--tk-bg)",[983,3811],{"stroke":985,"d":3812},"M-58.984 74.6h54.352v-9.711h-54.352Z",[975,3814,3815,3822,3828,3834,3840,3846,3852],{"fill":977,"stroke":985,"fontSize":1348},[975,3816,3818],{"transform":3817},"translate(-.069 -12.426)",[983,3819],{"d":3820,"fill":977,"stroke":977,"className":3821,"style":1356},"M-56.470 83.002Q-56.470 82.760-56.397 82.485Q-56.325 82.209-56.204 81.887Q-56.083 81.565-56.001 81.354Q-55.911 81.131-55.911 80.948Q-55.911 80.698-56.079 80.698Q-56.395 80.698-56.604 81.004Q-56.813 81.311-56.919 81.698Q-56.931 81.772-57.001 81.772L-57.102 81.772Q-57.138 81.772-57.165 81.737Q-57.192 81.701-57.192 81.674L-57.192 81.643Q-57.067 81.182-56.770 80.813Q-56.474 80.444-56.063 80.444Q-55.868 80.444-55.694 80.528Q-55.520 80.612-55.419 80.764Q-55.317 80.916-55.317 81.123Q-55.317 81.276-55.376 81.412Q-55.454 81.612-55.538 81.825Q-55.622 82.037-55.696 82.262Q-55.770 82.487-55.817 82.700Q-55.864 82.912-55.864 83.100Q-55.864 83.416-55.685 83.606Q-55.505 83.795-55.185 83.795Q-54.763 83.795-54.470 83.178Q-54.477 83.123-54.477 83.018Q-54.477 82.795-54.415 82.557L-53.981 80.811Q-53.946 80.686-53.843 80.604Q-53.739 80.522-53.614 80.522Q-53.501 80.522-53.423 80.592Q-53.345 80.662-53.345 80.780Q-53.345 80.803-53.360 80.866L-53.790 82.612Q-53.864 82.932-53.864 83.123Q-53.864 83.432-53.710 83.614Q-53.556 83.795-53.255 83.795Q-52.899 83.795-52.665 83.520Q-52.431 83.244-52.263 82.834Q-52.204 82.694-52.136 82.489Q-52.067 82.284-52.020 82.082Q-51.974 81.881-51.974 81.748Q-51.974 81.522-52.042 81.410Q-52.110 81.299-52.255 81.137Q-52.399 80.975-52.399 80.873Q-52.399 80.701-52.259 80.569Q-52.118 80.436-51.958 80.436Q-51.743 80.436-51.651 80.623Q-51.560 80.811-51.560 81.049Q-51.560 81.373-51.702 81.940Q-51.845 82.506-51.989 82.858Q-52.188 83.362-52.499 83.705Q-52.810 84.049-53.263 84.049Q-53.618 84.049-53.915 83.930Q-54.212 83.811-54.360 83.537Q-54.700 84.049-55.200 84.049Q-55.759 84.049-56.114 83.795Q-56.470 83.541-56.470 83.002",[998],[975,3823,3824],{"transform":3817},[983,3825],{"d":3826,"fill":977,"stroke":977,"className":3827,"style":1356},"M-42.778 82.994L-48.091 82.994Q-48.169 82.987-48.218 82.938Q-48.266 82.889-48.266 82.811Q-48.266 82.741-48.219 82.690Q-48.173 82.639-48.091 82.627L-42.778 82.627Q-42.704 82.639-42.657 82.690Q-42.610 82.741-42.610 82.811Q-42.610 82.889-42.659 82.938Q-42.708 82.987-42.778 82.994M-42.778 81.307L-48.091 81.307Q-48.169 81.299-48.218 81.250Q-48.266 81.201-48.266 81.123Q-48.266 81.053-48.219 81.002Q-48.173 80.951-48.091 80.940L-42.778 80.940Q-42.704 80.951-42.657 81.002Q-42.610 81.053-42.610 81.123Q-42.610 81.201-42.659 81.250Q-42.708 81.299-42.778 81.307",[998],[975,3829,3830],{"transform":3817},[983,3831],{"d":3832,"fill":977,"stroke":977,"className":3833,"style":1356},"M-37.646 84.139Q-38.318 84.139-38.714 83.715Q-39.111 83.291-39.263 82.672Q-39.415 82.053-39.415 81.385Q-39.415 80.725-39.144 80.092Q-38.872 79.459-38.359 79.055Q-37.845 78.651-37.173 78.651Q-36.884 78.651-36.636 78.750Q-36.388 78.850-36.242 79.051Q-36.095 79.252-36.095 79.557Q-36.095 79.662-36.146 79.754Q-36.197 79.846-36.288 79.897Q-36.380 79.948-36.486 79.948Q-36.654 79.948-36.767 79.834Q-36.880 79.721-36.880 79.557Q-36.880 79.397-36.771 79.280Q-36.662 79.162-36.494 79.162Q-36.693 78.893-37.173 78.893Q-37.591 78.893-37.923 79.170Q-38.255 79.448-38.431 79.866Q-38.630 80.366-38.630 81.268Q-38.466 80.944-38.187 80.744Q-37.908 80.545-37.560 80.545Q-37.076 80.545-36.691 80.791Q-36.306 81.037-36.093 81.446Q-35.880 81.854-35.880 82.338Q-35.880 82.830-36.111 83.242Q-36.341 83.655-36.751 83.897Q-37.162 84.139-37.646 84.139M-37.646 83.866Q-37.220 83.866-37.003 83.645Q-36.787 83.424-36.724 83.098Q-36.662 82.772-36.662 82.338Q-36.662 82.026-36.687 81.776Q-36.712 81.526-36.802 81.301Q-36.892 81.076-37.087 80.940Q-37.283 80.803-37.599 80.803Q-37.927 80.803-38.160 81.012Q-38.392 81.221-38.503 81.539Q-38.615 81.858-38.615 82.170Q-38.611 82.209-38.609 82.242Q-38.607 82.276-38.607 82.330Q-38.607 82.346-38.609 82.354Q-38.611 82.362-38.615 82.369Q-38.615 82.944-38.388 83.405Q-38.162 83.866-37.646 83.866",[998],[975,3835,3836],{"transform":3817},[983,3837],{"d":3838,"fill":977,"stroke":977,"className":3839,"style":1356},"M-34.693 85.377Q-34.693 85.354-34.662 85.307Q-34.369 85.045-34.203 84.678Q-34.037 84.311-34.037 83.924L-34.037 83.866Q-34.165 83.971-34.333 83.971Q-34.525 83.971-34.662 83.838Q-34.798 83.705-34.798 83.506Q-34.798 83.315-34.662 83.182Q-34.525 83.049-34.333 83.049Q-34.033 83.049-33.908 83.319Q-33.783 83.588-33.783 83.924Q-33.783 84.373-33.964 84.787Q-34.146 85.201-34.486 85.498Q-34.509 85.522-34.548 85.522Q-34.595 85.522-34.644 85.477Q-34.693 85.432-34.693 85.377",[998],[975,3841,3842],{"transform":3817},[983,3843],{"d":3844,"fill":977,"stroke":977,"className":3845,"style":1356},"M-29.384 83.018Q-29.384 82.846-29.342 82.635Q-29.299 82.424-29.238 82.237Q-29.177 82.049-29.080 81.797Q-28.982 81.545-28.908 81.354Q-28.818 81.131-28.818 80.948Q-28.818 80.698-28.986 80.698Q-29.302 80.698-29.511 81.004Q-29.720 81.311-29.826 81.698Q-29.838 81.772-29.908 81.772L-30.009 81.772Q-30.045 81.772-30.072 81.737Q-30.099 81.701-30.099 81.674L-30.099 81.643Q-29.974 81.182-29.677 80.813Q-29.381 80.444-28.970 80.444Q-28.775 80.444-28.601 80.528Q-28.427 80.612-28.326 80.764Q-28.224 80.916-28.224 81.123Q-28.224 81.276-28.283 81.412Q-28.377 81.655-28.502 81.983Q-28.627 82.311-28.699 82.590Q-28.771 82.869-28.771 83.123Q-28.771 83.432-28.617 83.614Q-28.463 83.795-28.162 83.795Q-27.767 83.795-27.384 83.323Q-27.256 83.155-27.109 82.854Q-26.963 82.553-26.867 82.254Q-26.771 81.955-26.771 81.748Q-26.771 81.522-26.845 81.403Q-26.920 81.284-27.056 81.129Q-27.193 80.975-27.193 80.873Q-27.193 80.701-27.052 80.569Q-26.912 80.436-26.756 80.436Q-26.541 80.436-26.447 80.627Q-26.353 80.819-26.353 81.049Q-26.353 81.553-26.582 82.274Q-26.810 82.994-27.230 83.522Q-27.650 84.049-28.177 84.049Q-28.431 84.049-28.652 83.991Q-28.873 83.932-29.035 83.807Q-29.197 83.682-29.291 83.481Q-29.384 83.280-29.384 83.018",[998],[975,3847,3848],{"transform":3817},[983,3849],{"d":3850,"fill":977,"stroke":977,"className":3851,"style":1356},"M-17.574 82.994L-22.887 82.994Q-22.965 82.987-23.014 82.938Q-23.062 82.889-23.062 82.811Q-23.062 82.741-23.015 82.690Q-22.969 82.639-22.887 82.627L-17.574 82.627Q-17.500 82.639-17.453 82.690Q-17.406 82.741-17.406 82.811Q-17.406 82.889-17.455 82.938Q-17.504 82.987-17.574 82.994M-17.574 81.307L-22.887 81.307Q-22.965 81.299-23.014 81.250Q-23.062 81.201-23.062 81.123Q-23.062 81.053-23.015 81.002Q-22.969 80.951-22.887 80.940L-17.574 80.940Q-17.500 80.951-17.453 81.002Q-17.406 81.053-17.406 81.123Q-17.406 81.201-17.455 81.250Q-17.504 81.299-17.574 81.307",[998],[975,3853,3854],{"transform":3817},[983,3855],{"d":3856,"fill":977,"stroke":977,"className":3857,"style":1356},"M-10.969 83.971L-13.762 83.971L-13.762 83.674Q-12.700 83.674-12.700 83.412L-12.700 79.244Q-13.129 79.459-13.809 79.459L-13.809 79.162Q-12.790 79.162-12.274 78.651L-12.129 78.651Q-12.055 78.670-12.036 78.748L-12.036 83.412Q-12.036 83.674-10.969 83.674L-10.969 83.971M-6.731 83.971L-9.891 83.971L-9.891 83.764Q-9.891 83.737-9.868 83.705L-8.516 82.307Q-8.137 81.920-7.889 81.631Q-7.641 81.342-7.467 80.985Q-7.293 80.627-7.293 80.237Q-7.293 79.889-7.426 79.596Q-7.559 79.303-7.813 79.125Q-8.067 78.948-8.422 78.948Q-8.782 78.948-9.073 79.143Q-9.364 79.338-9.508 79.666L-9.454 79.666Q-9.270 79.666-9.145 79.787Q-9.020 79.909-9.020 80.100Q-9.020 80.280-9.145 80.409Q-9.270 80.537-9.454 80.537Q-9.633 80.537-9.762 80.409Q-9.891 80.280-9.891 80.100Q-9.891 79.698-9.670 79.362Q-9.450 79.026-9.084 78.838Q-8.719 78.651-8.317 78.651Q-7.836 78.651-7.420 78.838Q-7.004 79.026-6.752 79.387Q-6.501 79.748-6.501 80.237Q-6.501 80.596-6.655 80.899Q-6.809 81.201-7.061 81.461Q-7.313 81.721-7.663 82.006Q-8.012 82.291-8.180 82.444L-9.110 83.284L-8.395 83.284Q-7.020 83.284-6.981 83.244Q-6.911 83.166-6.868 82.981Q-6.825 82.795-6.782 82.506L-6.501 82.506",[998],[975,3859,3860],{"fill":1366,"stroke":1366},[975,3861,3862,3869,3875,3881],{"fill":1366,"stroke":985,"fontFamily":1347,"fontSize":1348},[975,3863,3865],{"transform":3864},"translate(12.834 -106.283)",[983,3866],{"d":3867,"fill":1366,"stroke":1366,"className":3868,"style":1356},"M-55.473 74.440L-56.543 71.584Q-56.609 71.405-56.740 71.362Q-56.871 71.319-57.129 71.319L-57.129 71.022L-55.449 71.022L-55.449 71.319Q-55.899 71.319-55.899 71.518Q-55.895 71.534-55.893 71.551Q-55.891 71.569-55.891 71.584L-55.098 73.678L-54.387 71.768Q-54.422 71.674-54.422 71.629Q-54.422 71.584-54.457 71.584Q-54.524 71.405-54.654 71.362Q-54.785 71.319-55.039 71.319L-55.039 71.022L-53.449 71.022L-53.449 71.319Q-53.899 71.319-53.899 71.518Q-53.895 71.537-53.893 71.555Q-53.891 71.573-53.891 71.584L-53.059 73.799L-52.305 71.799Q-52.281 71.741-52.281 71.670Q-52.281 71.510-52.418 71.414Q-52.555 71.319-52.723 71.319L-52.723 71.022L-51.336 71.022L-51.336 71.319Q-51.570 71.319-51.748 71.446Q-51.926 71.573-52.008 71.799L-52.992 74.440Q-53.047 74.549-53.160 74.549L-53.219 74.549Q-53.332 74.549-53.375 74.440L-54.234 72.166L-55.090 74.440Q-55.129 74.549-55.250 74.549L-55.305 74.549Q-55.418 74.549-55.473 74.440",[998],[975,3870,3871],{"transform":3864},[983,3872],{"d":3873,"fill":1366,"stroke":1366,"className":3874,"style":1356},"M-51.059 73.639Q-51.059 73.155-50.657 72.860Q-50.254 72.565-49.704 72.446Q-49.153 72.326-48.661 72.326L-48.661 72.037Q-48.661 71.811-48.776 71.604Q-48.891 71.397-49.088 71.278Q-49.286 71.159-49.516 71.159Q-49.942 71.159-50.227 71.264Q-50.157 71.291-50.110 71.346Q-50.063 71.401-50.038 71.471Q-50.012 71.541-50.012 71.616Q-50.012 71.721-50.063 71.813Q-50.114 71.905-50.206 71.955Q-50.297 72.006-50.403 72.006Q-50.508 72.006-50.600 71.955Q-50.692 71.905-50.743 71.813Q-50.793 71.721-50.793 71.616Q-50.793 71.198-50.405 71.051Q-50.016 70.905-49.516 70.905Q-49.184 70.905-48.831 71.035Q-48.477 71.166-48.249 71.420Q-48.020 71.674-48.020 72.022L-48.020 73.823Q-48.020 73.955-47.948 74.065Q-47.875 74.174-47.747 74.174Q-47.622 74.174-47.553 74.069Q-47.485 73.963-47.485 73.823L-47.485 73.311L-47.204 73.311L-47.204 73.823Q-47.204 74.026-47.321 74.184Q-47.438 74.342-47.620 74.426Q-47.801 74.510-48.004 74.510Q-48.235 74.510-48.387 74.338Q-48.540 74.166-48.571 73.936Q-48.731 74.217-49.040 74.383Q-49.348 74.549-49.700 74.549Q-50.211 74.549-50.635 74.326Q-51.059 74.104-51.059 73.639M-50.372 73.639Q-50.372 73.924-50.145 74.110Q-49.918 74.295-49.625 74.295Q-49.379 74.295-49.155 74.178Q-48.930 74.061-48.795 73.858Q-48.661 73.655-48.661 73.401L-48.661 72.569Q-48.926 72.569-49.211 72.623Q-49.497 72.678-49.768 72.807Q-50.040 72.936-50.206 73.143Q-50.372 73.350-50.372 73.639M-46.868 74.463L-46.868 73.241Q-46.868 73.213-46.836 73.182Q-46.805 73.151-46.782 73.151L-46.676 73.151Q-46.606 73.151-46.590 73.213Q-46.528 73.534-46.389 73.774Q-46.250 74.014-46.018 74.155Q-45.786 74.295-45.477 74.295Q-45.239 74.295-45.030 74.235Q-44.821 74.174-44.684 74.026Q-44.547 73.877-44.547 73.631Q-44.547 73.377-44.758 73.211Q-44.969 73.045-45.239 72.991L-45.860 72.877Q-46.266 72.799-46.567 72.543Q-46.868 72.287-46.868 71.912Q-46.868 71.545-46.666 71.323Q-46.465 71.100-46.141 71.002Q-45.817 70.905-45.477 70.905Q-45.012 70.905-44.715 71.112L-44.493 70.928Q-44.469 70.905-44.438 70.905L-44.387 70.905Q-44.356 70.905-44.329 70.932Q-44.301 70.959-44.301 70.991L-44.301 71.975Q-44.301 72.006-44.327 72.035Q-44.352 72.065-44.387 72.065L-44.493 72.065Q-44.528 72.065-44.555 72.037Q-44.583 72.010-44.583 71.975Q-44.583 71.576-44.834 71.356Q-45.086 71.135-45.485 71.135Q-45.840 71.135-46.124 71.258Q-46.407 71.381-46.407 71.686Q-46.407 71.905-46.206 72.037Q-46.004 72.170-45.758 72.213L-45.133 72.326Q-44.704 72.416-44.395 72.713Q-44.086 73.010-44.086 73.424Q-44.086 73.994-44.485 74.272Q-44.883 74.549-45.477 74.549Q-46.028 74.549-46.379 74.213L-46.676 74.526Q-46.700 74.549-46.735 74.549L-46.782 74.549Q-46.805 74.549-46.836 74.518Q-46.868 74.487-46.868 74.463M-42.934 73.510L-42.934 71.319L-43.637 71.319L-43.637 71.065Q-43.282 71.065-43.040 70.832Q-42.797 70.600-42.686 70.252Q-42.575 69.905-42.575 69.549L-42.293 69.549L-42.293 71.022L-41.118 71.022L-41.118 71.319L-42.293 71.319L-42.293 73.494Q-42.293 73.815-42.174 74.043Q-42.055 74.272-41.774 74.272Q-41.594 74.272-41.477 74.149Q-41.360 74.026-41.307 73.846Q-41.254 73.666-41.254 73.494L-41.254 73.022L-40.973 73.022L-40.973 73.510Q-40.973 73.764-41.079 74.004Q-41.184 74.244-41.381 74.397Q-41.579 74.549-41.836 74.549Q-42.153 74.549-42.405 74.426Q-42.657 74.303-42.795 74.069Q-42.934 73.834-42.934 73.510M-40.254 72.717Q-40.254 72.237-40.022 71.821Q-39.790 71.405-39.379 71.155Q-38.969 70.905-38.493 70.905Q-37.762 70.905-37.364 71.346Q-36.965 71.787-36.965 72.518Q-36.965 72.623-37.059 72.647L-39.508 72.647L-39.508 72.717Q-39.508 73.127-39.387 73.483Q-39.266 73.838-38.995 74.055Q-38.723 74.272-38.293 74.272Q-37.930 74.272-37.633 74.043Q-37.336 73.815-37.235 73.463Q-37.227 73.416-37.141 73.401L-37.059 73.401Q-36.965 73.428-36.965 73.510Q-36.965 73.518-36.973 73.549Q-37.036 73.776-37.174 73.959Q-37.313 74.143-37.504 74.276Q-37.696 74.409-37.915 74.479Q-38.133 74.549-38.372 74.549Q-38.743 74.549-39.081 74.412Q-39.418 74.276-39.686 74.024Q-39.954 73.772-40.104 73.432Q-40.254 73.092-40.254 72.717M-39.500 72.409L-37.540 72.409Q-37.540 72.104-37.641 71.813Q-37.743 71.522-37.959 71.340Q-38.176 71.159-38.493 71.159Q-38.793 71.159-39.024 71.346Q-39.254 71.534-39.377 71.825Q-39.500 72.116-39.500 72.409M-34.661 74.549Q-35.141 74.549-35.549 74.305Q-35.958 74.061-36.196 73.647Q-36.434 73.233-36.434 72.744Q-36.434 72.252-36.176 71.836Q-35.918 71.420-35.487 71.182Q-35.055 70.944-34.563 70.944Q-33.942 70.944-33.493 71.381L-33.493 69.752Q-33.493 69.537-33.555 69.442Q-33.618 69.346-33.735 69.325Q-33.852 69.303-34.098 69.303L-34.098 69.006L-32.875 68.920L-32.875 73.729Q-32.875 73.940-32.813 74.035Q-32.750 74.131-32.633 74.153Q-32.516 74.174-32.266 74.174L-32.266 74.471L-33.516 74.549L-33.516 74.065Q-33.981 74.549-34.661 74.549M-34.594 74.295Q-34.254 74.295-33.961 74.104Q-33.668 73.912-33.516 73.616L-33.516 71.784Q-33.665 71.510-33.926 71.354Q-34.188 71.198-34.500 71.198Q-35.125 71.198-35.409 71.645Q-35.692 72.092-35.692 72.752Q-35.692 73.397-35.440 73.846Q-35.188 74.295-34.594 74.295",[998],[975,3876,3877],{"transform":3864},[983,3878],{"d":3879,"fill":1366,"stroke":1366,"className":3880,"style":1356},"M-54.935 82.659L-57.177 82.659L-57.177 82.362L-54.606 78.705Q-54.567 78.651-54.505 78.651L-54.360 78.651Q-54.310 78.651-54.278 78.682Q-54.247 78.713-54.247 78.764L-54.247 82.362L-53.415 82.362L-53.415 82.659L-54.247 82.659L-54.247 83.412Q-54.247 83.674-53.423 83.674L-53.423 83.971L-55.759 83.971L-55.759 83.674Q-54.935 83.674-54.935 83.412L-54.935 82.659M-54.880 79.557L-56.849 82.362L-54.880 82.362",[998],[975,3882,3883],{"transform":3864},[983,3884],{"d":3885,"fill":1366,"stroke":1366,"className":3886,"style":1356},"M-49.410 83.018L-49.410 81.276Q-49.410 81.061-49.473 80.965Q-49.535 80.869-49.654 80.848Q-49.773 80.826-50.020 80.826L-50.020 80.530L-48.773 80.444L-48.773 82.994L-48.773 83.018Q-48.773 83.330-48.719 83.492Q-48.664 83.655-48.514 83.725Q-48.363 83.795-48.043 83.795Q-47.613 83.795-47.340 83.457Q-47.066 83.119-47.066 82.674L-47.066 81.276Q-47.066 81.061-47.129 80.965Q-47.191 80.869-47.311 80.848Q-47.430 80.826-47.676 80.826L-47.676 80.530L-46.430 80.444L-46.430 83.229Q-46.430 83.440-46.367 83.535Q-46.305 83.631-46.186 83.653Q-46.066 83.674-45.820 83.674L-45.820 83.971L-47.043 84.049L-47.043 83.428Q-47.211 83.717-47.492 83.883Q-47.773 84.049-48.094 84.049Q-49.410 84.049-49.410 83.018M-43.445 83.971L-45.301 83.971L-45.301 83.674Q-45.027 83.674-44.859 83.627Q-44.691 83.580-44.691 83.412L-44.691 81.276Q-44.691 81.061-44.754 80.965Q-44.816 80.869-44.936 80.848Q-45.055 80.826-45.301 80.826L-45.301 80.530L-44.109 80.444L-44.109 81.178Q-43.996 80.963-43.803 80.795Q-43.609 80.627-43.371 80.535Q-43.133 80.444-42.879 80.444Q-41.711 80.444-41.711 81.522L-41.711 83.412Q-41.711 83.580-41.541 83.627Q-41.371 83.674-41.102 83.674L-41.102 83.971L-42.957 83.971L-42.957 83.674Q-42.684 83.674-42.516 83.627Q-42.348 83.580-42.348 83.412L-42.348 81.537Q-42.348 81.155-42.469 80.926Q-42.590 80.698-42.941 80.698Q-43.254 80.698-43.508 80.860Q-43.762 81.022-43.908 81.291Q-44.055 81.561-44.055 81.858L-44.055 83.412Q-44.055 83.580-43.885 83.627Q-43.715 83.674-43.445 83.674L-43.445 83.971M-38.797 83.971L-40.574 83.971L-40.574 83.674Q-40.301 83.674-40.133 83.627Q-39.965 83.580-39.965 83.412L-39.965 81.276Q-39.965 81.061-40.021 80.965Q-40.078 80.869-40.191 80.848Q-40.305 80.826-40.551 80.826L-40.551 80.530L-39.352 80.444L-39.352 83.412Q-39.352 83.580-39.205 83.627Q-39.059 83.674-38.797 83.674L-38.797 83.971M-40.238 79.049Q-40.238 78.858-40.103 78.727Q-39.969 78.596-39.773 78.596Q-39.652 78.596-39.549 78.659Q-39.445 78.721-39.383 78.825Q-39.320 78.928-39.320 79.049Q-39.320 79.244-39.451 79.379Q-39.582 79.514-39.773 79.514Q-39.973 79.514-40.105 79.381Q-40.238 79.248-40.238 79.049M-37.672 83.010L-37.672 80.819L-38.375 80.819L-38.375 80.565Q-38.020 80.565-37.777 80.332Q-37.535 80.100-37.424 79.752Q-37.312 79.405-37.312 79.049L-37.031 79.049L-37.031 80.522L-35.855 80.522L-35.855 80.819L-37.031 80.819L-37.031 82.994Q-37.031 83.315-36.912 83.543Q-36.793 83.772-36.512 83.772Q-36.332 83.772-36.215 83.649Q-36.098 83.526-36.045 83.346Q-35.992 83.166-35.992 82.994L-35.992 82.522L-35.711 82.522L-35.711 83.010Q-35.711 83.264-35.816 83.504Q-35.922 83.744-36.119 83.897Q-36.316 84.049-36.574 84.049Q-36.891 84.049-37.143 83.926Q-37.395 83.803-37.533 83.569Q-37.672 83.334-37.672 83.010M-34.949 83.963L-34.949 82.741Q-34.949 82.713-34.918 82.682Q-34.887 82.651-34.863 82.651L-34.758 82.651Q-34.687 82.651-34.672 82.713Q-34.609 83.034-34.471 83.274Q-34.332 83.514-34.100 83.655Q-33.867 83.795-33.559 83.795Q-33.320 83.795-33.111 83.735Q-32.902 83.674-32.766 83.526Q-32.629 83.377-32.629 83.131Q-32.629 82.877-32.840 82.711Q-33.051 82.545-33.320 82.491L-33.941 82.377Q-34.348 82.299-34.648 82.043Q-34.949 81.787-34.949 81.412Q-34.949 81.045-34.748 80.823Q-34.547 80.600-34.223 80.502Q-33.898 80.405-33.559 80.405Q-33.094 80.405-32.797 80.612L-32.574 80.428Q-32.551 80.405-32.520 80.405L-32.469 80.405Q-32.437 80.405-32.410 80.432Q-32.383 80.459-32.383 80.491L-32.383 81.475Q-32.383 81.506-32.408 81.535Q-32.434 81.565-32.469 81.565L-32.574 81.565Q-32.609 81.565-32.637 81.537Q-32.664 81.510-32.664 81.475Q-32.664 81.076-32.916 80.856Q-33.168 80.635-33.566 80.635Q-33.922 80.635-34.205 80.758Q-34.488 80.881-34.488 81.186Q-34.488 81.405-34.287 81.537Q-34.086 81.670-33.840 81.713L-33.215 81.826Q-32.785 81.916-32.477 82.213Q-32.168 82.510-32.168 82.924Q-32.168 83.494-32.566 83.772Q-32.965 84.049-33.559 84.049Q-34.109 84.049-34.461 83.713L-34.758 84.026Q-34.781 84.049-34.816 84.049L-34.863 84.049Q-34.887 84.049-34.918 84.018Q-34.949 83.987-34.949 83.963",[998],[975,3888,3889,3896,3902,3908],{"stroke":985,"fontFamily":1347,"fontSize":1348},[975,3890,3892],{"transform":3891},"translate(-4.855 10.089)",[983,3893],{"d":3894,"fill":977,"stroke":977,"className":3895,"style":1356},"M-57.177 84.580Q-57.177 84.299-56.966 84.088Q-56.755 83.877-56.470 83.787Q-56.626 83.662-56.704 83.473Q-56.782 83.284-56.782 83.084Q-56.782 82.729-56.552 82.436Q-56.919 82.096-56.919 81.627Q-56.919 81.276-56.716 81.006Q-56.513 80.737-56.192 80.590Q-55.872 80.444-55.528 80.444Q-55.009 80.444-54.638 80.725Q-54.274 80.354-53.727 80.354Q-53.548 80.354-53.421 80.481Q-53.294 80.608-53.294 80.787Q-53.294 80.893-53.372 80.971Q-53.450 81.049-53.560 81.049Q-53.669 81.049-53.745 80.973Q-53.821 80.897-53.821 80.787Q-53.821 80.686-53.782 80.635Q-53.774 80.627-53.770 80.621Q-53.767 80.616-53.767 80.612Q-54.142 80.612-54.462 80.866Q-54.142 81.205-54.142 81.627Q-54.142 81.897-54.259 82.114Q-54.376 82.330-54.581 82.489Q-54.786 82.647-55.028 82.729Q-55.270 82.811-55.528 82.811Q-55.747 82.811-55.960 82.752Q-56.173 82.694-56.368 82.573Q-56.462 82.713-56.462 82.893Q-56.462 83.100-56.325 83.252Q-56.188 83.405-55.981 83.405L-55.286 83.405Q-54.798 83.405-54.386 83.489Q-53.974 83.573-53.694 83.830Q-53.415 84.088-53.415 84.580Q-53.415 84.944-53.735 85.176Q-54.056 85.409-54.497 85.510Q-54.938 85.612-55.294 85.612Q-55.649 85.612-56.093 85.510Q-56.536 85.409-56.856 85.176Q-57.177 84.944-57.177 84.580M-56.673 84.580Q-56.673 84.776-56.528 84.924Q-56.384 85.073-56.171 85.162Q-55.958 85.252-55.718 85.299Q-55.477 85.346-55.294 85.346Q-55.052 85.346-54.722 85.268Q-54.392 85.190-54.155 85.016Q-53.919 84.842-53.919 84.580Q-53.919 84.174-54.329 84.065Q-54.739 83.955-55.302 83.955L-55.981 83.955Q-56.251 83.955-56.462 84.133Q-56.673 84.311-56.673 84.580M-55.528 82.545Q-54.806 82.545-54.806 81.627Q-54.806 80.705-55.528 80.705Q-56.255 80.705-56.255 81.627Q-56.255 82.545-55.528 82.545M-50.923 83.971L-52.903 83.971L-52.903 83.674Q-52.634 83.674-52.466 83.629Q-52.298 83.584-52.298 83.412L-52.298 81.276Q-52.298 81.061-52.360 80.965Q-52.423 80.869-52.540 80.848Q-52.657 80.826-52.903 80.826L-52.903 80.530L-51.735 80.444L-51.735 81.229Q-51.657 81.018-51.505 80.832Q-51.352 80.647-51.153 80.545Q-50.954 80.444-50.727 80.444Q-50.481 80.444-50.290 80.588Q-50.099 80.733-50.099 80.963Q-50.099 81.119-50.204 81.229Q-50.310 81.338-50.466 81.338Q-50.622 81.338-50.731 81.229Q-50.841 81.119-50.841 80.963Q-50.841 80.803-50.735 80.698Q-51.060 80.698-51.274 80.926Q-51.489 81.155-51.585 81.494Q-51.681 81.834-51.681 82.139L-51.681 83.412Q-51.681 83.580-51.454 83.627Q-51.227 83.674-50.923 83.674L-50.923 83.971M-49.618 82.217Q-49.618 81.737-49.386 81.321Q-49.153 80.905-48.743 80.655Q-48.333 80.405-47.856 80.405Q-47.126 80.405-46.727 80.846Q-46.329 81.287-46.329 82.018Q-46.329 82.123-46.423 82.147L-48.872 82.147L-48.872 82.217Q-48.872 82.627-48.751 82.983Q-48.630 83.338-48.358 83.555Q-48.087 83.772-47.657 83.772Q-47.294 83.772-46.997 83.543Q-46.700 83.315-46.599 82.963Q-46.591 82.916-46.505 82.901L-46.423 82.901Q-46.329 82.928-46.329 83.010Q-46.329 83.018-46.337 83.049Q-46.399 83.276-46.538 83.459Q-46.677 83.643-46.868 83.776Q-47.060 83.909-47.278 83.979Q-47.497 84.049-47.735 84.049Q-48.106 84.049-48.444 83.912Q-48.782 83.776-49.050 83.524Q-49.317 83.272-49.468 82.932Q-49.618 82.592-49.618 82.217M-48.864 81.909L-46.903 81.909Q-46.903 81.604-47.005 81.313Q-47.106 81.022-47.323 80.840Q-47.540 80.659-47.856 80.659Q-48.157 80.659-48.388 80.846Q-48.618 81.034-48.741 81.325Q-48.864 81.616-48.864 81.909M-45.841 82.217Q-45.841 81.737-45.608 81.321Q-45.376 80.905-44.966 80.655Q-44.556 80.405-44.079 80.405Q-43.349 80.405-42.950 80.846Q-42.552 81.287-42.552 82.018Q-42.552 82.123-42.645 82.147L-45.095 82.147L-45.095 82.217Q-45.095 82.627-44.974 82.983Q-44.852 83.338-44.581 83.555Q-44.310 83.772-43.880 83.772Q-43.517 83.772-43.220 83.543Q-42.923 83.315-42.821 82.963Q-42.813 82.916-42.727 82.901L-42.645 82.901Q-42.552 82.928-42.552 83.010Q-42.552 83.018-42.560 83.049Q-42.622 83.276-42.761 83.459Q-42.899 83.643-43.091 83.776Q-43.282 83.909-43.501 83.979Q-43.720 84.049-43.958 84.049Q-44.329 84.049-44.667 83.912Q-45.005 83.776-45.272 83.524Q-45.540 83.272-45.690 82.932Q-45.841 82.592-45.841 82.217M-45.087 81.909L-43.126 81.909Q-43.126 81.604-43.227 81.313Q-43.329 81.022-43.546 80.840Q-43.763 80.659-44.079 80.659Q-44.380 80.659-44.610 80.846Q-44.841 81.034-44.964 81.325Q-45.087 81.616-45.087 81.909M-40.247 84.049Q-40.727 84.049-41.136 83.805Q-41.544 83.561-41.782 83.147Q-42.020 82.733-42.020 82.244Q-42.020 81.752-41.763 81.336Q-41.505 80.920-41.073 80.682Q-40.642 80.444-40.149 80.444Q-39.528 80.444-39.079 80.881L-39.079 79.252Q-39.079 79.037-39.142 78.942Q-39.204 78.846-39.321 78.825Q-39.438 78.803-39.685 78.803L-39.685 78.506L-38.462 78.420L-38.462 83.229Q-38.462 83.440-38.399 83.535Q-38.337 83.631-38.220 83.653Q-38.102 83.674-37.852 83.674L-37.852 83.971L-39.102 84.049L-39.102 83.565Q-39.567 84.049-40.247 84.049M-40.181 83.795Q-39.841 83.795-39.548 83.604Q-39.255 83.412-39.102 83.116L-39.102 81.284Q-39.251 81.010-39.513 80.854Q-39.774 80.698-40.087 80.698Q-40.712 80.698-40.995 81.145Q-41.278 81.592-41.278 82.252Q-41.278 82.897-41.026 83.346Q-40.774 83.795-40.181 83.795M-36.927 85.268Q-36.813 85.346-36.638 85.346Q-36.349 85.346-36.128 85.133Q-35.907 84.920-35.782 84.619L-35.493 83.971L-36.767 81.084Q-36.849 80.909-36.993 80.864Q-37.138 80.819-37.407 80.819L-37.407 80.522L-35.688 80.522L-35.688 80.819Q-36.110 80.819-36.110 81.002Q-36.110 81.014-36.095 81.084L-35.157 83.209L-34.325 81.299Q-34.286 81.209-34.286 81.131Q-34.286 80.991-34.388 80.905Q-34.489 80.819-34.630 80.819L-34.630 80.522L-33.278 80.522L-33.278 80.819Q-33.532 80.819-33.726 80.944Q-33.919 81.069-34.024 81.299L-35.470 84.619Q-35.583 84.873-35.749 85.096Q-35.915 85.319-36.144 85.461Q-36.372 85.604-36.638 85.604Q-36.935 85.604-37.175 85.412Q-37.415 85.221-37.415 84.932Q-37.415 84.776-37.310 84.674Q-37.204 84.573-37.056 84.573Q-36.950 84.573-36.870 84.619Q-36.790 84.666-36.743 84.744Q-36.696 84.823-36.696 84.932Q-36.696 85.053-36.757 85.141Q-36.817 85.229-36.927 85.268M-32.384 83.506Q-32.384 83.323-32.247 83.186Q-32.110 83.049-31.919 83.049Q-31.727 83.049-31.595 83.182Q-31.462 83.315-31.462 83.506Q-31.462 83.705-31.595 83.838Q-31.727 83.971-31.919 83.971Q-32.110 83.971-32.247 83.834Q-32.384 83.698-32.384 83.506M-32.384 80.979Q-32.384 80.795-32.247 80.659Q-32.110 80.522-31.919 80.522Q-31.727 80.522-31.595 80.655Q-31.462 80.787-31.462 80.979Q-31.462 81.178-31.595 81.311Q-31.727 81.444-31.919 81.444Q-32.110 81.444-32.247 81.307Q-32.384 81.170-32.384 80.979",[998],[975,3897,3898],{"transform":3891},[983,3899],{"d":3900,"fill":977,"stroke":977,"className":3901,"style":1356},"M-24.911 83.940L-26.134 81.084Q-26.216 80.909-26.360 80.864Q-26.505 80.819-26.774 80.819L-26.774 80.522L-25.063 80.522L-25.063 80.819Q-25.485 80.819-25.485 81.002Q-25.485 81.037-25.470 81.084L-24.524 83.276L-23.684 81.299Q-23.645 81.221-23.645 81.131Q-23.645 80.991-23.751 80.905Q-23.856 80.819-23.997 80.819L-23.997 80.522L-22.645 80.522L-22.645 80.819Q-23.169 80.819-23.384 81.299L-24.509 83.940Q-24.571 84.049-24.677 84.049L-24.743 84.049Q-24.856 84.049-24.911 83.940",[998],[975,3903,3904],{"transform":3891},[983,3905],{"d":3906,"fill":977,"stroke":977,"className":3907,"style":1356},"M-22.600 83.139Q-22.600 82.655-22.198 82.360Q-21.795 82.065-21.245 81.946Q-20.694 81.826-20.202 81.826L-20.202 81.537Q-20.202 81.311-20.317 81.104Q-20.432 80.897-20.629 80.778Q-20.827 80.659-21.057 80.659Q-21.483 80.659-21.768 80.764Q-21.698 80.791-21.651 80.846Q-21.604 80.901-21.579 80.971Q-21.553 81.041-21.553 81.116Q-21.553 81.221-21.604 81.313Q-21.655 81.405-21.747 81.455Q-21.838 81.506-21.944 81.506Q-22.049 81.506-22.141 81.455Q-22.233 81.405-22.284 81.313Q-22.334 81.221-22.334 81.116Q-22.334 80.698-21.946 80.551Q-21.557 80.405-21.057 80.405Q-20.725 80.405-20.372 80.535Q-20.018 80.666-19.790 80.920Q-19.561 81.174-19.561 81.522L-19.561 83.323Q-19.561 83.455-19.489 83.565Q-19.416 83.674-19.288 83.674Q-19.163 83.674-19.094 83.569Q-19.026 83.463-19.026 83.323L-19.026 82.811L-18.745 82.811L-18.745 83.323Q-18.745 83.526-18.862 83.684Q-18.979 83.842-19.161 83.926Q-19.342 84.010-19.545 84.010Q-19.776 84.010-19.928 83.838Q-20.081 83.666-20.112 83.436Q-20.272 83.717-20.581 83.883Q-20.889 84.049-21.241 84.049Q-21.752 84.049-22.176 83.826Q-22.600 83.604-22.600 83.139M-21.913 83.139Q-21.913 83.424-21.686 83.610Q-21.459 83.795-21.166 83.795Q-20.920 83.795-20.696 83.678Q-20.471 83.561-20.336 83.358Q-20.202 83.155-20.202 82.901L-20.202 82.069Q-20.467 82.069-20.752 82.123Q-21.038 82.178-21.309 82.307Q-21.581 82.436-21.747 82.643Q-21.913 82.850-21.913 83.139M-16.538 83.971L-18.370 83.971L-18.370 83.674Q-18.096 83.674-17.928 83.627Q-17.760 83.580-17.760 83.412L-17.760 79.252Q-17.760 79.037-17.823 78.942Q-17.885 78.846-18.004 78.825Q-18.123 78.803-18.370 78.803L-18.370 78.506L-17.147 78.420L-17.147 83.412Q-17.147 83.580-16.979 83.627Q-16.811 83.674-16.538 83.674L-16.538 83.971M-15.409 83.018L-15.409 81.276Q-15.409 81.061-15.471 80.965Q-15.534 80.869-15.653 80.848Q-15.772 80.826-16.018 80.826L-16.018 80.530L-14.772 80.444L-14.772 82.994L-14.772 83.018Q-14.772 83.330-14.717 83.492Q-14.663 83.655-14.512 83.725Q-14.362 83.795-14.041 83.795Q-13.612 83.795-13.338 83.457Q-13.065 83.119-13.065 82.674L-13.065 81.276Q-13.065 81.061-13.127 80.965Q-13.190 80.869-13.309 80.848Q-13.428 80.826-13.674 80.826L-13.674 80.530L-12.428 80.444L-12.428 83.229Q-12.428 83.440-12.366 83.535Q-12.303 83.631-12.184 83.653Q-12.065 83.674-11.819 83.674L-11.819 83.971L-13.041 84.049L-13.041 83.428Q-13.209 83.717-13.491 83.883Q-13.772 84.049-14.092 84.049Q-15.409 84.049-15.409 83.018M-11.373 82.217Q-11.373 81.737-11.141 81.321Q-10.909 80.905-10.498 80.655Q-10.088 80.405-9.612 80.405Q-8.881 80.405-8.483 80.846Q-8.084 81.287-8.084 82.018Q-8.084 82.123-8.178 82.147L-10.627 82.147L-10.627 82.217Q-10.627 82.627-10.506 82.983Q-10.385 83.338-10.114 83.555Q-9.842 83.772-9.413 83.772Q-9.049 83.772-8.752 83.543Q-8.456 83.315-8.354 82.963Q-8.346 82.916-8.260 82.901L-8.178 82.901Q-8.084 82.928-8.084 83.010Q-8.084 83.018-8.092 83.049Q-8.155 83.276-8.293 83.459Q-8.432 83.643-8.623 83.776Q-8.815 83.909-9.034 83.979Q-9.252 84.049-9.491 84.049Q-9.862 84.049-10.200 83.912Q-10.538 83.776-10.805 83.524Q-11.073 83.272-11.223 82.932Q-11.373 82.592-11.373 82.217M-10.620 81.909L-8.659 81.909Q-8.659 81.604-8.760 81.313Q-8.862 81.022-9.079 80.840Q-9.295 80.659-9.612 80.659Q-9.913 80.659-10.143 80.846Q-10.373 81.034-10.497 81.325Q-10.620 81.616-10.620 81.909",[998],[975,3909,3910],{"transform":3891},[983,3911],{"d":3912,"fill":977,"stroke":977,"className":3913,"style":1356},"M-1.397 83.971L-4.190 83.971L-4.190 83.674Q-3.128 83.674-3.128 83.412L-3.128 79.244Q-3.557 79.459-4.237 79.459L-4.237 79.162Q-3.218 79.162-2.702 78.651L-2.557 78.651Q-2.483 78.670-2.464 78.748L-2.464 83.412Q-2.464 83.674-1.397 83.674L-1.397 83.971M2.841 83.971L-0.319 83.971L-0.319 83.764Q-0.319 83.737-0.296 83.705L1.056 82.307Q1.435 81.920 1.683 81.631Q1.931 81.342 2.105 80.985Q2.279 80.627 2.279 80.237Q2.279 79.889 2.146 79.596Q2.013 79.303 1.759 79.125Q1.505 78.948 1.150 78.948Q0.790 78.948 0.499 79.143Q0.208 79.338 0.064 79.666L0.118 79.666Q0.302 79.666 0.427 79.787Q0.552 79.909 0.552 80.100Q0.552 80.280 0.427 80.409Q0.302 80.537 0.118 80.537Q-0.061 80.537-0.190 80.409Q-0.319 80.280-0.319 80.100Q-0.319 79.698-0.098 79.362Q0.122 79.026 0.488 78.838Q0.853 78.651 1.255 78.651Q1.736 78.651 2.152 78.838Q2.568 79.026 2.820 79.387Q3.072 79.748 3.072 80.237Q3.072 80.596 2.917 80.899Q2.763 81.201 2.511 81.461Q2.259 81.721 1.909 82.006Q1.560 82.291 1.392 82.444L0.462 83.284L1.177 83.284Q2.552 83.284 2.591 83.244Q2.661 83.166 2.704 82.981Q2.747 82.795 2.790 82.506L3.072 82.506",[998],[975,3915,3916,3923,3929],{"stroke":985,"fontFamily":1347,"fontSize":1348},[975,3917,3919],{"transform":3918},"translate(3.858 -147.352)",[983,3920],{"d":3921,"fill":977,"stroke":977,"className":3922,"style":1356},"M-55.360 84.049Q-55.841 84.049-56.249 83.805Q-56.657 83.561-56.895 83.147Q-57.134 82.733-57.134 82.244Q-57.134 81.752-56.876 81.336Q-56.618 80.920-56.186 80.682Q-55.755 80.444-55.263 80.444Q-54.642 80.444-54.192 80.881L-54.192 79.252Q-54.192 79.037-54.255 78.942Q-54.317 78.846-54.435 78.825Q-54.552 78.803-54.798 78.803L-54.798 78.506L-53.575 78.420L-53.575 83.229Q-53.575 83.440-53.513 83.535Q-53.450 83.631-53.333 83.653Q-53.216 83.674-52.966 83.674L-52.966 83.971L-54.216 84.049L-54.216 83.565Q-54.681 84.049-55.360 84.049M-55.294 83.795Q-54.954 83.795-54.661 83.604Q-54.368 83.412-54.216 83.116L-54.216 81.284Q-54.364 81.010-54.626 80.854Q-54.888 80.698-55.200 80.698Q-55.825 80.698-56.108 81.145Q-56.392 81.592-56.392 82.252Q-56.392 82.897-56.140 83.346Q-55.888 83.795-55.294 83.795M-52.458 82.217Q-52.458 81.737-52.226 81.321Q-51.993 80.905-51.583 80.655Q-51.173 80.405-50.696 80.405Q-49.966 80.405-49.567 80.846Q-49.169 81.287-49.169 82.018Q-49.169 82.123-49.263 82.147L-51.712 82.147L-51.712 82.217Q-51.712 82.627-51.591 82.983Q-51.470 83.338-51.198 83.555Q-50.927 83.772-50.497 83.772Q-50.134 83.772-49.837 83.543Q-49.540 83.315-49.438 82.963Q-49.431 82.916-49.345 82.901L-49.263 82.901Q-49.169 82.928-49.169 83.010Q-49.169 83.018-49.177 83.049Q-49.239 83.276-49.378 83.459Q-49.517 83.643-49.708 83.776Q-49.899 83.909-50.118 83.979Q-50.337 84.049-50.575 84.049Q-50.946 84.049-51.284 83.912Q-51.622 83.776-51.890 83.524Q-52.157 83.272-52.308 82.932Q-52.458 82.592-52.458 82.217M-51.704 81.909L-49.743 81.909Q-49.743 81.604-49.845 81.313Q-49.946 81.022-50.163 80.840Q-50.380 80.659-50.696 80.659Q-50.997 80.659-51.227 80.846Q-51.458 81.034-51.581 81.325Q-51.704 81.616-51.704 81.909M-46.751 83.971L-48.606 83.971L-48.606 83.674Q-48.333 83.674-48.165 83.627Q-47.997 83.580-47.997 83.412L-47.997 81.276Q-47.997 81.061-48.060 80.965Q-48.122 80.869-48.241 80.848Q-48.360 80.826-48.606 80.826L-48.606 80.530L-47.415 80.444L-47.415 81.178Q-47.302 80.963-47.108 80.795Q-46.915 80.627-46.677 80.535Q-46.438 80.444-46.185 80.444Q-45.017 80.444-45.017 81.522L-45.017 83.412Q-45.017 83.580-44.847 83.627Q-44.677 83.674-44.407 83.674L-44.407 83.971L-46.263 83.971L-46.263 83.674Q-45.989 83.674-45.821 83.627Q-45.653 83.580-45.653 83.412L-45.653 81.537Q-45.653 81.155-45.774 80.926Q-45.895 80.698-46.247 80.698Q-46.560 80.698-46.813 80.860Q-47.067 81.022-47.214 81.291Q-47.360 81.561-47.360 81.858L-47.360 83.412Q-47.360 83.580-47.190 83.627Q-47.020 83.674-46.751 83.674L-46.751 83.971M-43.919 83.963L-43.919 82.741Q-43.919 82.713-43.888 82.682Q-43.856 82.651-43.833 82.651L-43.727 82.651Q-43.657 82.651-43.642 82.713Q-43.579 83.034-43.440 83.274Q-43.302 83.514-43.069 83.655Q-42.837 83.795-42.528 83.795Q-42.290 83.795-42.081 83.735Q-41.872 83.674-41.735 83.526Q-41.599 83.377-41.599 83.131Q-41.599 82.877-41.810 82.711Q-42.020 82.545-42.290 82.491L-42.911 82.377Q-43.317 82.299-43.618 82.043Q-43.919 81.787-43.919 81.412Q-43.919 81.045-43.718 80.823Q-43.517 80.600-43.192 80.502Q-42.868 80.405-42.528 80.405Q-42.063 80.405-41.767 80.612L-41.544 80.428Q-41.520 80.405-41.489 80.405L-41.438 80.405Q-41.407 80.405-41.380 80.432Q-41.352 80.459-41.352 80.491L-41.352 81.475Q-41.352 81.506-41.378 81.535Q-41.403 81.565-41.438 81.565L-41.544 81.565Q-41.579 81.565-41.606 81.537Q-41.634 81.510-41.634 81.475Q-41.634 81.076-41.886 80.856Q-42.138 80.635-42.536 80.635Q-42.892 80.635-43.175 80.758Q-43.458 80.881-43.458 81.186Q-43.458 81.405-43.257 81.537Q-43.056 81.670-42.810 81.713L-42.185 81.826Q-41.755 81.916-41.446 82.213Q-41.138 82.510-41.138 82.924Q-41.138 83.494-41.536 83.772Q-41.935 84.049-42.528 84.049Q-43.079 84.049-43.431 83.713L-43.727 84.026Q-43.751 84.049-43.786 84.049L-43.833 84.049Q-43.856 84.049-43.888 84.018Q-43.919 83.987-43.919 83.963M-38.751 83.971L-40.528 83.971L-40.528 83.674Q-40.255 83.674-40.087 83.627Q-39.919 83.580-39.919 83.412L-39.919 81.276Q-39.919 81.061-39.976 80.965Q-40.032 80.869-40.145 80.848Q-40.259 80.826-40.505 80.826L-40.505 80.530L-39.306 80.444L-39.306 83.412Q-39.306 83.580-39.159 83.627Q-39.013 83.674-38.751 83.674L-38.751 83.971M-40.192 79.049Q-40.192 78.858-40.058 78.727Q-39.923 78.596-39.727 78.596Q-39.606 78.596-39.503 78.659Q-39.399 78.721-39.337 78.825Q-39.274 78.928-39.274 79.049Q-39.274 79.244-39.405 79.379Q-39.536 79.514-39.727 79.514Q-39.927 79.514-40.060 79.381Q-40.192 79.248-40.192 79.049M-37.626 83.010L-37.626 80.819L-38.329 80.819L-38.329 80.565Q-37.974 80.565-37.731 80.332Q-37.489 80.100-37.378 79.752Q-37.267 79.405-37.267 79.049L-36.985 79.049L-36.985 80.522L-35.810 80.522L-35.810 80.819L-36.985 80.819L-36.985 82.994Q-36.985 83.315-36.866 83.543Q-36.747 83.772-36.466 83.772Q-36.286 83.772-36.169 83.649Q-36.052 83.526-35.999 83.346Q-35.946 83.166-35.946 82.994L-35.946 82.522L-35.665 82.522L-35.665 83.010Q-35.665 83.264-35.770 83.504Q-35.876 83.744-36.073 83.897Q-36.270 84.049-36.528 84.049Q-36.845 84.049-37.097 83.926Q-37.349 83.803-37.487 83.569Q-37.626 83.334-37.626 83.010",[998],[975,3924,3925],{"transform":3918},[983,3926],{"d":3927,"fill":977,"stroke":977,"className":3928,"style":1356},"M-34.754 85.268Q-34.640 85.346-34.465 85.346Q-34.176 85.346-33.955 85.133Q-33.734 84.920-33.609 84.619L-33.320 83.971L-34.594 81.084Q-34.676 80.909-34.820 80.864Q-34.965 80.819-35.234 80.819L-35.234 80.522L-33.515 80.522L-33.515 80.819Q-33.937 80.819-33.937 81.002Q-33.937 81.014-33.922 81.084L-32.984 83.209L-32.152 81.299Q-32.113 81.209-32.113 81.131Q-32.113 80.991-32.215 80.905Q-32.316 80.819-32.457 80.819L-32.457 80.522L-31.105 80.522L-31.105 80.819Q-31.359 80.819-31.553 80.944Q-31.746 81.069-31.851 81.299L-33.297 84.619Q-33.410 84.873-33.576 85.096Q-33.742 85.319-33.971 85.461Q-34.199 85.604-34.465 85.604Q-34.762 85.604-35.002 85.412Q-35.242 85.221-35.242 84.932Q-35.242 84.776-35.137 84.674Q-35.031 84.573-34.883 84.573Q-34.777 84.573-34.697 84.619Q-34.617 84.666-34.570 84.744Q-34.523 84.823-34.523 84.932Q-34.523 85.053-34.584 85.141Q-34.644 85.229-34.754 85.268",[998],[975,3930,3931],{"transform":3918},[983,3932],{"d":3933,"fill":977,"stroke":977,"className":3934,"style":1356},"M-25.844 83.971L-27.824 83.971L-27.824 83.674Q-27.555 83.674-27.387 83.629Q-27.219 83.584-27.219 83.412L-27.219 81.276Q-27.219 81.061-27.281 80.965Q-27.344 80.869-27.461 80.848Q-27.578 80.826-27.824 80.826L-27.824 80.530L-26.656 80.444L-26.656 81.229Q-26.578 81.018-26.426 80.832Q-26.274 80.647-26.074 80.545Q-25.875 80.444-25.649 80.444Q-25.402 80.444-25.211 80.588Q-25.020 80.733-25.020 80.963Q-25.020 81.119-25.125 81.229Q-25.231 81.338-25.387 81.338Q-25.543 81.338-25.652 81.229Q-25.762 81.119-25.762 80.963Q-25.762 80.803-25.656 80.698Q-25.981 80.698-26.195 80.926Q-26.410 81.155-26.506 81.494Q-26.602 81.834-26.602 82.139L-26.602 83.412Q-26.602 83.580-26.375 83.627Q-26.149 83.674-25.844 83.674L-25.844 83.971M-23.856 83.018L-23.856 81.276Q-23.856 81.061-23.918 80.965Q-23.981 80.869-24.100 80.848Q-24.219 80.826-24.465 80.826L-24.465 80.530L-23.219 80.444L-23.219 82.994L-23.219 83.018Q-23.219 83.330-23.164 83.492Q-23.110 83.655-22.959 83.725Q-22.809 83.795-22.488 83.795Q-22.059 83.795-21.785 83.457Q-21.512 83.119-21.512 82.674L-21.512 81.276Q-21.512 81.061-21.574 80.965Q-21.637 80.869-21.756 80.848Q-21.875 80.826-22.121 80.826L-22.121 80.530L-20.875 80.444L-20.875 83.229Q-20.875 83.440-20.813 83.535Q-20.750 83.631-20.631 83.653Q-20.512 83.674-20.266 83.674L-20.266 83.971L-21.488 84.049L-21.488 83.428Q-21.656 83.717-21.938 83.883Q-22.219 84.049-22.539 84.049Q-23.856 84.049-23.856 83.018M-17.906 83.971L-19.738 83.971L-19.738 83.674Q-19.465 83.674-19.297 83.627Q-19.129 83.580-19.129 83.412L-19.129 79.252Q-19.129 79.037-19.192 78.942Q-19.254 78.846-19.373 78.825Q-19.492 78.803-19.738 78.803L-19.738 78.506L-18.516 78.420L-18.516 83.412Q-18.516 83.580-18.348 83.627Q-18.180 83.674-17.906 83.674L-17.906 83.971M-17.461 82.217Q-17.461 81.737-17.229 81.321Q-16.996 80.905-16.586 80.655Q-16.176 80.405-15.699 80.405Q-14.969 80.405-14.570 80.846Q-14.172 81.287-14.172 82.018Q-14.172 82.123-14.266 82.147L-16.715 82.147L-16.715 82.217Q-16.715 82.627-16.594 82.983Q-16.473 83.338-16.201 83.555Q-15.930 83.772-15.500 83.772Q-15.137 83.772-14.840 83.543Q-14.543 83.315-14.442 82.963Q-14.434 82.916-14.348 82.901L-14.266 82.901Q-14.172 82.928-14.172 83.010Q-14.172 83.018-14.180 83.049Q-14.242 83.276-14.381 83.459Q-14.520 83.643-14.711 83.776Q-14.902 83.909-15.121 83.979Q-15.340 84.049-15.578 84.049Q-15.949 84.049-16.287 83.912Q-16.625 83.776-16.893 83.524Q-17.160 83.272-17.311 82.932Q-17.461 82.592-17.461 82.217M-16.707 81.909L-14.746 81.909Q-14.746 81.604-14.848 81.313Q-14.949 81.022-15.166 80.840Q-15.383 80.659-15.699 80.659Q-16 80.659-16.231 80.846Q-16.461 81.034-16.584 81.325Q-16.707 81.616-16.707 81.909",[998],[983,3936],{"fill":985,"d":3937,"style":981},"M45.014 83.97V-58.292h51.214V83.971ZM96.228-58.292",[983,3939],{"fill":985,"stroke":3785,"d":3940},"M45.014 55.518h51.214M45.014 27.065h51.214M45.014-1.387h51.214M45.014-29.84h51.214",[983,3942],{"fill":1133,"stroke":977,"d":3943,"style":981},"M45.014 83.97V12.84h51.214V83.97ZM96.228 12.84",[983,3945],{"fill":1133,"stroke":977,"d":3946,"style":981},"M45.014 12.839v-71.132h51.214V12.84Zm51.214-71.132",[975,3948,3949,3955],{"stroke":985,"fontFamily":3792,"fontSize":3582},[975,3950,3952],{"transform":3951},"translate(115.188 -32.555)",[983,3953],{"d":3798,"fill":977,"stroke":977,"className":3954,"style":3800},[998],[975,3956,3957],{"transform":3951},[983,3958],{"d":3959,"fill":977,"stroke":977,"className":3960,"style":3800},"M-32.436 83.971L-35.886 83.971L-35.886 83.738Q-35.886 83.725-35.855 83.694L-34.401 82.117Q-33.935 81.620-33.682 81.315Q-33.429 81.009-33.238 80.598Q-33.047 80.187-33.047 79.748Q-33.047 79.159-33.370 78.726Q-33.693 78.293-34.273 78.293Q-34.537 78.293-34.783 78.403Q-35.029 78.513-35.205 78.700Q-35.381 78.887-35.477 79.137L-35.398 79.137Q-35.196 79.137-35.053 79.273Q-34.910 79.409-34.910 79.625Q-34.910 79.831-35.053 79.970Q-35.196 80.108-35.398 80.108Q-35.600 80.108-35.743 79.965Q-35.886 79.823-35.886 79.625Q-35.886 79.163-35.649 78.790Q-35.411 78.416-35.011 78.197Q-34.612 77.977-34.163 77.977Q-33.640 77.977-33.186 78.192Q-32.731 78.408-32.458 78.807Q-32.186 79.207-32.186 79.748Q-32.186 80.143-32.357 80.497Q-32.529 80.851-32.794 81.130Q-33.060 81.409-33.511 81.794Q-33.961 82.178-34.040 82.253L-35.064 83.215L-34.247 83.215Q-33.596 83.215-33.159 83.204Q-32.722 83.193-32.691 83.171Q-32.621 83.088-32.566 82.848Q-32.511 82.609-32.471 82.341L-32.186 82.341",[998],[975,3962,3963,3969],{"stroke":985,"fontFamily":3792,"fontSize":3582},[975,3964,3966],{"transform":3965},"translate(115.188 -103.687)",[983,3967],{"d":3798,"fill":977,"stroke":977,"className":3968,"style":3800},[998],[975,3970,3971],{"transform":3965},[983,3972],{"d":3973,"fill":977,"stroke":977,"className":3974,"style":3800},"M-35.442 83.250L-35.486 83.250Q-35.284 83.567-34.897 83.725Q-34.510 83.883-34.084 83.883Q-33.548 83.883-33.309 83.448Q-33.069 83.013-33.069 82.433Q-33.069 81.853-33.315 81.413Q-33.561 80.974-34.093 80.974L-34.713 80.974Q-34.739 80.974-34.772 80.945Q-34.805 80.917-34.805 80.895L-34.805 80.794Q-34.805 80.763-34.776 80.739Q-34.748 80.715-34.713 80.715L-34.194 80.675Q-33.728 80.675-33.482 80.203Q-33.236 79.730-33.236 79.212Q-33.236 78.785-33.449 78.511Q-33.662 78.236-34.084 78.236Q-34.427 78.236-34.752 78.366Q-35.077 78.495-35.262 78.750L-35.236 78.750Q-35.033 78.750-34.897 78.891Q-34.761 79.032-34.761 79.229Q-34.761 79.427-34.895 79.561Q-35.029 79.695-35.227 79.695Q-35.429 79.695-35.567 79.561Q-35.706 79.427-35.706 79.229Q-35.706 78.640-35.203 78.309Q-34.699 77.977-34.084 77.977Q-33.706 77.977-33.304 78.117Q-32.902 78.258-32.634 78.537Q-32.366 78.816-32.366 79.212Q-32.366 79.761-32.720 80.198Q-33.073 80.636-33.614 80.820Q-33.223 80.899-32.878 81.123Q-32.533 81.347-32.322 81.688Q-32.111 82.029-32.111 82.424Q-32.111 82.806-32.274 83.129Q-32.436 83.452-32.728 83.688Q-33.021 83.923-33.368 84.046Q-33.715 84.169-34.084 84.169Q-34.532 84.169-34.963 84.008Q-35.394 83.848-35.675 83.521Q-35.956 83.193-35.956 82.736Q-35.956 82.521-35.809 82.378Q-35.662 82.235-35.442 82.235Q-35.231 82.235-35.086 82.380Q-34.941 82.525-34.941 82.736Q-34.941 82.947-35.088 83.099Q-35.236 83.250-35.442 83.250",[998],[975,3976,3977,3980],{"fill":3809},[983,3978],{"stroke":985,"d":3979},"M45.57 74.6h50.102v-9.711H45.57Z",[975,3981,3982,3988,3993,3999,4004,4009,4014],{"fill":977,"stroke":985,"fontSize":1348},[975,3983,3985],{"transform":3984},"translate(104.485 -12.426)",[983,3986],{"d":3820,"fill":977,"stroke":977,"className":3987,"style":1356},[998],[975,3989,3990],{"transform":3984},[983,3991],{"d":3826,"fill":977,"stroke":977,"className":3992,"style":1356},[998],[975,3994,3995],{"transform":3984},[983,3996],{"d":3997,"fill":977,"stroke":977,"className":3998,"style":1356},"M-38.927 83.092L-38.990 83.092Q-38.849 83.444-38.525 83.655Q-38.201 83.866-37.814 83.866Q-37.220 83.866-36.970 83.432Q-36.720 82.998-36.720 82.362Q-36.720 81.768-36.890 81.321Q-37.060 80.873-37.560 80.873Q-37.857 80.873-38.062 80.953Q-38.267 81.034-38.369 81.125Q-38.470 81.217-38.585 81.350Q-38.701 81.483-38.751 81.498L-38.822 81.498Q-38.908 81.475-38.927 81.397L-38.927 78.748Q-38.896 78.651-38.822 78.651Q-38.806 78.651-38.798 78.653Q-38.790 78.655-38.783 78.659Q-38.197 78.909-37.599 78.909Q-37.017 78.909-36.400 78.651L-36.376 78.651Q-36.333 78.651-36.306 78.676Q-36.279 78.701-36.279 78.741L-36.279 78.819Q-36.279 78.850-36.302 78.873Q-36.599 79.225-37.021 79.422Q-37.443 79.619-37.904 79.619Q-38.251 79.619-38.630 79.514L-38.630 81.010Q-38.412 80.815-38.136 80.717Q-37.861 80.619-37.560 80.619Q-37.103 80.619-36.734 80.867Q-36.365 81.116-36.158 81.520Q-35.951 81.924-35.951 82.369Q-35.951 82.858-36.206 83.266Q-36.462 83.674-36.894 83.907Q-37.326 84.139-37.814 84.139Q-38.208 84.139-38.564 83.948Q-38.919 83.756-39.130 83.422Q-39.341 83.088-39.341 82.674Q-39.341 82.494-39.224 82.381Q-39.107 82.268-38.927 82.268Q-38.810 82.268-38.718 82.321Q-38.626 82.373-38.574 82.465Q-38.521 82.557-38.521 82.674Q-38.521 82.858-38.634 82.975Q-38.747 83.092-38.927 83.092",[998],[975,4000,4001],{"transform":3984},[983,4002],{"d":3838,"fill":977,"stroke":977,"className":4003,"style":1356},[998],[975,4005,4006],{"transform":3984},[983,4007],{"d":3844,"fill":977,"stroke":977,"className":4008,"style":1356},[998],[975,4010,4011],{"transform":3984},[983,4012],{"d":3850,"fill":977,"stroke":977,"className":4013,"style":1356},[998],[975,4015,4016],{"transform":3984},[983,4017],{"d":4018,"fill":977,"stroke":977,"className":4019,"style":1356},"M-13.571 83.627Q-13.340 83.866-12.793 83.866Q-12.540 83.866-12.317 83.742Q-12.094 83.619-11.924 83.403Q-11.754 83.186-11.661 82.955Q-11.536 82.643-11.497 82.303Q-11.458 81.963-11.458 81.514Q-11.626 81.846-11.909 82.041Q-12.192 82.237-12.532 82.237Q-12.895 82.237-13.208 82.092Q-13.520 81.948-13.743 81.696Q-13.965 81.444-14.088 81.117Q-14.211 80.791-14.211 80.436Q-14.211 79.940-13.969 79.530Q-13.727 79.119-13.309 78.885Q-12.891 78.651-12.395 78.651Q-11.438 78.651-11.057 79.481Q-10.676 80.311-10.676 81.385Q-10.676 82.018-10.926 82.662Q-11.176 83.307-11.659 83.723Q-12.141 84.139-12.793 84.139Q-13.297 84.139-13.647 83.922Q-13.997 83.705-13.997 83.237Q-13.997 83.069-13.883 82.955Q-13.770 82.842-13.602 82.842Q-13.497 82.842-13.405 82.893Q-13.313 82.944-13.262 83.035Q-13.211 83.127-13.211 83.237Q-13.211 83.385-13.313 83.506Q-13.415 83.627-13.571 83.627M-12.493 81.979Q-12.161 81.979-11.928 81.768Q-11.696 81.557-11.584 81.235Q-11.473 80.912-11.473 80.596Q-11.473 80.498-11.485 80.444Q-11.481 80.436-11.477 80.424Q-11.473 80.412-11.473 80.405Q-11.473 80.162-11.516 79.899Q-11.559 79.635-11.661 79.407Q-11.762 79.178-11.944 79.035Q-12.126 78.893-12.395 78.893Q-12.829 78.893-13.055 79.114Q-13.282 79.334-13.354 79.666Q-13.426 79.998-13.426 80.436Q-13.426 80.881-13.370 81.203Q-13.313 81.526-13.108 81.752Q-12.903 81.979-12.493 81.979",[998],[975,4021,4022,4025],{"fill":3809},[983,4023],{"stroke":985,"d":4024},"M45.57 3.468h50.102v-9.711H45.57Z",[975,4026,4027,4033,4038,4043,4048,4053,4058],{"fill":977,"stroke":985,"fontSize":1348},[975,4028,4030],{"transform":4029},"translate(104.485 -83.558)",[983,4031],{"d":3820,"fill":977,"stroke":977,"className":4032,"style":1356},[998],[975,4034,4035],{"transform":4029},[983,4036],{"d":3826,"fill":977,"stroke":977,"className":4037,"style":1356},[998],[975,4039,4040],{"transform":4029},[983,4041],{"d":3997,"fill":977,"stroke":977,"className":4042,"style":1356},[998],[975,4044,4045],{"transform":4029},[983,4046],{"d":3838,"fill":977,"stroke":977,"className":4047,"style":1356},[998],[975,4049,4050],{"transform":4029},[983,4051],{"d":3844,"fill":977,"stroke":977,"className":4052,"style":1356},[998],[975,4054,4055],{"transform":4029},[983,4056],{"d":3850,"fill":977,"stroke":977,"className":4057,"style":1356},[998],[975,4059,4060],{"transform":4029},[983,4061],{"d":4018,"fill":977,"stroke":977,"className":4062,"style":1356},[998],[975,4064,4065,4072,4078,4084],{"stroke":985,"fontFamily":1347,"fontSize":1348},[975,4066,4068],{"transform":4067},"translate(95.57 10.089)",[983,4069],{"d":4070,"fill":977,"stroke":977,"className":4071,"style":1356},"M-57.177 82.276Q-57.177 81.772-56.921 81.340Q-56.665 80.909-56.229 80.657Q-55.794 80.405-55.294 80.405Q-54.907 80.405-54.565 80.549Q-54.224 80.694-53.962 80.955Q-53.700 81.217-53.558 81.553Q-53.415 81.889-53.415 82.276Q-53.415 82.768-53.679 83.178Q-53.942 83.588-54.372 83.819Q-54.802 84.049-55.294 84.049Q-55.786 84.049-56.220 83.817Q-56.653 83.584-56.915 83.176Q-57.177 82.768-57.177 82.276M-55.294 83.772Q-54.837 83.772-54.585 83.549Q-54.333 83.326-54.245 82.975Q-54.157 82.623-54.157 82.178Q-54.157 81.748-54.251 81.410Q-54.345 81.073-54.599 80.866Q-54.852 80.659-55.294 80.659Q-55.942 80.659-56.186 81.075Q-56.431 81.491-56.431 82.178Q-56.431 82.623-56.343 82.975Q-56.255 83.326-56.003 83.549Q-55.751 83.772-55.294 83.772M-51.048 85.522L-52.903 85.522L-52.903 85.229Q-52.634 85.229-52.466 85.184Q-52.298 85.139-52.298 84.963L-52.298 81.139Q-52.298 80.932-52.454 80.879Q-52.610 80.826-52.903 80.826L-52.903 80.530L-51.681 80.444L-51.681 80.909Q-51.450 80.686-51.136 80.565Q-50.821 80.444-50.481 80.444Q-50.009 80.444-49.604 80.690Q-49.200 80.936-48.968 81.352Q-48.735 81.768-48.735 82.244Q-48.735 82.619-48.884 82.948Q-49.032 83.276-49.302 83.528Q-49.571 83.780-49.915 83.914Q-50.259 84.049-50.618 84.049Q-50.907 84.049-51.179 83.928Q-51.450 83.807-51.657 83.596L-51.657 84.963Q-51.657 85.139-51.489 85.184Q-51.321 85.229-51.048 85.229L-51.048 85.522M-51.657 81.307L-51.657 83.147Q-51.505 83.436-51.243 83.616Q-50.981 83.795-50.673 83.795Q-50.388 83.795-50.165 83.657Q-49.942 83.518-49.790 83.287Q-49.638 83.057-49.560 82.785Q-49.481 82.514-49.481 82.244Q-49.481 81.912-49.606 81.555Q-49.731 81.198-49.979 80.961Q-50.227 80.725-50.575 80.725Q-50.899 80.725-51.194 80.881Q-51.489 81.037-51.657 81.307M-47.587 83.010L-47.587 80.819L-48.290 80.819L-48.290 80.565Q-47.935 80.565-47.692 80.332Q-47.450 80.100-47.339 79.752Q-47.227 79.405-47.227 79.049L-46.946 79.049L-46.946 80.522L-45.770 80.522L-45.770 80.819L-46.946 80.819L-46.946 82.994Q-46.946 83.315-46.827 83.543Q-46.708 83.772-46.427 83.772Q-46.247 83.772-46.130 83.649Q-46.013 83.526-45.960 83.346Q-45.907 83.166-45.907 82.994L-45.907 82.522L-45.626 82.522L-45.626 83.010Q-45.626 83.264-45.731 83.504Q-45.837 83.744-46.034 83.897Q-46.231 84.049-46.489 84.049Q-46.806 84.049-47.058 83.926Q-47.310 83.803-47.448 83.569Q-47.587 83.334-47.587 83.010M-43.048 83.971L-44.825 83.971L-44.825 83.674Q-44.552 83.674-44.384 83.627Q-44.216 83.580-44.216 83.412L-44.216 81.276Q-44.216 81.061-44.272 80.965Q-44.329 80.869-44.442 80.848Q-44.556 80.826-44.802 80.826L-44.802 80.530L-43.602 80.444L-43.602 83.412Q-43.602 83.580-43.456 83.627Q-43.310 83.674-43.048 83.674L-43.048 83.971M-44.489 79.049Q-44.489 78.858-44.354 78.727Q-44.220 78.596-44.024 78.596Q-43.903 78.596-43.800 78.659Q-43.696 78.721-43.634 78.825Q-43.571 78.928-43.571 79.049Q-43.571 79.244-43.702 79.379Q-43.833 79.514-44.024 79.514Q-44.224 79.514-44.356 79.381Q-44.489 79.248-44.489 79.049M-40.618 83.971L-42.474 83.971L-42.474 83.674Q-42.200 83.674-42.032 83.627Q-41.864 83.580-41.864 83.412L-41.864 81.276Q-41.864 81.061-41.927 80.965Q-41.989 80.869-42.108 80.848Q-42.227 80.826-42.474 80.826L-42.474 80.530L-41.282 80.444L-41.282 81.178Q-41.169 80.963-40.976 80.795Q-40.782 80.627-40.544 80.535Q-40.306 80.444-40.052 80.444Q-39.091 80.444-38.915 81.155Q-38.731 80.826-38.403 80.635Q-38.075 80.444-37.696 80.444Q-36.520 80.444-36.520 81.522L-36.520 83.412Q-36.520 83.580-36.352 83.627Q-36.185 83.674-35.915 83.674L-35.915 83.971L-37.770 83.971L-37.770 83.674Q-37.497 83.674-37.329 83.629Q-37.161 83.584-37.161 83.412L-37.161 81.537Q-37.161 81.151-37.286 80.924Q-37.411 80.698-37.763 80.698Q-38.067 80.698-38.323 80.860Q-38.579 81.022-38.727 81.291Q-38.876 81.561-38.876 81.858L-38.876 83.412Q-38.876 83.580-38.706 83.627Q-38.536 83.674-38.267 83.674L-38.267 83.971L-40.122 83.971L-40.122 83.674Q-39.849 83.674-39.681 83.627Q-39.513 83.580-39.513 83.412L-39.513 81.537Q-39.513 81.151-39.638 80.924Q-39.763 80.698-40.114 80.698Q-40.419 80.698-40.675 80.860Q-40.931 81.022-41.079 81.291Q-41.227 81.561-41.227 81.858L-41.227 83.412Q-41.227 83.580-41.058 83.627Q-40.888 83.674-40.618 83.674L-40.618 83.971M-35.372 83.139Q-35.372 82.655-34.970 82.360Q-34.567 82.065-34.017 81.946Q-33.466 81.826-32.974 81.826L-32.974 81.537Q-32.974 81.311-33.089 81.104Q-33.204 80.897-33.401 80.778Q-33.599 80.659-33.829 80.659Q-34.255 80.659-34.540 80.764Q-34.470 80.791-34.423 80.846Q-34.376 80.901-34.351 80.971Q-34.325 81.041-34.325 81.116Q-34.325 81.221-34.376 81.313Q-34.427 81.405-34.519 81.455Q-34.610 81.506-34.716 81.506Q-34.821 81.506-34.913 81.455Q-35.005 81.405-35.056 81.313Q-35.106 81.221-35.106 81.116Q-35.106 80.698-34.718 80.551Q-34.329 80.405-33.829 80.405Q-33.497 80.405-33.144 80.535Q-32.790 80.666-32.561 80.920Q-32.333 81.174-32.333 81.522L-32.333 83.323Q-32.333 83.455-32.261 83.565Q-32.188 83.674-32.060 83.674Q-31.935 83.674-31.866 83.569Q-31.798 83.463-31.798 83.323L-31.798 82.811L-31.517 82.811L-31.517 83.323Q-31.517 83.526-31.634 83.684Q-31.751 83.842-31.933 83.926Q-32.114 84.010-32.317 84.010Q-32.548 84.010-32.700 83.838Q-32.852 83.666-32.884 83.436Q-33.044 83.717-33.352 83.883Q-33.661 84.049-34.013 84.049Q-34.524 84.049-34.948 83.826Q-35.372 83.604-35.372 83.139M-34.685 83.139Q-34.685 83.424-34.458 83.610Q-34.231 83.795-33.938 83.795Q-33.692 83.795-33.468 83.678Q-33.243 83.561-33.108 83.358Q-32.974 83.155-32.974 82.901L-32.974 82.069Q-33.239 82.069-33.524 82.123Q-33.810 82.178-34.081 82.307Q-34.352 82.436-34.519 82.643Q-34.685 82.850-34.685 83.139M-29.310 83.971L-31.142 83.971L-31.142 83.674Q-30.868 83.674-30.700 83.627Q-30.532 83.580-30.532 83.412L-30.532 79.252Q-30.532 79.037-30.595 78.942Q-30.657 78.846-30.776 78.825Q-30.895 78.803-31.142 78.803L-31.142 78.506L-29.919 78.420L-29.919 83.412Q-29.919 83.580-29.751 83.627Q-29.583 83.674-29.310 83.674L-29.310 83.971M-28.384 83.506Q-28.384 83.323-28.247 83.186Q-28.110 83.049-27.919 83.049Q-27.727 83.049-27.595 83.182Q-27.462 83.315-27.462 83.506Q-27.462 83.705-27.595 83.838Q-27.727 83.971-27.919 83.971Q-28.110 83.971-28.247 83.834Q-28.384 83.698-28.384 83.506M-28.384 80.979Q-28.384 80.795-28.247 80.659Q-28.110 80.522-27.919 80.522Q-27.727 80.522-27.595 80.655Q-27.462 80.787-27.462 80.979Q-27.462 81.178-27.595 81.311Q-27.727 81.444-27.919 81.444Q-28.110 81.444-28.247 81.307Q-28.384 81.170-28.384 80.979",[998],[975,4073,4074],{"transform":4067},[983,4075],{"d":4076,"fill":977,"stroke":977,"className":4077,"style":1356},"M-20.904 83.940L-22.127 81.084Q-22.209 80.909-22.353 80.864Q-22.498 80.819-22.767 80.819L-22.767 80.522L-21.056 80.522L-21.056 80.819Q-21.478 80.819-21.478 81.002Q-21.478 81.037-21.463 81.084L-20.517 83.276L-19.677 81.299Q-19.638 81.221-19.638 81.131Q-19.638 80.991-19.744 80.905Q-19.849 80.819-19.990 80.819L-19.990 80.522L-18.638 80.522L-18.638 80.819Q-19.162 80.819-19.377 81.299L-20.502 83.940Q-20.564 84.049-20.670 84.049L-20.736 84.049Q-20.849 84.049-20.904 83.940",[998],[975,4079,4080],{"transform":4067},[983,4081],{"d":4082,"fill":977,"stroke":977,"className":4083,"style":1356},"M-18.593 83.139Q-18.593 82.655-18.191 82.360Q-17.788 82.065-17.238 81.946Q-16.687 81.826-16.195 81.826L-16.195 81.537Q-16.195 81.311-16.310 81.104Q-16.425 80.897-16.622 80.778Q-16.820 80.659-17.050 80.659Q-17.476 80.659-17.761 80.764Q-17.691 80.791-17.644 80.846Q-17.597 80.901-17.572 80.971Q-17.546 81.041-17.546 81.116Q-17.546 81.221-17.597 81.313Q-17.648 81.405-17.740 81.455Q-17.831 81.506-17.937 81.506Q-18.042 81.506-18.134 81.455Q-18.226 81.405-18.277 81.313Q-18.327 81.221-18.327 81.116Q-18.327 80.698-17.939 80.551Q-17.550 80.405-17.050 80.405Q-16.718 80.405-16.365 80.535Q-16.011 80.666-15.783 80.920Q-15.554 81.174-15.554 81.522L-15.554 83.323Q-15.554 83.455-15.482 83.565Q-15.409 83.674-15.281 83.674Q-15.156 83.674-15.087 83.569Q-15.019 83.463-15.019 83.323L-15.019 82.811L-14.738 82.811L-14.738 83.323Q-14.738 83.526-14.855 83.684Q-14.972 83.842-15.154 83.926Q-15.335 84.010-15.538 84.010Q-15.769 84.010-15.921 83.838Q-16.074 83.666-16.105 83.436Q-16.265 83.717-16.574 83.883Q-16.882 84.049-17.234 84.049Q-17.745 84.049-18.169 83.826Q-18.593 83.604-18.593 83.139M-17.906 83.139Q-17.906 83.424-17.679 83.610Q-17.452 83.795-17.159 83.795Q-16.913 83.795-16.689 83.678Q-16.464 83.561-16.329 83.358Q-16.195 83.155-16.195 82.901L-16.195 82.069Q-16.460 82.069-16.745 82.123Q-17.031 82.178-17.302 82.307Q-17.574 82.436-17.740 82.643Q-17.906 82.850-17.906 83.139M-12.531 83.971L-14.363 83.971L-14.363 83.674Q-14.089 83.674-13.921 83.627Q-13.753 83.580-13.753 83.412L-13.753 79.252Q-13.753 79.037-13.816 78.942Q-13.878 78.846-13.997 78.825Q-14.116 78.803-14.363 78.803L-14.363 78.506L-13.140 78.420L-13.140 83.412Q-13.140 83.580-12.972 83.627Q-12.804 83.674-12.531 83.674L-12.531 83.971M-11.402 83.018L-11.402 81.276Q-11.402 81.061-11.464 80.965Q-11.527 80.869-11.646 80.848Q-11.765 80.826-12.011 80.826L-12.011 80.530L-10.765 80.444L-10.765 82.994L-10.765 83.018Q-10.765 83.330-10.710 83.492Q-10.656 83.655-10.505 83.725Q-10.355 83.795-10.034 83.795Q-9.605 83.795-9.331 83.457Q-9.058 83.119-9.058 82.674L-9.058 81.276Q-9.058 81.061-9.120 80.965Q-9.183 80.869-9.302 80.848Q-9.421 80.826-9.667 80.826L-9.667 80.530L-8.421 80.444L-8.421 83.229Q-8.421 83.440-8.359 83.535Q-8.296 83.631-8.177 83.653Q-8.058 83.674-7.812 83.674L-7.812 83.971L-9.034 84.049L-9.034 83.428Q-9.202 83.717-9.484 83.883Q-9.765 84.049-10.085 84.049Q-11.402 84.049-11.402 83.018M-7.366 82.217Q-7.366 81.737-7.134 81.321Q-6.902 80.905-6.491 80.655Q-6.081 80.405-5.605 80.405Q-4.874 80.405-4.476 80.846Q-4.077 81.287-4.077 82.018Q-4.077 82.123-4.171 82.147L-6.620 82.147L-6.620 82.217Q-6.620 82.627-6.499 82.983Q-6.378 83.338-6.107 83.555Q-5.835 83.772-5.406 83.772Q-5.042 83.772-4.745 83.543Q-4.449 83.315-4.347 82.963Q-4.339 82.916-4.253 82.901L-4.171 82.901Q-4.077 82.928-4.077 83.010Q-4.077 83.018-4.085 83.049Q-4.148 83.276-4.286 83.459Q-4.425 83.643-4.616 83.776Q-4.808 83.909-5.027 83.979Q-5.245 84.049-5.484 84.049Q-5.855 84.049-6.193 83.912Q-6.531 83.776-6.798 83.524Q-7.066 83.272-7.216 82.932Q-7.366 82.592-7.366 82.217M-6.613 81.909L-4.652 81.909Q-4.652 81.604-4.753 81.313Q-4.855 81.022-5.072 80.840Q-5.288 80.659-5.605 80.659Q-5.906 80.659-6.136 80.846Q-6.366 81.034-6.490 81.325Q-6.613 81.616-6.613 81.909",[998],[975,4085,4086],{"transform":4067},[983,4087],{"d":4088,"fill":977,"stroke":977,"className":4089,"style":1356},"M2.610 83.971L-0.183 83.971L-0.183 83.674Q0.879 83.674 0.879 83.412L0.879 79.244Q0.450 79.459-0.230 79.459L-0.230 79.162Q0.789 79.162 1.305 78.651L1.450 78.651Q1.524 78.670 1.543 78.748L1.543 83.412Q1.543 83.674 2.610 83.674L2.610 83.971M3.614 82.748Q3.614 82.252 3.940 81.887Q4.266 81.522 4.789 81.276L4.520 81.116Q4.223 80.932 4.039 80.637Q3.856 80.342 3.856 80.002Q3.856 79.608 4.075 79.297Q4.293 78.987 4.647 78.819Q5 78.651 5.383 78.651Q5.657 78.651 5.930 78.729Q6.204 78.807 6.420 78.955Q6.637 79.104 6.774 79.330Q6.911 79.557 6.911 79.850Q6.911 80.256 6.641 80.563Q6.371 80.869 5.950 81.084L6.399 81.354Q6.618 81.491 6.786 81.684Q6.954 81.877 7.051 82.116Q7.149 82.354 7.149 82.612Q7.149 82.951 6.998 83.239Q6.848 83.526 6.602 83.723Q6.356 83.920 6.032 84.030Q5.707 84.139 5.383 84.139Q4.954 84.139 4.547 83.977Q4.141 83.815 3.877 83.496Q3.614 83.178 3.614 82.748M4.102 82.748Q4.102 83.233 4.493 83.549Q4.883 83.866 5.383 83.866Q5.676 83.866 5.975 83.754Q6.274 83.643 6.467 83.424Q6.661 83.205 6.661 82.893Q6.661 82.662 6.520 82.451Q6.379 82.241 6.172 82.123L5.063 81.444Q4.645 81.647 4.373 81.983Q4.102 82.319 4.102 82.748M4.688 80.315L5.676 80.916Q6.024 80.733 6.250 80.463Q6.477 80.194 6.477 79.850Q6.477 79.631 6.385 79.455Q6.293 79.280 6.139 79.157Q5.985 79.034 5.784 78.963Q5.582 78.893 5.383 78.893Q4.977 78.893 4.631 79.104Q4.286 79.315 4.286 79.698Q4.286 79.881 4.397 80.043Q4.508 80.205 4.688 80.315",[998],[975,4091,4092,4099,4105],{"stroke":985,"fontFamily":1347,"fontSize":1348},[975,4093,4095],{"transform":4094},"translate(114.909 -145.797)",[983,4096],{"d":4097,"fill":977,"stroke":977,"className":4098,"style":1356},"M-56.263 83.971L-56.544 83.971L-56.544 79.252Q-56.544 79.037-56.606 78.942Q-56.669 78.846-56.786 78.825Q-56.903 78.803-57.149 78.803L-57.149 78.506L-55.927 78.420L-55.927 80.909Q-55.450 80.444-54.751 80.444Q-54.270 80.444-53.862 80.688Q-53.454 80.932-53.218 81.346Q-52.981 81.760-52.981 82.244Q-52.981 82.619-53.130 82.948Q-53.278 83.276-53.548 83.528Q-53.817 83.780-54.161 83.914Q-54.505 84.049-54.864 84.049Q-55.185 84.049-55.483 83.901Q-55.782 83.752-55.989 83.491L-56.263 83.971M-55.903 81.299L-55.903 83.139Q-55.751 83.436-55.491 83.616Q-55.231 83.795-54.919 83.795Q-54.493 83.795-54.226 83.576Q-53.958 83.358-53.843 83.012Q-53.727 82.666-53.727 82.244Q-53.727 81.596-53.976 81.147Q-54.224 80.698-54.821 80.698Q-55.157 80.698-55.446 80.856Q-55.735 81.014-55.903 81.299",[998],[975,4100,4101],{"transform":4094},[983,4102],{"d":4103,"fill":977,"stroke":977,"className":4104,"style":1356},"M-52.219 82.217Q-52.219 81.737-51.986 81.321Q-51.754 80.905-51.344 80.655Q-50.934 80.405-50.457 80.405Q-49.727 80.405-49.328 80.846Q-48.930 81.287-48.930 82.018Q-48.930 82.123-49.023 82.147L-51.473 82.147L-51.473 82.217Q-51.473 82.627-51.352 82.983Q-51.230 83.338-50.959 83.555Q-50.687 83.772-50.258 83.772Q-49.895 83.772-49.598 83.543Q-49.301 83.315-49.199 82.963Q-49.191 82.916-49.105 82.901L-49.023 82.901Q-48.930 82.928-48.930 83.010Q-48.930 83.018-48.937 83.049Q-49 83.276-49.139 83.459Q-49.277 83.643-49.469 83.776Q-49.660 83.909-49.879 83.979Q-50.098 84.049-50.336 84.049Q-50.707 84.049-51.045 83.912Q-51.383 83.776-51.650 83.524Q-51.918 83.272-52.068 82.932Q-52.219 82.592-52.219 82.217M-51.465 81.909L-49.504 81.909Q-49.504 81.604-49.605 81.313Q-49.707 81.022-49.924 80.840Q-50.141 80.659-50.457 80.659Q-50.758 80.659-50.988 80.846Q-51.219 81.034-51.342 81.325Q-51.465 81.616-51.465 81.909M-48.398 83.963L-48.398 82.741Q-48.398 82.713-48.367 82.682Q-48.336 82.651-48.312 82.651L-48.207 82.651Q-48.137 82.651-48.121 82.713Q-48.059 83.034-47.920 83.274Q-47.781 83.514-47.549 83.655Q-47.316 83.795-47.008 83.795Q-46.770 83.795-46.561 83.735Q-46.352 83.674-46.215 83.526Q-46.078 83.377-46.078 83.131Q-46.078 82.877-46.289 82.711Q-46.500 82.545-46.770 82.491L-47.391 82.377Q-47.797 82.299-48.098 82.043Q-48.398 81.787-48.398 81.412Q-48.398 81.045-48.197 80.823Q-47.996 80.600-47.672 80.502Q-47.348 80.405-47.008 80.405Q-46.543 80.405-46.246 80.612L-46.023 80.428Q-46 80.405-45.969 80.405L-45.918 80.405Q-45.887 80.405-45.859 80.432Q-45.832 80.459-45.832 80.491L-45.832 81.475Q-45.832 81.506-45.857 81.535Q-45.883 81.565-45.918 81.565L-46.023 81.565Q-46.059 81.565-46.086 81.537Q-46.113 81.510-46.113 81.475Q-46.113 81.076-46.365 80.856Q-46.617 80.635-47.016 80.635Q-47.371 80.635-47.654 80.758Q-47.937 80.881-47.937 81.186Q-47.937 81.405-47.736 81.537Q-47.535 81.670-47.289 81.713L-46.664 81.826Q-46.234 81.916-45.926 82.213Q-45.617 82.510-45.617 82.924Q-45.617 83.494-46.016 83.772Q-46.414 84.049-47.008 84.049Q-47.559 84.049-47.910 83.713L-48.207 84.026Q-48.230 84.049-48.266 84.049L-48.312 84.049Q-48.336 84.049-48.367 84.018Q-48.398 83.987-48.398 83.963M-44.465 83.010L-44.465 80.819L-45.168 80.819L-45.168 80.565Q-44.812 80.565-44.570 80.332Q-44.328 80.100-44.217 79.752Q-44.105 79.405-44.105 79.049L-43.824 79.049L-43.824 80.522L-42.648 80.522L-42.648 80.819L-43.824 80.819L-43.824 82.994Q-43.824 83.315-43.705 83.543Q-43.586 83.772-43.305 83.772Q-43.125 83.772-43.008 83.649Q-42.891 83.526-42.838 83.346Q-42.785 83.166-42.785 82.994L-42.785 82.522L-42.504 82.522L-42.504 83.010Q-42.504 83.264-42.609 83.504Q-42.715 83.744-42.912 83.897Q-43.109 84.049-43.367 84.049Q-43.684 84.049-43.936 83.926Q-44.187 83.803-44.326 83.569Q-44.465 83.334-44.465 83.010",[998],[975,4106,4107],{"transform":4094},[983,4108],{"d":4109,"fill":977,"stroke":977,"className":4110,"style":1356},"M-37.089 83.971L-38.921 83.971L-38.921 83.674Q-38.652 83.674-38.484 83.629Q-38.316 83.584-38.316 83.412L-38.316 80.819L-38.957 80.819L-38.957 80.522L-38.316 80.522L-38.316 79.588Q-38.316 79.174-38.007 78.893Q-37.699 78.612-37.253 78.475Q-36.808 78.338-36.402 78.338Q-35.999 78.338-35.681 78.565Q-35.363 78.791-35.363 79.178Q-35.363 79.354-35.476 79.467Q-35.589 79.580-35.761 79.580Q-35.937 79.580-36.050 79.467Q-36.164 79.354-36.164 79.178Q-36.164 79.034-36.074 78.924Q-35.984 78.815-35.851 78.787Q-36.136 78.596-36.484 78.596Q-36.781 78.596-37.068 78.717Q-37.355 78.838-37.539 79.071Q-37.722 79.303-37.722 79.604L-37.722 80.522L-36.570 80.522L-35.347 80.428L-35.347 83.412Q-35.347 83.580-35.179 83.627Q-35.011 83.674-34.738 83.674L-34.738 83.971L-36.570 83.971L-36.570 83.674Q-36.300 83.674-36.132 83.629Q-35.964 83.584-35.964 83.412L-35.964 81.252Q-35.964 81.045-36.011 80.946Q-36.058 80.846-36.234 80.819L-37.699 80.819L-37.699 83.412Q-37.699 83.580-37.531 83.627Q-37.363 83.674-37.089 83.674L-37.089 83.971M-33.605 83.010L-33.605 80.819L-34.308 80.819L-34.308 80.565Q-33.953 80.565-33.710 80.332Q-33.468 80.100-33.357 79.752Q-33.246 79.405-33.246 79.049L-32.964 79.049L-32.964 80.522L-31.789 80.522L-31.789 80.819L-32.964 80.819L-32.964 82.994Q-32.964 83.315-32.845 83.543Q-32.726 83.772-32.445 83.772Q-32.265 83.772-32.148 83.649Q-32.031 83.526-31.978 83.346Q-31.925 83.166-31.925 82.994L-31.925 82.522L-31.644 82.522L-31.644 83.010Q-31.644 83.264-31.749 83.504Q-31.855 83.744-32.052 83.897Q-32.249 84.049-32.507 84.049Q-32.824 84.049-33.076 83.926Q-33.328 83.803-33.466 83.569Q-33.605 83.334-33.605 83.010",[998],[1220,4112,4114,4115,4148,4149,4164,4165,4198,4199,4214,4215,4230,4231,3177,4246,4164,4261,4294,4295,1501],{"className":4113},[1223],"Greedy by density on the 0\u002F1 knapsack (",[481,4116,4118],{"className":4117},[484],[481,4119,4121,4139],{"className":4120,"ariaHidden":489},[488],[481,4122,4124,4127,4130,4133,4136],{"className":4123},[493],[481,4125],{"className":4126,"style":951},[497],[481,4128,3209],{"className":4129,"style":3208},[502,503],[481,4131],{"className":4132,"style":879},[721],[481,4134,1828],{"className":4135},[883],[481,4137],{"className":4138,"style":879},[721],[481,4140,4142,4145],{"className":4141},[493],[481,4143],{"className":4144,"style":1314},[497],[481,4146,1373],{"className":4147},[502],"). Left, greedy grabs the densest item ",[481,4150,4152],{"className":4151},[484],[481,4153,4155],{"className":4154,"ariaHidden":489},[488],[481,4156,4158,4161],{"className":4157},[493],[481,4159],{"className":4160,"style":1314},[497],[481,4162,418],{"className":4163},[502]," (",[481,4166,4168],{"className":4167},[484],[481,4169,4171,4189],{"className":4170,"ariaHidden":489},[488],[481,4172,4174,4177,4180,4183,4186],{"className":4173},[493],[481,4175],{"className":4176,"style":498},[497],[481,4178,3261],{"className":4179,"style":3260},[502,503],[481,4181],{"className":4182,"style":879},[721],[481,4184,1828],{"className":4185},[883],[481,4187],{"className":4188,"style":879},[721],[481,4190,4192,4195],{"className":4191},[493],[481,4193],{"className":4194,"style":1314},[497],[481,4196,3567],{"className":4197},[502],"), stranding ",[481,4200,4202],{"className":4201},[484],[481,4203,4205],{"className":4204,"ariaHidden":489},[488],[481,4206,4208,4211],{"className":4207},[493],[481,4209],{"className":4210,"style":1314},[497],[481,4212,3468],{"className":4213},[502]," units of unusable capacity for value ",[481,4216,4218],{"className":4217},[484],[481,4219,4221],{"className":4220,"ariaHidden":489},[488],[481,4222,4224,4227],{"className":4223},[493],[481,4225],{"className":4226,"style":1314},[497],[481,4228,3570],{"className":4229},[502],". Right, the optimum packs items ",[481,4232,4234],{"className":4233},[484],[481,4235,4237],{"className":4236,"ariaHidden":489},[488],[481,4238,4240,4243],{"className":4239},[493],[481,4241],{"className":4242,"style":1314},[497],[481,4244,450],{"className":4245},[502],[481,4247,4249],{"className":4248},[484],[481,4250,4252],{"className":4251,"ariaHidden":489},[488],[481,4253,4255,4258],{"className":4254},[493],[481,4256],{"className":4257,"style":1314},[497],[481,4259,1496],{"className":4260},[502],[481,4262,4264],{"className":4263},[484],[481,4265,4267,4285],{"className":4266,"ariaHidden":489},[488],[481,4268,4270,4273,4276,4279,4282],{"className":4269},[493],[481,4271],{"className":4272,"style":498},[497],[481,4274,3261],{"className":4275,"style":3260},[502,503],[481,4277],{"className":4278,"style":879},[721],[481,4280,1828],{"className":4281},[883],[481,4283],{"className":4284,"style":879},[721],[481,4286,4288,4291],{"className":4287},[493],[481,4289],{"className":4290,"style":1314},[497],[481,4292,1444],{"className":4293},[502]," each) for value ",[481,4296,4298],{"className":4297},[484],[481,4299,4301],{"className":4300,"ariaHidden":489},[488],[481,4302,4304,4307],{"className":4303},[493],[481,4305],{"className":4306,"style":1314},[497],[481,4308,3768],{"className":4309},[502],[774,4311,4313],{"type":4312},"remark",[381,4314,4315,4318,4319,4322,4323,4326],{},[385,4316,4317],{},"Remark (Greedy-choice failure)."," The fracture is precisely the ",[385,4320,4321],{},"greedy-choice property",". Taking the densest\nitem is ",[390,4324,4325],{},"not"," safe: no swap recovers an optimal solution that contains it,\nbecause the indivisible weight it consumes can strand the capacity it leaves\nbehind. The leftover space, not just the leftover items, depends on the whole\ncombination — so the choice cannot be made locally.",[381,4328,4329,4330,4333,4334,4349],{},"This is exactly the boundary between greedy and dynamic programming. The 0\u002F1\nknapsack has optimal substructure but ",[390,4331,4332],{},"lacks"," the greedy-choice property, so it\nneeds DP, which considers both alternatives (take item ",[481,4335,4337],{"className":4336},[484],[481,4338,4340],{"className":4339,"ariaHidden":489},[488],[481,4341,4343,4346],{"className":4342},[493],[481,4344],{"className":4345,"style":521},[497],[481,4347,525],{"className":4348},[502,503]," or skip it) rather\nthan committing to one. The fractional version restores the greedy-choice\nproperty because a fraction can always absorb the leftover capacity exactly,\nleaving no stranded space to regret.",[420,4351,4353,4354,4357],{"id":4352},"when-is-greed-good-a-glimpse-of-matroids","When ",[390,4355,4356],{},"is"," greed good? A glimpse of matroids",[381,4359,4360,4361,4365,4366,1501],{},"It would be wonderful to have a theorem of the form ",[4362,4363,4364],"q",{},"greedy is optimal exactly when…",". For a large and important family of problems, such a theorem exists, and\nits language is the ",[412,4367,4368],{"href":227},[385,4369,4370],{},"matroid",[381,4372,4373,4374,4408,4409,4424,4425,4440,4441,4444],{},"A matroid is a pair ",[481,4375,4377],{"className":4376},[484],[481,4378,4380],{"className":4379,"ariaHidden":489},[488],[481,4381,4383,4386,4389,4393,4396,4399,4405],{"className":4382},[493],[481,4384],{"className":4385,"style":667},[497],[481,4387,1584],{"className":4388},[671],[481,4390,4392],{"className":4391,"style":955},[502,503],"E",[481,4394,717],{"className":4395},[716],[481,4397],{"className":4398,"style":722},[721],[481,4400,4404],{"className":4401,"style":4403},[502,4402],"mathcal","margin-right:0.0738em;","I",[481,4406,767],{"className":4407},[766]," built from a finite ground set ",[481,4410,4412],{"className":4411},[484],[481,4413,4415],{"className":4414,"ariaHidden":489},[488],[481,4416,4418,4421],{"className":4417},[493],[481,4419],{"className":4420,"style":951},[497],[481,4422,4392],{"className":4423,"style":955},[502,503]," and a family\n",[481,4426,4428],{"className":4427},[484],[481,4429,4431],{"className":4430,"ariaHidden":489},[488],[481,4432,4434,4437],{"className":4433},[493],[481,4435],{"className":4436,"style":951},[497],[481,4438,4404],{"className":4439,"style":4403},[502,4402]," of ",[4362,4442,4443],{},"independent"," subsets, satisfying two axioms:",[435,4446,4447,4560],{},[438,4448,4449,4452,4453,3177,4488,4525,4526,4559],{},[385,4450,4451],{},"Heredity."," If ",[481,4454,4456],{"className":4455},[484],[481,4457,4459,4479],{"className":4458,"ariaHidden":489},[488],[481,4460,4462,4466,4470,4473,4476],{"className":4461},[493],[481,4463],{"className":4464,"style":4465},[497],"height:0.7224em;vertical-align:-0.0391em;",[481,4467,4469],{"className":4468},[502,503],"A",[481,4471],{"className":4472,"style":879},[721],[481,4474,2259],{"className":4475},[883],[481,4477],{"className":4478,"style":879},[721],[481,4480,4482,4485],{"className":4481},[493],[481,4483],{"className":4484,"style":951},[497],[481,4486,4404],{"className":4487,"style":4403},[502,4402],[481,4489,4491],{"className":4490},[484],[481,4492,4494,4516],{"className":4493,"ariaHidden":489},[488],[481,4495,4497,4501,4506,4509,4513],{"className":4496},[493],[481,4498],{"className":4499,"style":4500},[497],"height:0.8193em;vertical-align:-0.136em;",[481,4502,4505],{"className":4503,"style":4504},[502,503],"margin-right:0.0502em;","B",[481,4507],{"className":4508,"style":879},[721],[481,4510,4512],{"className":4511},[883],"⊆",[481,4514],{"className":4515,"style":879},[721],[481,4517,4519,4522],{"className":4518},[493],[481,4520],{"className":4521,"style":951},[497],[481,4523,4469],{"className":4524},[502,503],", then\n",[481,4527,4529],{"className":4528},[484],[481,4530,4532,4550],{"className":4531,"ariaHidden":489},[488],[481,4533,4535,4538,4541,4544,4547],{"className":4534},[493],[481,4536],{"className":4537,"style":4465},[497],[481,4539,4505],{"className":4540,"style":4504},[502,503],[481,4542],{"className":4543,"style":879},[721],[481,4545,2259],{"className":4546},[883],[481,4548],{"className":4549,"style":879},[721],[481,4551,4553,4556],{"className":4552},[493],[481,4554],{"className":4555,"style":951},[497],[481,4557,4404],{"className":4558,"style":4403},[502,4402],". (Subsets of independent sets are independent.)",[438,4561,4562,4452,4565,3177,4608,4659,4660,4713,4714,4774],{},[385,4563,4564],{},"Exchange.",[481,4566,4568],{"className":4567},[484],[481,4569,4571,4599],{"className":4570,"ariaHidden":489},[488],[481,4572,4574,4578,4581,4584,4587,4590,4593,4596],{"className":4573},[493],[481,4575],{"className":4576,"style":4577},[497],"height:0.8778em;vertical-align:-0.1944em;",[481,4579,4469],{"className":4580},[502,503],[481,4582,717],{"className":4583},[716],[481,4585],{"className":4586,"style":722},[721],[481,4588,4505],{"className":4589,"style":4504},[502,503],[481,4591],{"className":4592,"style":879},[721],[481,4594,2259],{"className":4595},[883],[481,4597],{"className":4598,"style":879},[721],[481,4600,4602,4605],{"className":4601},[493],[481,4603],{"className":4604,"style":951},[497],[481,4606,4404],{"className":4607,"style":4403},[502,4402],[481,4609,4611],{"className":4610},[484],[481,4612,4614,4641],{"className":4613,"ariaHidden":489},[488],[481,4615,4617,4620,4632,4635,4638],{"className":4616},[493],[481,4618],{"className":4619,"style":667},[497],[481,4621,4623,4626,4629],{"className":4622},[808],[481,4624,2596],{"className":4625,"style":1959},[671,1958],[481,4627,4469],{"className":4628},[502,503],[481,4630,2596],{"className":4631,"style":1959},[766,1958],[481,4633],{"className":4634,"style":879},[721],[481,4636,884],{"className":4637},[883],[481,4639],{"className":4640,"style":879},[721],[481,4642,4644,4647],{"className":4643},[493],[481,4645],{"className":4646,"style":667},[497],[481,4648,4650,4653,4656],{"className":4649},[808],[481,4651,2596],{"className":4652,"style":1959},[671,1958],[481,4654,4505],{"className":4655,"style":4504},[502,503],[481,4657,2596],{"className":4658,"style":1959},[766,1958],", then some\nelement ",[481,4661,4663],{"className":4662},[484],[481,4664,4666,4686,4704],{"className":4665,"ariaHidden":489},[488],[481,4667,4669,4673,4677,4680,4683],{"className":4668},[493],[481,4670],{"className":4671,"style":4672},[497],"height:0.5782em;vertical-align:-0.0391em;",[481,4674,4676],{"className":4675},[502,503],"x",[481,4678],{"className":4679,"style":879},[721],[481,4681,2259],{"className":4682},[883],[481,4684],{"className":4685,"style":879},[721],[481,4687,4689,4692,4695,4698,4701],{"className":4688},[493],[481,4690],{"className":4691,"style":667},[497],[481,4693,4505],{"className":4694,"style":4504},[502,503],[481,4696],{"className":4697,"style":1938},[721],[481,4699,1942],{"className":4700},[1743],[481,4702],{"className":4703,"style":1938},[721],[481,4705,4707,4710],{"className":4706},[493],[481,4708],{"className":4709,"style":951},[497],[481,4711,4469],{"className":4712},[502,503]," has ",[481,4715,4717],{"className":4716},[484],[481,4718,4720,4738,4765],{"className":4719,"ariaHidden":489},[488],[481,4721,4723,4726,4729,4732,4735],{"className":4722},[493],[481,4724],{"className":4725,"style":951},[497],[481,4727,4469],{"className":4728},[502,503],[481,4730],{"className":4731,"style":1938},[721],[481,4733,1975],{"className":4734},[1743],[481,4736],{"className":4737,"style":1938},[721],[481,4739,4741,4744,4756,4759,4762],{"className":4740},[493],[481,4742],{"className":4743,"style":667},[497],[481,4745,4747,4750,4753],{"className":4746},[808],[481,4748,1243],{"className":4749,"style":1959},[671,1958],[481,4751,4676],{"className":4752},[502,503],[481,4754,1280],{"className":4755,"style":1959},[766,1958],[481,4757],{"className":4758,"style":879},[721],[481,4760,2259],{"className":4761},[883],[481,4763],{"className":4764,"style":879},[721],[481,4766,4768,4771],{"className":4767},[493],[481,4769],{"className":4770,"style":951},[497],[481,4772,4404],{"className":4773,"style":4403},[502,4402],". (A smaller\nindependent set can always be grown using an element of a larger one.)",[381,4776,4777],{},"The forests of a graph form a matroid: subsets of a forest are forests, and a\nsmaller forest can always borrow an edge from a larger one without making a\ncycle.",[962,4779,4781,4903],{"className":4780},[965,966],[968,4782,4786],{"xmlns":970,"width":4783,"height":4784,"viewBox":4785},"173.082","137.841","-75 -75 129.811 103.381",[975,4787,4788,4791,4798,4801,4808,4811,4818,4821,4828,4843,4846,4849,4888],{"stroke":977,"style":978},[983,4789],{"fill":985,"d":4790},"M-48.332-31.799a8.536 8.536 0 1 0-17.071 0 8.536 8.536 0 0 0 17.071 0Zm-8.536 0",[975,4792,4794],{"transform":4793},"translate(-2.312 -36.934)",[983,4795],{"d":4796,"fill":977,"stroke":977,"className":4797,"style":3800},"M-52.961 8.035L-55.993 8.035L-55.993 7.719Q-54.842 7.719-54.842 7.424L-54.842 2.700Q-55.330 2.933-56.051 2.933L-56.051 2.617Q-54.921 2.617-54.359 2.041L-54.214 2.041Q-54.179 2.041-54.146 2.074Q-54.113 2.107-54.113 2.142L-54.113 7.424Q-54.113 7.719-52.961 7.719",[998],[983,4799],{"fill":985,"d":4800},"M-8.498-31.799a8.536 8.536 0 1 0-17.072 0 8.536 8.536 0 0 0 17.072 0Zm-8.536 0",[975,4802,4804],{"transform":4803},"translate(37.521 -36.934)",[983,4805],{"d":4806,"fill":977,"stroke":977,"className":4807,"style":3800},"M-52.961 8.035L-56.411 8.035L-56.411 7.802Q-56.411 7.789-56.380 7.758L-54.926 6.181Q-54.460 5.684-54.207 5.379Q-53.954 5.073-53.763 4.662Q-53.572 4.251-53.572 3.812Q-53.572 3.223-53.895 2.790Q-54.218 2.357-54.798 2.357Q-55.062 2.357-55.308 2.467Q-55.554 2.577-55.730 2.764Q-55.906 2.951-56.002 3.201L-55.923 3.201Q-55.721 3.201-55.578 3.337Q-55.435 3.473-55.435 3.689Q-55.435 3.895-55.578 4.034Q-55.721 4.172-55.923 4.172Q-56.125 4.172-56.268 4.029Q-56.411 3.887-56.411 3.689Q-56.411 3.227-56.174 2.854Q-55.936 2.480-55.536 2.261Q-55.137 2.041-54.688 2.041Q-54.165 2.041-53.711 2.256Q-53.256 2.472-52.983 2.871Q-52.711 3.271-52.711 3.812Q-52.711 4.207-52.882 4.561Q-53.054 4.915-53.319 5.194Q-53.585 5.473-54.036 5.858Q-54.486 6.242-54.565 6.317L-55.589 7.279L-54.772 7.279Q-54.121 7.279-53.684 7.268Q-53.247 7.257-53.216 7.235Q-53.146 7.152-53.091 6.912Q-53.036 6.673-52.996 6.405L-52.711 6.405",[998],[983,4809],{"fill":985,"d":4810},"M-48.332 8.035a8.536 8.536 0 1 0-17.071 0 8.536 8.536 0 0 0 17.071 0Zm-8.536 0",[975,4812,4814],{"transform":4813},"translate(-2.312 2.9)",[983,4815],{"d":4816,"fill":977,"stroke":977,"className":4817,"style":3800},"M-55.967 7.314L-56.011 7.314Q-55.809 7.631-55.422 7.789Q-55.035 7.947-54.609 7.947Q-54.073 7.947-53.834 7.512Q-53.594 7.077-53.594 6.497Q-53.594 5.917-53.840 5.477Q-54.086 5.038-54.618 5.038L-55.238 5.038Q-55.264 5.038-55.297 5.009Q-55.330 4.981-55.330 4.959L-55.330 4.858Q-55.330 4.827-55.301 4.803Q-55.273 4.779-55.238 4.779L-54.719 4.739Q-54.253 4.739-54.007 4.267Q-53.761 3.794-53.761 3.276Q-53.761 2.849-53.974 2.575Q-54.187 2.300-54.609 2.300Q-54.952 2.300-55.277 2.430Q-55.602 2.559-55.787 2.814L-55.761 2.814Q-55.558 2.814-55.422 2.955Q-55.286 3.096-55.286 3.293Q-55.286 3.491-55.420 3.625Q-55.554 3.759-55.752 3.759Q-55.954 3.759-56.092 3.625Q-56.231 3.491-56.231 3.293Q-56.231 2.704-55.728 2.373Q-55.224 2.041-54.609 2.041Q-54.231 2.041-53.829 2.181Q-53.427 2.322-53.159 2.601Q-52.891 2.880-52.891 3.276Q-52.891 3.825-53.245 4.262Q-53.598 4.700-54.139 4.884Q-53.748 4.963-53.403 5.187Q-53.058 5.411-52.847 5.752Q-52.636 6.093-52.636 6.488Q-52.636 6.870-52.799 7.193Q-52.961 7.516-53.253 7.752Q-53.546 7.987-53.893 8.110Q-54.240 8.233-54.609 8.233Q-55.057 8.233-55.488 8.072Q-55.919 7.912-56.200 7.585Q-56.481 7.257-56.481 6.800Q-56.481 6.585-56.334 6.442Q-56.187 6.299-55.967 6.299Q-55.756 6.299-55.611 6.444Q-55.466 6.589-55.466 6.800Q-55.466 7.011-55.613 7.163Q-55.761 7.314-55.967 7.314",[998],[983,4819],{"fill":985,"d":4820},"M-8.498 8.035a8.536 8.536 0 1 0-17.072 0 8.536 8.536 0 0 0 17.072 0Zm-8.536 0",[975,4822,4824],{"transform":4823},"translate(37.521 2.9)",[983,4825],{"d":4826,"fill":977,"stroke":977,"className":4827,"style":3800},"M-54.170 6.558L-56.609 6.558L-56.609 6.242L-53.783 2.094Q-53.739 2.041-53.673 2.041L-53.519 2.041Q-53.480 2.041-53.447 2.074Q-53.414 2.107-53.414 2.151L-53.414 6.242L-52.513 6.242L-52.513 6.558L-53.414 6.558L-53.414 7.424Q-53.414 7.719-52.513 7.719L-52.513 8.035L-55.066 8.035L-55.066 7.719Q-54.706 7.719-54.438 7.664Q-54.170 7.609-54.170 7.424L-54.170 6.558M-54.113 3.069L-56.275 6.242L-54.113 6.242",[998],[975,4829,4830,4837],{"stroke":985,"fontSize":3582},[975,4831,4833],{"transform":4832},"translate(3.692 -59.471)",[983,4834],{"d":4835,"fill":977,"stroke":977,"className":4836,"style":3800},"M-54.328 8.035L-56.560 8.035L-56.560 7.719Q-56.253 7.719-56.062 7.666Q-55.870 7.613-55.870 7.424L-55.870 4.471L-56.560 4.471L-56.560 4.155L-55.870 4.155L-55.870 3.087Q-55.870 2.704-55.657 2.381Q-55.444 2.058-55.090 1.874Q-54.737 1.689-54.359 1.689Q-54.038 1.689-53.787 1.867Q-53.537 2.045-53.537 2.357Q-53.537 2.533-53.656 2.652Q-53.774 2.770-53.950 2.770Q-54.130 2.770-54.253 2.652Q-54.376 2.533-54.376 2.357Q-54.376 2.116-54.161 1.988Q-54.266 1.953-54.403 1.953Q-54.671 1.953-54.853 2.135Q-55.035 2.318-55.128 2.588Q-55.220 2.858-55.220 3.122L-55.220 4.155L-54.170 4.155L-54.170 4.471L-55.194 4.471L-55.194 7.424Q-55.194 7.613-54.937 7.666Q-54.680 7.719-54.328 7.719L-54.328 8.035M-53.783 6.128Q-53.783 5.561-53.511 5.073Q-53.238 4.585-52.768 4.293Q-52.298 4.001-51.731 4.001Q-51.309 4.001-50.933 4.170Q-50.557 4.339-50.281 4.631Q-50.004 4.924-49.846 5.319Q-49.687 5.715-49.687 6.128Q-49.687 6.677-49.966 7.139Q-50.245 7.600-50.713 7.868Q-51.181 8.136-51.731 8.136Q-52.285 8.136-52.755 7.868Q-53.225 7.600-53.504 7.139Q-53.783 6.677-53.783 6.128M-51.731 7.846Q-51.234 7.846-50.957 7.585Q-50.681 7.323-50.588 6.919Q-50.496 6.514-50.496 6.018Q-50.496 5.543-50.595 5.154Q-50.694 4.765-50.966 4.515Q-51.239 4.264-51.731 4.264Q-52.443 4.264-52.706 4.759Q-52.970 5.253-52.970 6.018Q-52.970 6.818-52.715 7.332Q-52.460 7.846-51.731 7.846M-46.941 8.035L-49.173 8.035L-49.173 7.719Q-48.861 7.719-48.670 7.666Q-48.479 7.613-48.479 7.424L-48.479 4.976Q-48.479 4.735-48.549 4.627Q-48.619 4.519-48.753 4.495Q-48.888 4.471-49.173 4.471L-49.173 4.155L-47.859 4.058L-47.859 4.919Q-47.697 4.528-47.429 4.293Q-47.160 4.058-46.769 4.058Q-46.497 4.058-46.282 4.221Q-46.066 4.383-46.066 4.642Q-46.066 4.818-46.185 4.937Q-46.304 5.056-46.479 5.056Q-46.660 5.056-46.778 4.937Q-46.897 4.818-46.897 4.642Q-46.897 4.427-46.743 4.317L-46.761 4.317Q-47.139 4.317-47.371 4.579Q-47.604 4.840-47.703 5.227Q-47.802 5.614-47.802 5.974L-47.802 7.424Q-47.802 7.613-47.545 7.666Q-47.288 7.719-46.941 7.719L-46.941 8.035M-43.495 8.136Q-44.054 8.136-44.526 7.853Q-44.998 7.569-45.273 7.092Q-45.548 6.616-45.548 6.062Q-45.548 5.666-45.405 5.291Q-45.262 4.915-45.005 4.627Q-44.748 4.339-44.390 4.170Q-44.032 4.001-43.627 4.001Q-43.082 4.001-42.711 4.238Q-42.340 4.475-42.153 4.893Q-41.966 5.310-41.966 5.847Q-41.966 5.899-41.990 5.937Q-42.014 5.974-42.063 5.974L-44.735 5.974L-44.735 6.053Q-44.735 6.800-44.423 7.323Q-44.111 7.846-43.412 7.846Q-43.008 7.846-42.687 7.589Q-42.366 7.332-42.243 6.928Q-42.225 6.848-42.142 6.848L-42.063 6.848Q-42.023 6.848-41.995 6.879Q-41.966 6.910-41.966 6.954L-41.966 6.989Q-42.072 7.332-42.294 7.591Q-42.515 7.850-42.830 7.993Q-43.144 8.136-43.495 8.136M-44.726 5.723L-42.612 5.723Q-42.612 5.455-42.665 5.209Q-42.718 4.963-42.838 4.741Q-42.959 4.519-43.157 4.392Q-43.355 4.264-43.627 4.264Q-43.970 4.264-44.223 4.489Q-44.475 4.713-44.601 5.051Q-44.726 5.389-44.726 5.723M-41.386 8.053L-41.386 6.611Q-41.386 6.580-41.358 6.556Q-41.329 6.532-41.298 6.532L-41.188 6.532Q-41.153 6.532-41.131 6.554Q-41.109 6.576-41.100 6.611Q-40.841 7.872-39.874 7.872Q-39.448 7.872-39.154 7.688Q-38.859 7.503-38.859 7.099Q-38.859 6.805-39.090 6.609Q-39.321 6.413-39.633 6.352L-40.235 6.233Q-40.701 6.145-41.043 5.862Q-41.386 5.578-41.386 5.139Q-41.386 4.546-40.949 4.273Q-40.512 4.001-39.874 4.001Q-39.395 4.001-39.048 4.247L-38.798 4.023Q-38.741 4.001-38.741 4.001L-38.688 4.001Q-38.661 4.001-38.628 4.027Q-38.596 4.054-38.596 4.084L-38.596 5.244Q-38.596 5.275-38.631 5.302Q-38.666 5.328-38.688 5.328L-38.798 5.328Q-38.820 5.328-38.853 5.299Q-38.886 5.271-38.886 5.244Q-38.886 4.779-39.151 4.508Q-39.417 4.238-39.883 4.238Q-40.287 4.238-40.591 4.383Q-40.894 4.528-40.894 4.884Q-40.894 5.130-40.676 5.284Q-40.459 5.438-40.182 5.495L-39.554 5.622Q-39.237 5.684-38.967 5.851Q-38.697 6.018-38.530 6.284Q-38.363 6.550-38.363 6.866Q-38.363 7.508-38.789 7.822Q-39.215 8.136-39.874 8.136Q-40.147 8.136-40.413 8.042Q-40.679 7.947-40.859 7.758L-41.180 8.097Q-41.197 8.136-41.245 8.136L-41.298 8.136Q-41.320 8.136-41.353 8.108Q-41.386 8.079-41.386 8.053M-37.115 6.963L-37.115 4.471L-37.879 4.471L-37.879 4.212Q-37.475 4.212-37.209 3.946Q-36.943 3.680-36.822 3.280Q-36.701 2.880-36.701 2.498L-36.411 2.498L-36.411 4.155L-35.124 4.155L-35.124 4.471L-36.411 4.471L-36.411 6.928Q-36.411 7.297-36.286 7.571Q-36.161 7.846-35.836 7.846Q-35.537 7.846-35.399 7.552Q-35.260 7.257-35.260 6.928L-35.260 6.405L-34.974 6.405L-34.974 6.963Q-34.974 7.240-35.084 7.512Q-35.194 7.785-35.407 7.960Q-35.620 8.136-35.902 8.136Q-36.262 8.136-36.535 7.998Q-36.807 7.859-36.961 7.596Q-37.115 7.332-37.115 6.963",[998],[975,4838,4839],{"transform":4832},[983,4840],{"d":4841,"fill":977,"stroke":977,"className":4842,"style":3800},"M-29.192 8.035L-30.923 8.035Q-31.020 8.035-31.020 7.916Q-31.020 7.859-30.989 7.789Q-30.958 7.719-30.897 7.719Q-30.207 7.719-29.807 7.108Q-29.807 7.108-29.781 7.081L-26.511 1.698Q-26.450 1.593-26.322 1.593L-26.234 1.593Q-26.111 1.593-26.098 1.698L-25.470 7.530Q-25.426 7.648-25.235 7.683Q-25.043 7.719-24.784 7.719Q-24.740 7.719-24.707 7.756Q-24.674 7.793-24.674 7.828Q-24.674 8.035-24.837 8.035L-27.069 8.035Q-27.109 8.035-27.140 7.995Q-27.170 7.956-27.170 7.916Q-27.170 7.855-27.135 7.787Q-27.100 7.719-27.043 7.719Q-26.766 7.719-26.557 7.675Q-26.349 7.631-26.305 7.477L-26.467 5.992L-28.788 5.992L-29.508 7.187Q-29.592 7.310-29.592 7.433Q-29.592 7.591-29.451 7.655Q-29.311 7.719-29.130 7.719Q-29.086 7.719-29.060 7.752Q-29.034 7.785-29.034 7.828Q-29.034 8.035-29.192 8.035M-26.819 2.753L-28.590 5.675L-26.502 5.675",[998],[983,4844],{"fill":985,"d":4845,"style":981},"M-48.132-31.799h22.362M-48.132 8.035h22.362",[983,4847],{"fill":985,"stroke":1134,"d":4848,"style":1135},"M-17.034-23.063V-.701",[975,4850,4851,4858,4864,4870,4876,4882],{"fill":1134,"stroke":985,"fontSize":1348},[975,4852,4854],{"transform":4853},"translate(69.55 -17.917)",[983,4855],{"d":4856,"fill":1134,"stroke":1134,"className":4857,"style":1356},"M-56.532 7.203Q-56.532 6.719-56.130 6.424Q-55.727 6.129-55.177 6.010Q-54.626 5.890-54.134 5.890L-54.134 5.601Q-54.134 5.375-54.249 5.168Q-54.364 4.961-54.561 4.842Q-54.759 4.723-54.989 4.723Q-55.415 4.723-55.700 4.828Q-55.630 4.855-55.583 4.910Q-55.536 4.965-55.511 5.035Q-55.485 5.105-55.485 5.180Q-55.485 5.285-55.536 5.377Q-55.587 5.469-55.679 5.519Q-55.770 5.570-55.876 5.570Q-55.981 5.570-56.073 5.519Q-56.165 5.469-56.216 5.377Q-56.266 5.285-56.266 5.180Q-56.266 4.762-55.878 4.615Q-55.489 4.469-54.989 4.469Q-54.657 4.469-54.304 4.599Q-53.950 4.730-53.722 4.984Q-53.493 5.238-53.493 5.586L-53.493 7.387Q-53.493 7.519-53.421 7.629Q-53.348 7.738-53.220 7.738Q-53.095 7.738-53.026 7.633Q-52.958 7.527-52.958 7.387L-52.958 6.875L-52.677 6.875L-52.677 7.387Q-52.677 7.590-52.794 7.748Q-52.911 7.906-53.093 7.990Q-53.274 8.074-53.477 8.074Q-53.708 8.074-53.860 7.902Q-54.013 7.730-54.044 7.500Q-54.204 7.781-54.513 7.947Q-54.821 8.113-55.173 8.113Q-55.684 8.113-56.108 7.890Q-56.532 7.668-56.532 7.203M-55.845 7.203Q-55.845 7.488-55.618 7.674Q-55.391 7.859-55.098 7.859Q-54.852 7.859-54.628 7.742Q-54.403 7.625-54.268 7.422Q-54.134 7.219-54.134 6.965L-54.134 6.133Q-54.399 6.133-54.684 6.187Q-54.970 6.242-55.241 6.371Q-55.513 6.500-55.679 6.707Q-55.845 6.914-55.845 7.203M-50.567 8.113Q-51.048 8.113-51.456 7.869Q-51.864 7.625-52.102 7.211Q-52.341 6.797-52.341 6.308Q-52.341 5.816-52.083 5.400Q-51.825 4.984-51.393 4.746Q-50.962 4.508-50.470 4.508Q-49.848 4.508-49.399 4.945L-49.399 3.316Q-49.399 3.101-49.462 3.006Q-49.524 2.910-49.641 2.889Q-49.759 2.867-50.005 2.867L-50.005 2.570L-48.782 2.484L-48.782 7.293Q-48.782 7.504-48.720 7.599Q-48.657 7.695-48.540 7.717Q-48.423 7.738-48.173 7.738L-48.173 8.035L-49.423 8.113L-49.423 7.629Q-49.888 8.113-50.567 8.113M-50.501 7.859Q-50.161 7.859-49.868 7.668Q-49.575 7.476-49.423 7.180L-49.423 5.348Q-49.571 5.074-49.833 4.918Q-50.095 4.762-50.407 4.762Q-51.032 4.762-51.315 5.209Q-51.598 5.656-51.598 6.316Q-51.598 6.961-51.347 7.410Q-51.095 7.859-50.501 7.859M-45.848 8.113Q-46.329 8.113-46.737 7.869Q-47.145 7.625-47.384 7.211Q-47.622 6.797-47.622 6.308Q-47.622 5.816-47.364 5.400Q-47.106 4.984-46.675 4.746Q-46.243 4.508-45.751 4.508Q-45.130 4.508-44.681 4.945L-44.681 3.316Q-44.681 3.101-44.743 3.006Q-44.806 2.910-44.923 2.889Q-45.040 2.867-45.286 2.867L-45.286 2.570L-44.063 2.484L-44.063 7.293Q-44.063 7.504-44.001 7.599Q-43.938 7.695-43.821 7.717Q-43.704 7.738-43.454 7.738L-43.454 8.035L-44.704 8.113L-44.704 7.629Q-45.169 8.113-45.848 8.113M-45.782 7.859Q-45.442 7.859-45.149 7.668Q-44.856 7.476-44.704 7.180L-44.704 5.348Q-44.852 5.074-45.114 4.918Q-45.376 4.762-45.688 4.762Q-46.313 4.762-46.597 5.209Q-46.880 5.656-46.880 6.316Q-46.880 6.961-46.628 7.410Q-46.376 7.859-45.782 7.859",[998],[975,4859,4860],{"transform":4853},[983,4861],{"d":4862,"fill":1134,"stroke":1134,"className":4863,"style":1356},"M-38.531 8.980L-38.531 7.043Q-38.531 6.765-38.703 6.564Q-38.875 6.363-39.137 6.264Q-39.399 6.164-39.668 6.164Q-39.695 6.164-39.725 6.135Q-39.754 6.105-39.754 6.074L-39.754 5.996Q-39.754 5.965-39.725 5.935Q-39.695 5.906-39.668 5.906Q-39.238 5.906-38.885 5.672Q-38.531 5.437-38.531 5.027L-38.531 3.090Q-38.531 2.797-38.371 2.588Q-38.211 2.379-37.961 2.260Q-37.711 2.140-37.426 2.088Q-37.141 2.035-36.852 2.035L-36.774 2.035Q-36.746 2.035-36.715 2.066Q-36.684 2.098-36.684 2.125L-36.684 2.203Q-36.684 2.234-36.713 2.264Q-36.742 2.293-36.774 2.293Q-37.028 2.293-37.293 2.381Q-37.559 2.469-37.729 2.652Q-37.899 2.836-37.899 3.105L-37.899 5.043Q-37.899 5.305-38.029 5.502Q-38.160 5.699-38.375 5.832Q-38.590 5.965-38.844 6.035Q-38.449 6.140-38.174 6.392Q-37.899 6.644-37.899 7.027L-37.899 8.965Q-37.899 9.234-37.729 9.418Q-37.559 9.601-37.295 9.689Q-37.031 9.777-36.774 9.777Q-36.742 9.777-36.713 9.806Q-36.684 9.836-36.684 9.867L-36.684 9.945Q-36.684 9.973-36.715 10.004Q-36.746 10.035-36.774 10.035L-36.852 10.035Q-37.110 10.035-37.401 9.984Q-37.692 9.933-37.953 9.810Q-38.215 9.687-38.373 9.476Q-38.531 9.265-38.531 8.980",[998],[975,4865,4866],{"transform":4853},[983,4867],{"d":4868,"fill":1134,"stroke":1134,"className":4869,"style":1356},"M-32.503 8.035L-35.663 8.035L-35.663 7.828Q-35.663 7.801-35.640 7.769L-34.288 6.371Q-33.909 5.984-33.661 5.695Q-33.413 5.406-33.239 5.049Q-33.066 4.691-33.066 4.301Q-33.066 3.953-33.198 3.660Q-33.331 3.367-33.585 3.189Q-33.839 3.012-34.194 3.012Q-34.554 3.012-34.845 3.207Q-35.136 3.402-35.280 3.730L-35.226 3.730Q-35.042 3.730-34.917 3.851Q-34.792 3.973-34.792 4.164Q-34.792 4.344-34.917 4.473Q-35.042 4.601-35.226 4.601Q-35.405 4.601-35.534 4.473Q-35.663 4.344-35.663 4.164Q-35.663 3.762-35.443 3.426Q-35.222 3.090-34.857 2.902Q-34.491 2.715-34.089 2.715Q-33.609 2.715-33.193 2.902Q-32.776 3.090-32.525 3.451Q-32.273 3.812-32.273 4.301Q-32.273 4.660-32.427 4.963Q-32.581 5.265-32.833 5.525Q-33.085 5.785-33.435 6.070Q-33.784 6.355-33.952 6.508L-34.882 7.348L-34.167 7.348Q-32.792 7.348-32.753 7.308Q-32.683 7.230-32.640 7.045Q-32.597 6.859-32.554 6.570L-32.273 6.570",[998],[975,4871,4872],{"transform":4853},[983,4873],{"d":4874,"fill":1134,"stroke":1134,"className":4875,"style":1356},"M-31.015 9.441Q-31.015 9.418-30.984 9.371Q-30.691 9.109-30.525 8.742Q-30.359 8.375-30.359 7.988L-30.359 7.930Q-30.487 8.035-30.655 8.035Q-30.847 8.035-30.984 7.902Q-31.120 7.769-31.120 7.570Q-31.120 7.379-30.984 7.246Q-30.847 7.113-30.655 7.113Q-30.355 7.113-30.230 7.383Q-30.105 7.652-30.105 7.988Q-30.105 8.437-30.286 8.851Q-30.468 9.265-30.808 9.562Q-30.831 9.586-30.870 9.586Q-30.917 9.586-30.966 9.541Q-31.015 9.496-31.015 9.441",[998],[975,4877,4878],{"transform":4853},[983,4879],{"d":4880,"fill":1134,"stroke":1134,"className":4881,"style":1356},"M-25.582 6.723L-27.824 6.723L-27.824 6.426L-25.253 2.769Q-25.214 2.715-25.152 2.715L-25.007 2.715Q-24.957 2.715-24.925 2.746Q-24.894 2.777-24.894 2.828L-24.894 6.426L-24.062 6.426L-24.062 6.723L-24.894 6.723L-24.894 7.476Q-24.894 7.738-24.070 7.738L-24.070 8.035L-26.406 8.035L-26.406 7.738Q-25.582 7.738-25.582 7.476L-25.582 6.723M-25.527 3.621L-27.496 6.426L-25.527 6.426",[998],[975,4883,4884],{"transform":4853},[983,4885],{"d":4886,"fill":1134,"stroke":1134,"className":4887,"style":1356},"M-23.226 9.945L-23.226 9.867Q-23.226 9.836-23.197 9.806Q-23.167 9.777-23.140 9.777Q-22.710 9.777-22.357 9.568Q-22.003 9.359-22.003 8.965L-22.003 7.027Q-22.003 6.648-21.732 6.394Q-21.460 6.140-21.058 6.035Q-21.468 5.922-21.736 5.672Q-22.003 5.422-22.003 5.043L-22.003 3.105Q-22.003 2.703-22.357 2.498Q-22.710 2.293-23.140 2.293Q-23.167 2.293-23.197 2.264Q-23.226 2.234-23.226 2.203L-23.226 2.125Q-23.226 2.098-23.195 2.066Q-23.164 2.035-23.140 2.035L-23.058 2.035Q-22.675 2.035-22.291 2.133Q-21.906 2.230-21.638 2.469Q-21.371 2.707-21.371 3.090L-21.371 5.027Q-21.371 5.441-21.023 5.674Q-20.675 5.906-20.246 5.906Q-20.214 5.906-20.185 5.935Q-20.156 5.965-20.156 5.996L-20.156 6.074Q-20.156 6.105-20.185 6.135Q-20.214 6.164-20.246 6.164Q-20.675 6.164-21.023 6.396Q-21.371 6.629-21.371 7.043L-21.371 8.980Q-21.371 9.363-21.638 9.601Q-21.906 9.840-22.291 9.937Q-22.675 10.035-23.058 10.035L-23.140 10.035Q-23.164 10.035-23.195 10.004Q-23.226 9.973-23.226 9.945",[998],[975,4889,4890,4897],{"fill":1134,"stroke":985,"fontFamily":1347,"fontSize":1348},[975,4891,4893],{"transform":4892},"translate(69.905 -.845)",[983,4894],{"d":4895,"fill":1134,"stroke":1134,"className":4896,"style":1356},"M-54.251 10.027Q-54.864 9.570-55.266 8.935Q-55.669 8.301-55.864 7.555Q-56.059 6.808-56.059 6.035Q-56.059 5.262-55.864 4.515Q-55.669 3.769-55.266 3.135Q-54.864 2.500-54.251 2.043Q-54.239 2.039-54.231 2.037Q-54.223 2.035-54.212 2.035L-54.134 2.035Q-54.095 2.035-54.069 2.062Q-54.044 2.090-54.044 2.133Q-54.044 2.183-54.075 2.203Q-54.583 2.656-54.905 3.279Q-55.227 3.902-55.368 4.598Q-55.509 5.293-55.509 6.035Q-55.509 6.769-55.370 7.469Q-55.231 8.168-54.907 8.793Q-54.583 9.418-54.075 9.867Q-54.044 9.887-54.044 9.937Q-54.044 9.980-54.069 10.008Q-54.095 10.035-54.134 10.035L-54.212 10.035Q-54.220 10.031-54.229 10.029Q-54.239 10.027-54.251 10.027M-51.395 8.035L-53.251 8.035L-53.251 7.738Q-52.977 7.738-52.809 7.691Q-52.641 7.644-52.641 7.476L-52.641 5.340Q-52.641 5.125-52.704 5.029Q-52.766 4.933-52.886 4.912Q-53.005 4.890-53.251 4.890L-53.251 4.594L-52.059 4.508L-52.059 5.242Q-51.946 5.027-51.753 4.859Q-51.559 4.691-51.321 4.599Q-51.083 4.508-50.829 4.508Q-49.661 4.508-49.661 5.586L-49.661 7.476Q-49.661 7.644-49.491 7.691Q-49.321 7.738-49.052 7.738L-49.052 8.035L-50.907 8.035L-50.907 7.738Q-50.634 7.738-50.466 7.691Q-50.298 7.644-50.298 7.476L-50.298 5.601Q-50.298 5.219-50.419 4.990Q-50.540 4.762-50.891 4.762Q-51.204 4.762-51.458 4.924Q-51.712 5.086-51.858 5.355Q-52.005 5.625-52.005 5.922L-52.005 7.476Q-52.005 7.644-51.835 7.691Q-51.665 7.738-51.395 7.738L-51.395 8.035M-48.606 6.340Q-48.606 5.836-48.350 5.404Q-48.095 4.973-47.659 4.721Q-47.223 4.469-46.723 4.469Q-46.337 4.469-45.995 4.613Q-45.653 4.758-45.391 5.019Q-45.130 5.281-44.987 5.617Q-44.845 5.953-44.845 6.340Q-44.845 6.832-45.108 7.242Q-45.372 7.652-45.802 7.883Q-46.231 8.113-46.723 8.113Q-47.216 8.113-47.649 7.881Q-48.083 7.648-48.345 7.240Q-48.606 6.832-48.606 6.340M-46.723 7.836Q-46.266 7.836-46.014 7.613Q-45.763 7.390-45.675 7.039Q-45.587 6.687-45.587 6.242Q-45.587 5.812-45.681 5.474Q-45.774 5.137-46.028 4.930Q-46.282 4.723-46.723 4.723Q-47.372 4.723-47.616 5.139Q-47.860 5.555-47.860 6.242Q-47.860 6.687-47.772 7.039Q-47.684 7.390-47.432 7.613Q-47.181 7.836-46.723 7.836",[998],[975,4898,4899],{"transform":4892},[983,4900],{"d":4901,"fill":1134,"stroke":1134,"className":4902,"style":1356},"M-41.475 6.308Q-41.475 5.812-41.225 5.387Q-40.975 4.961-40.555 4.715Q-40.135 4.469-39.635 4.469Q-39.096 4.469-38.705 4.594Q-38.315 4.719-38.315 5.133Q-38.315 5.238-38.365 5.330Q-38.416 5.422-38.508 5.473Q-38.600 5.523-38.709 5.523Q-38.815 5.523-38.906 5.473Q-38.998 5.422-39.049 5.330Q-39.100 5.238-39.100 5.133Q-39.100 4.910-38.932 4.805Q-39.154 4.746-39.627 4.746Q-39.924 4.746-40.139 4.885Q-40.354 5.023-40.485 5.254Q-40.615 5.484-40.674 5.754Q-40.733 6.023-40.733 6.308Q-40.733 6.703-40.600 7.053Q-40.467 7.402-40.195 7.619Q-39.924 7.836-39.526 7.836Q-39.151 7.836-38.875 7.619Q-38.600 7.402-38.498 7.043Q-38.483 6.980-38.420 6.980L-38.315 6.980Q-38.279 6.980-38.254 7.008Q-38.229 7.035-38.229 7.074L-38.229 7.098Q-38.361 7.578-38.746 7.846Q-39.131 8.113-39.635 8.113Q-39.998 8.113-40.332 7.976Q-40.666 7.840-40.926 7.590Q-41.186 7.340-41.330 7.004Q-41.475 6.668-41.475 6.308M-37.322 9.332Q-37.209 9.410-37.033 9.410Q-36.744 9.410-36.524 9.197Q-36.303 8.984-36.178 8.683L-35.889 8.035L-37.162 5.148Q-37.244 4.973-37.389 4.928Q-37.533 4.883-37.803 4.883L-37.803 4.586L-36.084 4.586L-36.084 4.883Q-36.506 4.883-36.506 5.066Q-36.506 5.078-36.490 5.148L-35.553 7.273L-34.721 5.363Q-34.682 5.273-34.682 5.195Q-34.682 5.055-34.783 4.969Q-34.885 4.883-35.026 4.883L-35.026 4.586L-33.674 4.586L-33.674 4.883Q-33.928 4.883-34.121 5.008Q-34.315 5.133-34.420 5.363L-35.865 8.683Q-35.979 8.937-36.145 9.160Q-36.311 9.383-36.539 9.525Q-36.768 9.668-37.033 9.668Q-37.330 9.668-37.570 9.476Q-37.811 9.285-37.811 8.996Q-37.811 8.840-37.705 8.738Q-37.600 8.637-37.451 8.637Q-37.346 8.637-37.266 8.683Q-37.186 8.730-37.139 8.808Q-37.092 8.887-37.092 8.996Q-37.092 9.117-37.152 9.205Q-37.213 9.293-37.322 9.332M-33.217 6.308Q-33.217 5.812-32.967 5.387Q-32.717 4.961-32.297 4.715Q-31.877 4.469-31.377 4.469Q-30.838 4.469-30.447 4.594Q-30.057 4.719-30.057 5.133Q-30.057 5.238-30.108 5.330Q-30.158 5.422-30.250 5.473Q-30.342 5.523-30.451 5.523Q-30.557 5.523-30.649 5.473Q-30.740 5.422-30.791 5.330Q-30.842 5.238-30.842 5.133Q-30.842 4.910-30.674 4.805Q-30.897 4.746-31.369 4.746Q-31.666 4.746-31.881 4.885Q-32.096 5.023-32.227 5.254Q-32.358 5.484-32.416 5.754Q-32.475 6.023-32.475 6.308Q-32.475 6.703-32.342 7.053Q-32.209 7.402-31.938 7.619Q-31.666 7.836-31.268 7.836Q-30.893 7.836-30.617 7.619Q-30.342 7.402-30.240 7.043Q-30.225 6.980-30.162 6.980L-30.057 6.980Q-30.022 6.980-29.996 7.008Q-29.971 7.035-29.971 7.074L-29.971 7.098Q-30.104 7.578-30.488 7.846Q-30.873 8.113-31.377 8.113Q-31.740 8.113-32.074 7.976Q-32.408 7.840-32.668 7.590Q-32.928 7.340-33.072 7.004Q-33.217 6.668-33.217 6.308M-27.569 8.035L-29.401 8.035L-29.401 7.738Q-29.127 7.738-28.959 7.691Q-28.791 7.644-28.791 7.476L-28.791 3.316Q-28.791 3.101-28.854 3.006Q-28.916 2.910-29.035 2.889Q-29.154 2.867-29.401 2.867L-29.401 2.570L-28.178 2.484L-28.178 7.476Q-28.178 7.644-28.010 7.691Q-27.842 7.738-27.569 7.738L-27.569 8.035M-27.123 6.281Q-27.123 5.801-26.891 5.385Q-26.658 4.969-26.248 4.719Q-25.838 4.469-25.361 4.469Q-24.631 4.469-24.233 4.910Q-23.834 5.351-23.834 6.082Q-23.834 6.187-23.928 6.211L-26.377 6.211L-26.377 6.281Q-26.377 6.691-26.256 7.047Q-26.135 7.402-25.863 7.619Q-25.592 7.836-25.162 7.836Q-24.799 7.836-24.502 7.607Q-24.205 7.379-24.104 7.027Q-24.096 6.980-24.010 6.965L-23.928 6.965Q-23.834 6.992-23.834 7.074Q-23.834 7.082-23.842 7.113Q-23.904 7.340-24.043 7.523Q-24.182 7.707-24.373 7.840Q-24.565 7.973-24.783 8.043Q-25.002 8.113-25.240 8.113Q-25.611 8.113-25.949 7.976Q-26.287 7.840-26.555 7.588Q-26.822 7.336-26.973 6.996Q-27.123 6.656-27.123 6.281M-26.369 5.973L-24.408 5.973Q-24.408 5.668-24.510 5.377Q-24.611 5.086-24.828 4.904Q-25.045 4.723-25.361 4.723Q-25.662 4.723-25.893 4.910Q-26.123 5.098-26.246 5.389Q-26.369 5.680-26.369 5.973M-22.944 10.035L-23.026 10.035Q-23.061 10.035-23.086 10.006Q-23.111 9.976-23.111 9.937Q-23.111 9.887-23.080 9.867Q-22.694 9.531-22.410 9.082Q-22.127 8.633-21.961 8.133Q-21.795 7.633-21.721 7.115Q-21.647 6.598-21.647 6.035Q-21.647 5.465-21.721 4.949Q-21.795 4.433-21.961 3.937Q-22.127 3.441-22.406 2.994Q-22.686 2.547-23.080 2.203Q-23.111 2.183-23.111 2.133Q-23.111 2.094-23.086 2.064Q-23.061 2.035-23.026 2.035L-22.944 2.035Q-22.932 2.035-22.922 2.037Q-22.912 2.039-22.904 2.043Q-22.291 2.500-21.889 3.135Q-21.486 3.769-21.291 4.515Q-21.096 5.262-21.096 6.035Q-21.096 6.808-21.291 7.555Q-21.486 8.301-21.889 8.935Q-22.291 9.570-22.904 10.027Q-22.916 10.027-22.924 10.029Q-22.932 10.031-22.944 10.035",[998],[1220,4904,4906,4907,4922,4923,4938,4939,4954,4955,4970,4971,1501],{"className":4905},[1223],"The graphic matroid's exchange property. Forest ",[481,4908,4910],{"className":4909},[484],[481,4911,4913],{"className":4912,"ariaHidden":489},[488],[481,4914,4916,4919],{"className":4915},[493],[481,4917],{"className":4918,"style":951},[497],[481,4920,4469],{"className":4921},[502,503]," (two edges) is smaller than some larger forest ",[481,4924,4926],{"className":4925},[484],[481,4927,4929],{"className":4928,"ariaHidden":489},[488],[481,4930,4932,4935],{"className":4931},[493],[481,4933],{"className":4934,"style":951},[497],[481,4936,4505],{"className":4937,"style":4504},[502,503],"; an edge of ",[481,4940,4942],{"className":4941},[484],[481,4943,4945],{"className":4944,"ariaHidden":489},[488],[481,4946,4948,4951],{"className":4947},[493],[481,4949],{"className":4950,"style":951},[497],[481,4952,4505],{"className":4953,"style":4504},[502,503]," (blue) joins two of ",[481,4956,4958],{"className":4957},[484],[481,4959,4961],{"className":4960,"ariaHidden":489},[488],[481,4962,4964,4967],{"className":4963},[493],[481,4965],{"className":4966,"style":951},[497],[481,4968,4469],{"className":4969},[502,503],"'s trees without making a cycle, growing ",[481,4972,4974],{"className":4973},[484],[481,4975,4977],{"className":4976,"ariaHidden":489},[488],[481,4978,4980,4983],{"className":4979},[493],[481,4981],{"className":4982,"style":951},[497],[481,4984,4469],{"className":4985},[502,503],[381,4987,4988,4989,4992,4999],{},"The headline result, due to Rado and Edmonds, is that ",[385,4990,4991],{},"the greedy\nalgorithm computes a maximum-weight independent set if and only if the structure\nis a matroid.",[409,4993,4994],{},[412,4995,1444],{"href":4996,"ariaDescribedBy":4997,"dataFootnoteRef":376,"id":4998},"#user-content-fn-clrs-matroid",[416],"user-content-fnref-clrs-matroid"," That single theorem is the deep reason Kruskal's minimum\nspanning tree algorithm, which greedily adds the cheapest edge that creates no cycle,\nis correct: it is greedy on the graphic matroid. Activity selection, too, is\ngreedy on a matroid in disguise.",[381,5001,5002,5003,5005,5006,5009,5010,5012],{},"Matroids do not cover ",[390,5004,3172],{}," successful greedy algorithm. Huffman coding, our\nnext lesson, lives outside the theory, yet they explain a remarkable swath of\nthem and turn ",[4362,5007,5008],{},"does greed work here?"," from an art into, sometimes, a checkable\ncondition. We will not develop the theory further here; the point is that there\n",[390,5011,4356],{}," a theory, and the exchange axiom that defines it is the same exchange idea\nthat powers our correctness proofs.",[420,5014,5016],{"id":5015},"a-recipe-for-greedy-algorithms","A recipe for greedy algorithms",[381,5018,5019],{},"Drawing the three books together, the workflow is always the same:",[5021,5022,5023,5029,5039,5045],"ol",{},[438,5024,5025,5028],{},[385,5026,5027],{},"Cast the problem"," as a sequence of choices, where each choice leaves a\nsmaller subproblem of the same kind.",[438,5030,5031,5034,5035,5038],{},[385,5032,5033],{},"Guess a greedy rule"," — the locally optimal choice. Beware: the ",[390,5036,5037],{},"obvious","\nrule is often wrong (recall the failed activity-selection rules).",[438,5040,5041,5044],{},[385,5042,5043],{},"Prove the greedy-choice property"," with an exchange argument: any optimal\nsolution can be massaged to contain the greedy choice.",[438,5046,5047,5050],{},[385,5048,5049],{},"Prove optimal substructure"," and combine, by induction, into a full proof.",[381,5052,5053],{},"If steps 3 and 4 go through, you have a correct, usually fast, usually simple\nalgorithm. If they do not, you have learned something too: reach for dynamic\nprogramming instead.",[420,5055,5057],{"id":5056},"takeaways","Takeaways",[435,5059,5060,5068,5077,5127,5137],{},[438,5061,383,5062,5064,5065,1501],{},[385,5063,387],{}," makes the locally optimal choice at each step and never\nreconsiders. It is fast and simple, ",[390,5066,5067],{},"when it is correct",[438,5069,5070,5071,5073,5074,5076],{},"Correctness needs two properties: the ",[385,5072,4321],{}," (some optimal\nsolution contains the greedy choice) and ",[385,5075,3073],{}," (what\nremains is the same problem, smaller).",[438,5078,5079,5082,5083,5086,5087,5126],{},[385,5080,5081],{},"Activity selection"," by earliest finish time is the canonical win; its proof\nis the template ",[385,5084,5085],{},"exchange argument"," plus induction. Cost: ",[481,5088,5090],{"className":5089},[484],[481,5091,5093],{"className":5092,"ariaHidden":489},[488],[481,5094,5096,5099,5102,5105,5108,5111,5117,5120,5123],{"className":5095},[493],[481,5097],{"className":5098,"style":667},[497],[481,5100,1580],{"className":5101},[502],[481,5103,1584],{"className":5104},[671],[481,5106,504],{"className":5107},[502,503],[481,5109],{"className":5110,"style":722},[721],[481,5112,5114],{"className":5113},[1619],[481,5115,1625],{"className":5116,"style":1624},[502,1623],[481,5118],{"className":5119,"style":722},[721],[481,5121,504],{"className":5122},[502,503],[481,5124,767],{"className":5125},[766],",\nall in the sort.",[438,5128,5129,5130,5132,5133,5136],{},"The ",[385,5131,3474],{}," is the canonical failure: it lacks the greedy-choice\nproperty, so greed strands capacity and needs dynamic programming instead. Its\n",[390,5134,5135],{},"fractional"," cousin restores the property and yields to greed.",[438,5138,5139,5142],{},[385,5140,5141],{},"Matroids"," characterize a broad class where greedy is provably optimal\n(Kruskal's MST among them), the formal echo of the exchange argument itself.",[5144,5145,5148,5153],"section",{"className":5146,"dataFootnotes":376},[5147],"footnotes",[420,5149,5152],{"className":5150,"id":416},[5151],"sr-only","Footnotes",[5021,5154,5155,5169,5181,5192,5204],{},[438,5156,5158,5161,5162],{"id":5157},"user-content-fn-erickson-greedy",[385,5159,5160],{},"Erickson",", Ch. 4 — Greedy Algorithms: the warning that most greedy strategies are wrong and must be proved correct, not merely tested. ",[412,5163,5168],{"href":5164,"ariaLabel":5165,"className":5166,"dataFootnoteBackref":376},"#user-content-fnref-erickson-greedy","Back to reference 1",[5167],"data-footnote-backref","↩",[438,5170,5172,5175,5176],{"id":5171},"user-content-fn-clrs-greedy",[385,5173,5174],{},"CLRS",", Ch. 16 — Greedy Algorithms (§16.2): the greedy-choice property as one of the two ingredients licensing a greedy algorithm. ",[412,5177,5168],{"href":5178,"ariaLabel":5179,"className":5180,"dataFootnoteBackref":376},"#user-content-fnref-clrs-greedy","Back to reference 2",[5167],[438,5182,5184,5186,5187],{"id":5183},"user-content-fn-clrs-activity",[385,5185,5174],{},", Ch. 16 — Greedy Algorithms (§16.1): the activity-selection problem solved by repeatedly choosing the earliest-finishing compatible activity. ",[412,5188,5168],{"href":5189,"ariaLabel":5190,"className":5191,"dataFootnoteBackref":376},"#user-content-fnref-clrs-activity","Back to reference 3",[5167],[438,5193,5195,5198,5199],{"id":5194},"user-content-fn-skiena-greedy",[385,5196,5197],{},"Skiena",", §1.4 & §5 — Heuristics; Weighted Graph Algorithms: the fractional knapsack solved greedily by value density. ",[412,5200,5168],{"href":5201,"ariaLabel":5202,"className":5203,"dataFootnoteBackref":376},"#user-content-fnref-skiena-greedy","Back to reference 4",[5167],[438,5205,5207,5209,5210],{"id":5206},"user-content-fn-clrs-matroid",[385,5208,5174],{},", Ch. 16 — Greedy Algorithms (§16.4): the Rado–Edmonds theorem that greedy yields a maximum-weight independent set exactly when the structure is a matroid. ",[412,5211,5168],{"href":5212,"ariaLabel":5213,"className":5214,"dataFootnoteBackref":376},"#user-content-fnref-clrs-matroid","Back to reference 5",[5167],[5216,5217,5218],"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":5220},[5221,5222,5225,5226,5227,5229,5230,5231],{"id":422,"depth":18,"text":423},{"id":475,"depth":18,"text":476,"children":5223},[5224],{"id":1289,"depth":24,"text":1290},{"id":1638,"depth":18,"text":1639},{"id":3184,"depth":18,"text":3185},{"id":4352,"depth":18,"text":5228},"When is greed good? A glimpse of matroids",{"id":5015,"depth":18,"text":5016},{"id":5056,"depth":18,"text":5057},{"id":416,"depth":18,"text":5152},"A greedy algorithm builds up a solution piece by piece, and at every step it\ntakes the option that looks best right now (the largest, the smallest, the\ncheapest, the soonest) with no regard for the choices still to come and no\nwillingness to revisit a choice already made. It is the algorithmic embodiment\nof optimism: grab the locally optimal thing and trust that it adds up to a\nglobally optimal whole.","md",{"moduleNumber":108,"lessonNumber":6,"order":5235},601,true,[5238,5242,5246,5249,5252,5255],{"title":5239,"slug":5240,"difficulty":5241},"Assign Cookies","assign-cookies","Easy",{"title":5243,"slug":5244,"difficulty":5245},"Jump Game","jump-game","Medium",{"title":5247,"slug":5248,"difficulty":5245},"Jump Game II","jump-game-ii",{"title":5250,"slug":5251,"difficulty":5245},"Gas Station","gas-station",{"title":5253,"slug":5254,"difficulty":5245},"Non-overlapping Intervals","non-overlapping-intervals",{"title":5256,"slug":5257,"difficulty":5245},"Task Scheduler","task-scheduler","---\ntitle: The Greedy Method\nmodule: Greedy Algorithms\nmoduleNumber: 6\nlessonNumber: 1\norder: 601\nsummary: >-\n  A greedy algorithm builds a solution one locally-best choice at a time and\n  never looks back. We pin down the two properties that make this work — the\n  greedy-choice property and optimal substructure — prove the canonical\n  activity-selection algorithm correct with an exchange argument, watch greedy\n  fail spectacularly on the 0\u002F1 knapsack, and glimpse matroids as the theory\n  that says exactly when greed is good.\ntopics: [Greedy Algorithms]\nsources:\n  - book: CLRS\n    ref: \"Ch. 16 — Greedy Algorithms\"\n  - book: Skiena\n    ref: \"§1.4 & §5 — Heuristics; Weighted Graph Algorithms\"\n  - book: Erickson\n    ref: \"Ch. 4 — Greedy Algorithms\"\npractice:\n  - title: 'Assign Cookies'\n    slug: assign-cookies\n    difficulty: Easy\n  - title: 'Jump Game'\n    slug: jump-game\n    difficulty: Medium\n  - title: 'Jump Game II'\n    slug: jump-game-ii\n    difficulty: Medium\n  - title: 'Gas Station'\n    slug: gas-station\n    difficulty: Medium\n  - title: 'Non-overlapping Intervals'\n    slug: non-overlapping-intervals\n    difficulty: Medium\n  - title: 'Task Scheduler'\n    slug: task-scheduler\n    difficulty: Medium\n---\n\nA **greedy algorithm** builds up a solution piece by piece, and at every step it\ntakes the option that looks best _right now_ (the largest, the smallest, the\ncheapest, the soonest) with no regard for the choices still to come and no\nwillingness to revisit a choice already made. It is the algorithmic embodiment\nof optimism: _grab the locally optimal thing and trust that it adds up to a\nglobally optimal whole._\n\nSometimes that optimism is justified, and the result is an algorithm of\nastonishing simplicity and speed. Sometimes it is naive, and the algorithm\nreturns confidently wrong answers. The entire art of the greedy method is\ntelling the two cases apart, and the only way to know you are in the good case\nis to **prove it**. Erickson puts the warning bluntly: most greedy algorithms\nare _wrong_, and a greedy strategy that has not been proved correct should be\ntreated as a plausible guess, nothing more.[^erickson-greedy]\n\n## What makes greedy work\n\n[Dynamic programming](\u002Falgorithms\u002Fdynamic-programming\u002Fprinciples), which we meet in a later module, considers _all_ the ways a\nproblem decomposes and picks the best. Greedy algorithms are bolder: they commit\nto one choice immediately and recurse on what remains. Two structural properties\nare what license that boldness.\n\n- **The greedy-choice property.**[^clrs-greedy] There exists an optimal solution that contains\n  the greedy (locally optimal) first choice. We never have to look ahead: a\n  best-looking-now choice is _safe_, since some optimal solution agrees with it.\n- **Optimal substructure.** After making the greedy choice, what remains is a\n  smaller instance of the _same problem_, and an optimal solution to the whole\n  is the greedy choice plus an optimal solution to that subproblem.\n\nOptimal substructure is shared with dynamic programming. The greedy-choice\nproperty is the extra gift: it collapses the many subproblems DP would explore\ndown to a _single_ one. That is why greedy algorithms, when they work, are so\nmuch faster than their DP cousins. Proving these two properties, not running\nthe code on a few examples, is what separates a correct greedy algorithm from a\nhopeful heuristic.\n\n## The canonical example: activity selection\n\nHere is the problem on which to build all intuition. We are given $n$\n**activities** that all want the same resource: a lecture hall, a tennis court,\na single CPU. Activity $i$ has a start time $s_i$ and a finish time $f_i$, and\noccupies the half-open interval $[s_i, f_i)$. Two activities are **compatible**\nif their intervals do not overlap. We want to select a largest possible set of\nmutually compatible activities.\n\n> **Input:** activities $1, \\dots, n$ with start\u002Ffinish times $s_i \u003C f_i$.\n> **Output:** a maximum-size set $S$ of pairwise compatible activities.\n\nDrawn on a number line, an instance and one optimal schedule look like this. The\nshaded bars are the chosen activities; they tile the timeline without overlap.\n\n$$\n% caption: Timeline of activities as interval bars with a maximum compatible set shaded.\n\\begin{tikzpicture}[xscale=0.62, yscale=0.62,\n  act\u002F.style={draw, thick, rounded corners, minimum height=5mm, fill=black!8},\n  chosen\u002F.style={draw=acc, very thick, rounded corners, minimum height=5mm, fill=acc!15}]\n  \\definecolor{acc}{HTML}{2348F2}\n  % time axis\n  \\draw[->, thick] (0,-0.6) -- (13,-0.6) node[right] {time};\n  \\foreach \\x in {0,1,...,12} \\draw (\\x,-0.5) -- (\\x,-0.7) node[below=2pt, font=\\tiny] {\\x};\n  % activities: each node spans [s,f) drawn as a bar\n  \\node[chosen, minimum width=2cm] at (1,5) {$a$};   % [0,2)\n  \\node[act,    minimum width=3cm] at (2.5,4) {$b$}; % [1,4)\n  \\node[chosen, minimum width=2cm] at (4,3) {$c$};   % [3,5)\n  \\node[act,    minimum width=4cm] at (5,2) {$d$};   % [3,7)\n  \\node[chosen, minimum width=2cm] at (6,1) {$e$};   % [5,7)\n  \\node[chosen, minimum width=3cm] at (8.5,4) {$g$}; % [7,10)\n  \\node[act,    minimum width=4cm] at (9,0) {$h$};   % [7,11)\n\\end{tikzpicture}\n$$\n\nThe chosen set $\\{a, c, e, g\\}$ uses four activities; no compatible set is\nlarger. The question is _which_ greedy rule finds such a set.\n\n### Choosing the right greedy rule\n\nSeveral plausible rules suggest themselves, and most are wrong:\n\n- _Earliest start first?_ A single activity that starts at time $0$ but runs\n  forever blocks everything — wrong.\n- _Shortest duration first?_ A short activity wedged between two longer ones can\n  knock out two compatible activities to gain one — wrong.\n- _Fewest conflicts first?_ Tempting, but constructible counterexamples defeat\n  it too.\n\nTwo of these failures are easy to picture. Earliest-start picks the long bar\nthat hogs the whole timeline; shortest-job picks the little wedge that destroys\nboth of its neighbors.\n\n$$\n% caption: Two greedy rules that fail activity selection. Top, earliest-start: a single\n%          early-starting job (red) blocks three compatible ones (green). Bottom,\n%          shortest-duration: a short job (red) evicts the two longer jobs (green)\n%          flanking it.\n\\begin{tikzpicture}[xscale=0.6, yscale=0.62,\n  bar\u002F.style={draw, thick, minimum height=4.5mm},\n  bad\u002F.style={draw=red!75!black, very thick, minimum height=4.5mm, fill=red!18},\n  good\u002F.style={draw=acc, very thick, minimum height=4.5mm, fill=acc!15}]\n  \\definecolor{acc}{HTML}{2348F2}\n  \\useasboundingbox (-4.6,0.5) rectangle (8.0,6.1);\n  % --- earliest start ---\n  \\node[font=\\footnotesize, align=right] at (-3.4,5.5) {earliest\\\\start};\n  \\node[bad, minimum width=6cm] at (3,5.5) {picks this};\n  \\node[good, minimum width=1.6cm] at (0.8,4.6) {};\n  \\node[good, minimum width=1.6cm] at (3,4.6) {};\n  \\node[good, minimum width=1.6cm] at (5.2,4.6) {};\n  \\draw[->, thick] (-0.3,3.9) -- (6.3,3.9);\n  % --- shortest duration ---\n  \\node[font=\\footnotesize, align=right] at (-3.4,2.0) {shortest\\\\job};\n  \\node[good, minimum width=2.4cm] at (1.5,2.0) {};\n  \\node[bad, minimum width=1.8cm, font=\\tiny] at (3.05,2.0) {picks};\n  \\node[good, minimum width=2.4cm] at (4.6,2.0) {};\n  \\draw[->, thick] (-0.3,1.0) -- (6.3,1.0) node[right, font=\\footnotesize] {time};\n\\end{tikzpicture}\n$$\n\nThe rule that works is **earliest finish time first**: repeatedly pick the\ncompatible activity that finishes soonest.[^clrs-activity] The intuition is resource-centric:\nfinishing early frees the hall as soon as possible, leaving the most room for\neverything that follows. This is the heart of [interval scheduling](\u002Falgorithms\u002Fgreedy\u002Fscheduling-and-intervals).\n\n```algorithm\ncaption: $\\textsc{Greedy-Activity-Select}(s, f)$ — choose a max set of compatible activities\nnumber: 1\nsort activities so that $f_1 \\le f_2 \\le \\cdots \\le f_n$\n$S \\gets \\set{1}$ \u002F\u002F earliest finish is safe\n$k \\gets 1$ \u002F\u002F last activity added to $S$\nfor $m \\gets 2$ to $n$ do\n  if $s_m \\ge f_k$ then \u002F\u002F $m$ starts after $k$ finishes\n    $S \\gets S \\cup \\set{m}$\n    $k \\gets m$\nreturn $S$\n```\n\nAfter the one-time sort by finish time, a single linear scan does the rest:\n$\\Theta(n)$ work, for $\\Theta(n \\log n)$ total, dominated entirely by the sort.\nIf the finish times arrive already sorted, the selection itself is linear.\n\n## Correctness by the exchange argument\n\nThe usual proof technique for greedy algorithms is the **exchange\nargument**: take any optimal solution, and show you can _transform_ it, swapping\none of its choices for the greedy choice, without making it worse. Since the\nresult is no worse, it is still optimal, and it now agrees with greedy on the\nfirst choice. That establishes the greedy-choice property; optimal substructure\nthen finishes the job by induction.\n\n> **Lemma (Greedy choice).** Let activity $1$ be the activity with the earliest\n> finish time. Then some maximum-size compatible set contains activity $1$.\n\n> **Proof.** Let $S^\\star$ be any optimal solution, and let $j$ be the activity in\n> $S^\\star$ with the earliest finish time. If $j = 1$ we are done. Otherwise,\n> build $S' = (S^\\star \\setminus \\set{j}) \\cup \\set{1}$ — evict $j$, admit $1$.\n>\n> We must check $S'$ is still a valid schedule. Activity $1$ finishes no later\n> than $j$, because $1$ has the globally earliest finish: $f_1 \\le f_j$. Every\n> other activity $i \\in S^\\star$ was compatible with $j$, so it started after $j$\n> finished, $s_i \\ge f_j \\ge f_1$. Hence $i$ is compatible with $1$ as well. So\n> $S'$ is a set of pairwise compatible activities, and\n>\n> $$\n> \\abs{S'} = \\abs{S^\\star} - 1 + 1 = \\abs{S^\\star}.\n> $$\n>\n> $S'$ is just as large as the optimum, so it is itself optimal — and it contains\n> activity $1$. $\\blacksquare$\n\nThe picture of the swap is the whole argument in one image. Activity $1$ slides in where\n$j$ was, finishing at least as early, so nothing downstream can break.\n\n$$\n% caption: Exchange argument swapping activity $j$ for the earliest-finishing activity\n%          $1$.\n\\begin{tikzpicture}[xscale=0.6, yscale=0.6,\n  bar\u002F.style={draw, thick, rounded corners, minimum height=5mm},\n  chosen\u002F.style={draw=acc, very thick, rounded corners, minimum height=5mm, fill=acc!15}]\n  \\definecolor{acc}{HTML}{2348F2}\n  \\draw[->, thick] (0,-0.6) -- (11,-0.6) node[right] {time};\n  % top row: original optimal S* uses j, then a later activity\n  \\node[bar, minimum width=3cm] at (1.5,2) {$j$};        % [0,3)\n  \\node[bar, minimum width=2.5cm] at (5.25,2) {$\\cdots$}; % [4,...)\n  % bottom row: swapped S' uses 1 (finishes earlier) in place of j\n  \\node[chosen, minimum width=2cm] at (1,0.4) {$1$};     % [0,2)\n  \\node[bar, minimum width=2.5cm] at (5.25,0.4) {$\\cdots$};\n  \\draw[->, very thick, red!75!black] (2.6,1.65) to[bend left=18] (1.55,0.95);\n  \\node[red!75!black, font=\\footnotesize] at (4.0,1.3) {swap in};\n\\end{tikzpicture}\n$$\n\nWith the greedy-choice lemma in hand, **optimal substructure** completes the\nproof by induction. After committing to activity $1$, every remaining feasible\nactivity must start at or after $f_1$; the leftover problem is just\nactivity selection on that smaller set, which the same rule solves optimally by\nthe induction hypothesis. The greedy choice plus the optimal subsolution is\noptimal for the whole. $\\blacksquare$\n\nThis two-step shape, **(1)** an exchange argument for the greedy-choice\nproperty and **(2)** induction via optimal substructure, is the template for\n_every_ greedy correctness proof in this course, [Huffman codes](\u002Falgorithms\u002Fgreedy\u002Fhuffman-codes) and [minimum\nspanning trees](\u002Falgorithms\u002Fgraphs\u002Fminimum-spanning-trees) included.\n\n## When greedy fails: the 0\u002F1 knapsack\n\nGreed is not a universal solvent, and the cleanest way to feel its limits is the\n**knapsack problem**. We have a knapsack of capacity $W$ and $n$ items, item $i$\nhaving weight $w_i$ and value $v_i$. We want the most valuable load that fits.\n\nIn the **fractional knapsack**, we may take _any fraction_ of an item. Here\ngreed works perfectly: sort by value density $v_i \u002F w_i$, and greedily fill with\nthe densest item, taking a fraction of the last one to top off the capacity\nexactly.[^skiena-greedy] An exchange argument proves it: any optimal solution that takes less\nof a denser item and more of a sparser one can be nudged toward the greedy\nchoice without losing value.\n\nIn the **0\u002F1 knapsack**, each item is all-or-nothing: take it whole or leave it.\nAnd here the _same_ density rule collapses. Consider $W = 10$ and:\n\n| Item | Weight | Value | Density $v\u002Fw$ |\n| --- | --- | --- | --- |\n| 1 | 6 | 12 | 2.0 |\n| 2 | 5 | 9 | 1.8 |\n| 3 | 5 | 9 | 1.8 |\n\nGreedy by density grabs item $1$ (value $12$, weight $6$), then _cannot_ fit\neither remaining item, since both need weight $5$ but only $4$ is left. It returns\nvalue $\\mathbf{12}$. Yet items $2$ and $3$ together weigh exactly $10$ and are\nworth $\\mathbf{18}$. Greedy loses by a mile.\n\n$$\n% caption: Greedy by density on the 0\u002F1 knapsack ($W=10$). Left, greedy grabs the densest\n%          item $1$ ($w=6$), stranding $4$ units of unusable capacity for value $12$.\n%          Right, the optimum packs items $2$ and $3$ ($w=5$ each) for value $18$.\n\\begin{tikzpicture}[yscale=0.5, xscale=0.9, font=\\small]\n  \\definecolor{acc}{HTML}{2348F2}\n  % left knapsack: greedy\n  \\draw[thick] (0,0) rectangle (2,10);\n  \\foreach \\y in {2,4,6,8} \\draw[black!25] (0,\\y) -- (2,\\y);\n  \\fill[red!18, draw=black, thick] (0,0) rectangle (2,6);\n  \\node at (1,3) {item $1$};\n  \\node[font=\\footnotesize, fill=white, inner sep=1.5pt] at (1,1.0) {$w=6,\\,v=12$};\n  \\node[red!75!black, font=\\footnotesize, align=center] at (1,8) {wasted\\\\$4$ units};\n  \\node[below=1pt, font=\\footnotesize] at (1,0) {greedy: value $12$};\n  \\node[above, font=\\footnotesize] at (1,10) {density rule};\n  % right knapsack: optimal\n  \\begin{scope}[xshift=4cm]\n    \\draw[thick] (0,0) rectangle (2,10);\n    \\foreach \\y in {2,4,6,8} \\draw[black!25] (0,\\y) -- (2,\\y);\n    \\fill[acc!22, draw=black, thick] (0,0) rectangle (2,5);\n    \\fill[acc!12, draw=black, thick] (0,5) rectangle (2,10);\n    \\node at (1,2.5) {item $2$};\n    \\node at (1,7.5) {item $3$};\n    \\node[font=\\footnotesize, fill=white, inner sep=1.5pt] at (1,1.0) {$w=5,\\,v=9$};\n    \\node[font=\\footnotesize, fill=white, inner sep=1.5pt] at (1,6.0) {$w=5,\\,v=9$};\n    \\node[below=1pt, font=\\footnotesize] at (1,0) {optimal: value $18$};\n    \\node[above, font=\\footnotesize] at (1,10) {best fit};\n  \\end{scope}\n\\end{tikzpicture}\n$$\n\n> **Remark (Greedy-choice failure).** The fracture is precisely the **greedy-choice property**. Taking the densest\n> item is _not_ safe: no swap recovers an optimal solution that contains it,\n> because the indivisible weight it consumes can strand the capacity it leaves\n> behind. The leftover space, not just the leftover items, depends on the whole\n> combination — so the choice cannot be made locally.\n\nThis is exactly the boundary between greedy and dynamic programming. The 0\u002F1\nknapsack has optimal substructure but _lacks_ the greedy-choice property, so it\nneeds DP, which considers both alternatives (take item $i$ or skip it) rather\nthan committing to one. The fractional version restores the greedy-choice\nproperty because a fraction can always absorb the leftover capacity exactly,\nleaving no stranded space to regret.\n\n## When _is_ greed good? A glimpse of matroids\n\nIt would be wonderful to have a theorem of the form \"greedy is optimal exactly\nwhen…\". For a large and important family of problems, such a theorem exists, and\nits language is the [**matroid**](\u002Falgorithms\u002Fgreedy\u002Fmatroids).\n\nA matroid is a pair $(E, \\mathcal{I})$ built from a finite ground set $E$ and a family\n$\\mathcal{I}$ of \"independent\" subsets, satisfying two axioms:\n\n- **Heredity.** If $A \\in \\mathcal{I}$ and $B \\subseteq A$, then\n  $B \\in \\mathcal{I}$. (Subsets of independent sets are independent.)\n- **Exchange.** If $A, B \\in \\mathcal{I}$ and $\\abs{A} \u003C \\abs{B}$, then some\n  element $x \\in B \\setminus A$ has $A \\cup \\set{x} \\in \\mathcal{I}$. (A smaller\n  independent set can always be grown using an element of a larger one.)\n\nThe forests of a graph form a matroid: subsets of a forest are forests, and a\nsmaller forest can always borrow an edge from a larger one without making a\ncycle.\n\n$$\n% caption: The graphic matroid's exchange property. Forest $A$ (two edges) is smaller than\n%          some larger forest $B$; an edge of $B$ (blue) joins two of $A$'s trees without\n%          making a cycle, growing $A$.\n\\begin{tikzpicture}[\n  every node\u002F.style={circle, draw, minimum size=6mm, inner sep=1pt, font=\\small},\n  >=stealth]\n  \\definecolor{acc}{HTML}{2348F2}\n  \\node (a1) at (0,1.4) {$1$};\n  \\node (a2) at (1.4,1.4) {$2$};\n  \\node (a3) at (0,0) {$3$};\n  \\node (a4) at (1.4,0) {$4$};\n  \\node[draw=none] at (0.7,2.2) {forest $A$};\n  \\draw[thick] (a1) -- (a2);\n  \\draw[thick] (a3) -- (a4);\n  \\draw[acc, very thick] (a2) -- (a4);\n  \\node[draw=none, text=acc, font=\\footnotesize] at (3.1,0.7) {add $\\{2,4\\}$};\n  \\node[draw=none, text=acc, font=\\footnotesize] at (3.1,0.1) {(no cycle)};\n\\end{tikzpicture}\n$$\n\nThe headline result, due to Rado and Edmonds, is that **the greedy\nalgorithm computes a maximum-weight independent set if and only if the structure\nis a matroid.**[^clrs-matroid] That single theorem is the deep reason Kruskal's minimum\nspanning tree algorithm, which greedily adds the cheapest edge that creates no cycle,\nis correct: it is greedy on the graphic matroid. Activity selection, too, is\ngreedy on a matroid in disguise.\n\nMatroids do not cover _every_ successful greedy algorithm. Huffman coding, our\nnext lesson, lives outside the theory, yet they explain a remarkable swath of\nthem and turn \"does greed work here?\" from an art into, sometimes, a checkable\ncondition. We will not develop the theory further here; the point is that there\n_is_ a theory, and the exchange axiom that defines it is the same exchange idea\nthat powers our correctness proofs.\n\n## A recipe for greedy algorithms\n\nDrawing the three books together, the workflow is always the same:\n\n1. **Cast the problem** as a sequence of choices, where each choice leaves a\n   smaller subproblem of the same kind.\n2. **Guess a greedy rule** — the locally optimal choice. Beware: the _obvious_\n   rule is often wrong (recall the failed activity-selection rules).\n3. **Prove the greedy-choice property** with an exchange argument: any optimal\n   solution can be massaged to contain the greedy choice.\n4. **Prove optimal substructure** and combine, by induction, into a full proof.\n\nIf steps 3 and 4 go through, you have a correct, usually fast, usually simple\nalgorithm. If they do not, you have learned something too: reach for dynamic\nprogramming instead.\n\n## Takeaways\n\n- A **greedy algorithm** makes the locally optimal choice at each step and never\n  reconsiders. It is fast and simple, _when it is correct_.\n- Correctness needs two properties: the **greedy-choice property** (some optimal\n  solution contains the greedy choice) and **optimal substructure** (what\n  remains is the same problem, smaller).\n- **Activity selection** by earliest finish time is the canonical win; its proof\n  is the template **exchange argument** plus induction. Cost: $\\Theta(n\\log n)$,\n  all in the sort.\n- The **0\u002F1 knapsack** is the canonical failure: it lacks the greedy-choice\n  property, so greed strands capacity and needs dynamic programming instead. Its\n  _fractional_ cousin restores the property and yields to greed.\n- **Matroids** characterize a broad class where greedy is provably optimal\n  (Kruskal's MST among them), the formal echo of the exchange argument itself.\n\n[^erickson-greedy]: **Erickson**, Ch. 4 — Greedy Algorithms: the warning that most greedy strategies are wrong and must be proved correct, not merely tested.\n[^clrs-greedy]: **CLRS**, Ch. 16 — Greedy Algorithms (§16.2): the greedy-choice property as one of the two ingredients licensing a greedy algorithm.\n[^clrs-activity]: **CLRS**, Ch. 16 — Greedy Algorithms (§16.1): the activity-selection problem solved by repeatedly choosing the earliest-finishing compatible activity.\n[^skiena-greedy]: **Skiena**, §1.4 & §5 — Heuristics; Weighted Graph Algorithms: the fractional knapsack solved greedily by value density.\n[^clrs-matroid]: **CLRS**, Ch. 16 — Greedy Algorithms (§16.4): the Rado–Edmonds theorem that greedy yields a maximum-weight independent set exactly when the structure is a matroid.\n",{"text":5260,"minutes":5261,"time":5262,"words":5263},"10 min read",9.415,564900,1883,{"title":210,"description":5232},[5266,5268,5270],{"book":5174,"ref":5267},"Ch. 16 — Greedy Algorithms",{"book":5197,"ref":5269},"§1.4 & §5 — Heuristics; Weighted Graph Algorithms",{"book":5160,"ref":5271},"Ch. 4 — Greedy Algorithms","available","01.algorithms\u002F07.greedy\u002F01.the-greedy-method",[206],"Nlilu88GbC6agVmI46xbrMQsN70t6r_QC9WH_hUWPdA",{"\u002Falgorithms\u002Ffoundations\u002Fwhat-is-an-algorithm":5277,"\u002Falgorithms\u002Ffoundations\u002Fasymptotic-analysis":5278,"\u002Falgorithms\u002Ffoundations\u002Frecurrences":5279,"\u002Falgorithms\u002Fdivide-and-conquer\u002Fmergesort":5280,"\u002Falgorithms\u002Fdivide-and-conquer\u002Fquicksort":5281,"\u002Falgorithms\u002Fdivide-and-conquer\u002Fselection":5282,"\u002Falgorithms\u002Fsorting\u002Fheaps-and-heapsort":5283,"\u002Falgorithms\u002Fsorting\u002Fsorting-lower-bounds":5284,"\u002Falgorithms\u002Fsorting\u002Flinear-time-sorting":5285,"\u002Falgorithms\u002Fdata-structures\u002Felementary-structures":5286,"\u002Falgorithms\u002Fdata-structures\u002Fhash-tables":5287,"\u002Falgorithms\u002Fdata-structures\u002Fbinary-search-trees":5288,"\u002Falgorithms\u002Fdata-structures\u002Favl-trees":5289,"\u002Falgorithms\u002Fdata-structures\u002Fbalanced-trees":5290,"\u002Falgorithms\u002Fdata-structures\u002Funion-find":5291,"\u002Falgorithms\u002Fdata-structures\u002Ffenwick-and-segment-trees":5292,"\u002Falgorithms\u002Fsequences\u002Ftwo-pointers-and-windows":5293,"\u002Falgorithms\u002Fsequences\u002Fmonotonic-stacks":5294,"\u002Falgorithms\u002Fsequences\u002Fbinary-search-on-the-answer":5295,"\u002Falgorithms\u002Fsequences\u002Fstring-matching":5296,"\u002Falgorithms\u002Fsequences\u002Ftries":5297,"\u002Falgorithms\u002Fgraphs\u002Frepresentations-and-traversal":5298,"\u002Falgorithms\u002Fgraphs\u002Ftopological-sort-and-scc":5299,"\u002Falgorithms\u002Fgraphs\u002Fminimum-spanning-trees":5300,"\u002Falgorithms\u002Fgraphs\u002Fshortest-paths":5301,"\u002Falgorithms\u002Fgraphs\u002Fnetwork-flow":5302,"\u002Falgorithms\u002Fgraphs\u002Fbridges-and-articulation-points":5303,"\u002Falgorithms\u002Fgraphs\u002Flowest-common-ancestor":5304,"\u002Falgorithms\u002Fgraphs\u002Ftwo-sat":5305,"\u002Falgorithms\u002Fgraphs\u002Feulerian-tours":5306,"\u002Falgorithms\u002Fgreedy\u002Fthe-greedy-method":5263,"\u002Falgorithms\u002Fgreedy\u002Fscheduling-and-intervals":5307,"\u002Falgorithms\u002Fgreedy\u002Fhuffman-codes":5308,"\u002Falgorithms\u002Fgreedy\u002Fmatroids":5309,"\u002Falgorithms\u002Fdynamic-programming\u002Fprinciples":5310,"\u002Falgorithms\u002Fdynamic-programming\u002Fsequence-dp":5311,"\u002Falgorithms\u002Fdynamic-programming\u002Flongest-increasing-subsequence":5312,"\u002Falgorithms\u002Fdynamic-programming\u002Fknapsack":5313,"\u002Falgorithms\u002Fdynamic-programming\u002Fcoin-change-and-unbounded":5314,"\u002Falgorithms\u002Fdynamic-programming\u002Finterval-dp":5315,"\u002Falgorithms\u002Fdynamic-programming\u002Ftree-dp":5316,"\u002Falgorithms\u002Fdynamic-programming\u002Fbitmask-dp":5317,"\u002Falgorithms\u002Fdynamic-programming\u002Fdp-optimizations":5318,"\u002Falgorithms\u002Fdynamic-programming\u002Fdp-on-graphs":5319,"\u002Falgorithms\u002Fbacktracking\u002Fbacktracking-fundamentals":5320,"\u002Falgorithms\u002Fbacktracking\u002Fconstraint-search":5321,"\u002Falgorithms\u002Fbacktracking\u002Fbranch-and-bound":5322,"\u002Falgorithms\u002Fmathematical-algorithms\u002Fnumber-theory-basics":5293,"\u002Falgorithms\u002Fmathematical-algorithms\u002Fmodular-exponentiation-and-primality":5323,"\u002Falgorithms\u002Fmathematical-algorithms\u002Fsieve-and-factorization":5324,"\u002Falgorithms\u002Fmathematical-algorithms\u002Fcombinatorics":5325,"\u002Falgorithms\u002Fcomputational-geometry\u002Fgeometric-primitives":5326,"\u002Falgorithms\u002Fcomputational-geometry\u002Fconvex-hull":5308,"\u002Falgorithms\u002Fcomputational-geometry\u002Fsweep-line":5327,"\u002Falgorithms\u002Fintractability\u002Fp-np-reductions":5328,"\u002Falgorithms\u002Fintractability\u002Fnp-completeness":5289,"\u002Falgorithms\u002Fintractability\u002Fcoping-with-hardness":5329,"\u002Falgorithms":5330,"\u002Ftheory-of-computation":5331,"\u002Fcomputer-architecture":5331,"\u002Fphysical-computing":5331,"\u002Fdatabases":5331,"\u002Fdeep-learning":5331},1763,2107,1738,2628,1723,2048,1697,1044,1542,1565,1679,1586,1388,1465,1971,1455,1533,1483,1578,1791,1481,2704,1658,2070,1978,2080,1568,1451,1291,1543,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":5333,"\u002Falgorithms\u002Ffoundations\u002Fasymptotic-analysis":5334,"\u002Falgorithms\u002Ffoundations\u002Frecurrences":5335,"\u002Falgorithms\u002Fdivide-and-conquer\u002Fmergesort":5336,"\u002Falgorithms\u002Fdivide-and-conquer\u002Fquicksort":5337,"\u002Falgorithms\u002Fdivide-and-conquer\u002Fselection":5338,"\u002Falgorithms\u002Fsorting\u002Fheaps-and-heapsort":5339,"\u002Falgorithms\u002Fsorting\u002Fsorting-lower-bounds":5340,"\u002Falgorithms\u002Fsorting\u002Flinear-time-sorting":5341,"\u002Falgorithms\u002Fdata-structures\u002Felementary-structures":5342,"\u002Falgorithms\u002Fdata-structures\u002Fhash-tables":5343,"\u002Falgorithms\u002Fdata-structures\u002Fbinary-search-trees":5344,"\u002Falgorithms\u002Fdata-structures\u002Favl-trees":5345,"\u002Falgorithms\u002Fdata-structures\u002Fbalanced-trees":5346,"\u002Falgorithms\u002Fdata-structures\u002Funion-find":5347,"\u002Falgorithms\u002Fdata-structures\u002Ffenwick-and-segment-trees":5348,"\u002Falgorithms\u002Fsequences\u002Ftwo-pointers-and-windows":5349,"\u002Falgorithms\u002Fsequences\u002Fmonotonic-stacks":5350,"\u002Falgorithms\u002Fsequences\u002Fbinary-search-on-the-answer":5351,"\u002Falgorithms\u002Fsequences\u002Fstring-matching":5352,"\u002Falgorithms\u002Fsequences\u002Ftries":5353,"\u002Falgorithms\u002Fgraphs\u002Frepresentations-and-traversal":5354,"\u002Falgorithms\u002Fgraphs\u002Ftopological-sort-and-scc":5355,"\u002Falgorithms\u002Fgraphs\u002Fminimum-spanning-trees":5356,"\u002Falgorithms\u002Fgraphs\u002Fshortest-paths":5357,"\u002Falgorithms\u002Fgraphs\u002Fnetwork-flow":5358,"\u002Falgorithms\u002Fgraphs\u002Fbridges-and-articulation-points":5359,"\u002Falgorithms\u002Fgraphs\u002Flowest-common-ancestor":5360,"\u002Falgorithms\u002Fgraphs\u002Ftwo-sat":5361,"\u002Falgorithms\u002Fgraphs\u002Feulerian-tours":5362,"\u002Falgorithms\u002Fgreedy\u002Fthe-greedy-method":5363,"\u002Falgorithms\u002Fgreedy\u002Fscheduling-and-intervals":5364,"\u002Falgorithms\u002Fgreedy\u002Fhuffman-codes":5365,"\u002Falgorithms\u002Fgreedy\u002Fmatroids":5366,"\u002Falgorithms\u002Fdynamic-programming\u002Fprinciples":5367,"\u002Falgorithms\u002Fdynamic-programming\u002Fsequence-dp":5368,"\u002Falgorithms\u002Fdynamic-programming\u002Flongest-increasing-subsequence":5369,"\u002Falgorithms\u002Fdynamic-programming\u002Fknapsack":5370,"\u002Falgorithms\u002Fdynamic-programming\u002Fcoin-change-and-unbounded":5371,"\u002Falgorithms\u002Fdynamic-programming\u002Finterval-dp":5372,"\u002Falgorithms\u002Fdynamic-programming\u002Ftree-dp":5373,"\u002Falgorithms\u002Fdynamic-programming\u002Fbitmask-dp":5374,"\u002Falgorithms\u002Fdynamic-programming\u002Fdp-optimizations":5375,"\u002Falgorithms\u002Fdynamic-programming\u002Fdp-on-graphs":5376,"\u002Falgorithms\u002Fbacktracking\u002Fbacktracking-fundamentals":5377,"\u002Falgorithms\u002Fbacktracking\u002Fconstraint-search":5378,"\u002Falgorithms\u002Fbacktracking\u002Fbranch-and-bound":5379,"\u002Falgorithms\u002Fmathematical-algorithms\u002Fnumber-theory-basics":5380,"\u002Falgorithms\u002Fmathematical-algorithms\u002Fmodular-exponentiation-and-primality":5381,"\u002Falgorithms\u002Fmathematical-algorithms\u002Fsieve-and-factorization":5382,"\u002Falgorithms\u002Fmathematical-algorithms\u002Fcombinatorics":5383,"\u002Falgorithms\u002Fcomputational-geometry\u002Fgeometric-primitives":5384,"\u002Falgorithms\u002Fcomputational-geometry\u002Fconvex-hull":5385,"\u002Falgorithms\u002Fcomputational-geometry\u002Fsweep-line":5386,"\u002Falgorithms\u002Fintractability\u002Fp-np-reductions":5387,"\u002Falgorithms\u002Fintractability\u002Fnp-completeness":5388,"\u002Falgorithms\u002Fintractability\u002Fcoping-with-hardness":5389,"\u002Falgorithms":5390,"\u002Ftheory-of-computation":5393,"\u002Fcomputer-architecture":5396,"\u002Fphysical-computing":5399,"\u002Fdatabases":5402,"\u002Fdeep-learning":5405},{"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":5391,"title":5392,"module":376,"summary":376},"\u002Falgorithms","Algorithms",{"path":5394,"title":5395,"module":376,"summary":376},"\u002Ftheory-of-computation","Theory of Computation",{"path":5397,"title":5398,"module":376,"summary":376},"\u002Fcomputer-architecture","Computer Architecture",{"path":5400,"title":5401,"module":376,"summary":376},"\u002Fphysical-computing","Physical Computing",{"path":5403,"title":5404,"module":376,"summary":376},"\u002Fdatabases","Databases",{"path":5406,"title":5407,"module":376,"summary":376},"\u002Fdeep-learning","Deep Learning",1781560524996]