Tail event Created 2026-09-24 Updated 2026-10-14
A tail event is an event , where is the tail sigma-algebra of the chosen sequence of random variables. It concerns information available arbitrarily far along the sequence. In the measurable coordinate models described in finite-prefix invariance of tail events, any finite edit preserves whether it occurs.
This is stronger than merely needing a long waiting time. On , with denoting heads, let , taking if there is no head. The eventis not a tail event: changing only from zero to one changes membership. Under fair independent Bernoulli trials its probability is . Even the event , of probability one in this model, is not a tail event as a literal set: the all-zero sequence and the sequence with just one initial head differ in one coordinate. A probability of zero or one does not characterize tail events.
Tail measurability of limits of sample averages Created 2026-10-05 Updated 2026-10-14
Let be a sequence of finite real random variables, and write for its sample mean. For fixed and , put . Then, at each outcome,Consequently . The right-hand limit superior is a measurable function of for every , so the extended-real random variable is measurable with respect to the tail sigma-algebra. The same holds for the limit inferior. Thus the event of convergence to a finite limit of a sequence, and the event for any specified real , are tail events.
For a worked deterministic example, let alternate , and replace its first three entries by . For every the two sample means differ by exactly , so both converge to . Finite edits can change small-sample answers while preserving the infinite limit of a sequence.
Under independence, Kolmogorov's zero–one law makes each specified convergence event have probability zero or one. It does not select which value occurs. If a finite random variable measurable with respect to the tail sigma-algebra exists, the events for rational each have probability zero or one; continuity of probability and their nesting force to be constant almost surely. For fair independent Bernoulli trials, the strong law of large numbers establishes almost surely; the zero–one conclusion alone proves neither convergence nor the value .
Tail of a sequence 2026-10-14
A tail of a sequence consists of its terms from some index onward, retaining their order and repetitions. Discarding finitely many initial terms does not change its limit of a sequence or whether it is a Cauchy sequence. A tail can also be considered as the set of values when forming an infimum, supremum, or tail diameter of a sequence; that set alone forgets the original order and repetitions.
Tail sigma-algebra Created 2026-09-24 Updated 2026-10-14
For a sequence of random variables on a probability space , defineThe decreasing sigma-algebras are generated by the listed random variables. Their intersection consists of events expressible after discarding every finite prefix. No independence is required.[ref]
Probability: Theory and Examples (fifth edition) by Rick Durrett. Probability: Theory and Examples (fifth edition), §2.5 Convergence of Random Series, printed p. 81: definition of the tail sigma-field
The point is to distinguish a long observation record from a property of an infinite sequence. The event of seeing infinitely many heads and the event that sample means converge survive any finite change, while an exact first-head time does not. Kolmogorov's zero–one law adds the striking conclusion that under independence each tail event has probability zero or one; the tail sigma-algebra itself can still contain many nonempty sets.
Telescoping sum Created 2026-10-14 Updated 2026-10-20
A telescoping sum cancels intermediate sequence terms, leaving boundary terms. For a finite sequence of real numbers , the displayed identity follows because every occurs once with each sign. Applying it to an infinite series also requires checking the limit of the boundary terms; finite cancellation alone does not prove that the series is a convergent series.[ref]
5.2 Infinite Series. Calculus Volume 2, §5.2 Infinite Series: Telescoping Series definition and successive partial-sum identities
For , expanding the finite sum givesNo monotone sequence assumption is required. Consider the original sequence . Its successive finite differences are , soThe large intermediate rise and fall disappear from the net change. This is useful whenever one knows successive changes rather than every absolute value: adding the changes reconstructs the final value from the initial one. It also checks a cumulative-update calculation without requiring all increments to be positive.
Opposite signs cancel the intermediate sequence terms, leaving the final value minus the initial value
. Original nonmonotone sequence . Linked green entries have the same magnitude and opposite signs; the unmatched entries are and . The increments are , whose sum is one. Details.A finite difference measures one discrete change. The identity is the discrete counterpart of the fundamental theorem of calculus: accumulation of changes returns the endpoint difference. The related summation by parts transfers a finite difference from one factor of a product to another, with explicit boundary terms.
Temporal locality 2026-10-13
Temporal locality is the tendency for the same item to be accessed again soon after an earlier access. For computer memory, the item might be an array element, a cache line or a memory page; always specify the unit. Temporal locality concerns reuse over time, whereas spatial locality concerns accesses to nearby addresses. Both are properties of a workload, rather than guarantees about its next memory reference. [ref]
Beyond Physical Memory: Policies. Remzi H. Arpaci-Dusseau and Andrea C. Arpaci-Dusseau, Operating Systems: Three Easy Pieces, chapter 22, section 22.5 and the Types of Locality aside
For a worked example, let and denote two distinct cache blocks at unrelated, nonadjacent physical addresses. An initially empty fully associative cache holding two cache lines, with LRU replacement, receives the sequence . The first causes a cache miss and leaves resident; causes another cache miss and leaves both and resident; the last is a cache hit. LRU replacement now regards as older than . The benefit comes from temporal locality of , irrespective of how far apart the cache blocks lie. With capacity one, the same sequence gives three cache misses: reuse helps only if the item survives until it is needed.
The appealing idea is that a small memory cache can serve a large computation when its currently useful data stay small. Repeatedly reading a counter or executing the same instructions can exploit temporal locality. LRU replacement and recency-based approximations try to retain recently used items. A working set records recent demand; if the active working set cannot fit in resident memory pages, memory thrashing can defeat this benefit. At cache line granularity, even accesses to different array elements can reuse the same cache block, as the spatial locality example shows.
Peter J. Denning's May 1968 paper connected recent memory page use to near-future demand through the working set. Section 3 explicitly discusses the clustering of references to the same memory page in time. This is a documented early treatment of the reasoning behind temporal locality, rather than a claim about who first coined the term. [ref]
https://denninginstitute.com/pjd/PUBS/WSModel_1968.pdf. Peter J. Denning, The Working Set Model for Program Behavior, Communications of the ACM 11(5), section 3: Definition and Properties, especially P2: Prediction
Thrashing (computer science) 2026-10-13
Memory thrashing is repeated costly cycling of memory pages out of and back into computer memory, leaving little useful computation between page faults. Active demand can exceed the available page frames, especially when multiprogramming admits too many operating-system processes. A high page fault rate during initial loading alone does not establish memory thrashing. [ref]
Beyond Physical Memory: Policies. Arpaci-Dusseau and Arpaci-Dusseau, OSTEP chapter 22, section 22.11: Thrashing
Consider one operating-system process making the 20 memory references : five repetitions of four memory pages. Start with an empty resident set, use demand paging and exact LRU replacement, and assume no prefetching or competing operating-system processes. A hit finds the requested memory page resident; a miss requires a nonresident page fault. With three page frames, references 1–3 load pages 1–3. Reference 4 evicts page 1, reference 5 reloads page 1 and evicts page 2, and the cycle continues: every return finds its memory page evicted. With four page frames, only the first four references miss; all four memory pages then remain resident.
| Available page frames | Misses in all 20 memory references | Overall page fault rate | Misses in references 5–20 | Page fault rate in references 5–20 | 3 | 20 | 100% | 16 | 100% | 4 | 4 | 20% | 0 | 0% |
|---|
The four initial misses with four page frames are compulsory first-use misses from the empty resident set. They are startup work; the three-page frame case keeps faulting after startup. This makes the difference between memory thrashing and loading a new working set visible. For the three-page frame trace, each reused memory page has three distinct intervening memory pages, so LRU replacement has already evicted it before its next use.
The same 20 memory references under LRU replacement: three page frames miss every time, four miss only during startup
. Details. To quantify the cost, assume each hit takes 100 nanoseconds and each miss incurs an additional 1 millisecond of page fault service, followed by the same 100-nanosecond memory access. These are toy latencies, not measurements. With miss probability , the expected value of access time isThe service cost is additional: it does not include the final 100 nanoseconds. Thus gives and gives , approximately a fivefold ratio over the complete trace. Over references 5–20, the corresponding ratio is : repeated page faults dominate the useful accesses. The expected value model follows the additive miss-penalty convention of OSTEP chapter 22, section 22.1. [ref]
Beyond Physical Memory: Policies. Arpaci-Dusseau and Arpaci-Dusseau, OSTEP chapter 22, equation 22.1: average memory access time
Not every page fault performs disk input-output: demand paging can allocate zero-filled memory pages, and copy-on-write can copy an existing page frame. The toy service cost models expensive misses; the miss trace alone establishes residency behavior, while memory thrashing additionally concerns repeated costly cycling. [ref]
https://pages.cs.wisc.edu/~remzi/OSTEP/vm-complete.pdf. Arpaci-Dusseau and Arpaci-Dusseau, OSTEP chapter 23, section 23.1, Other Neat Tricks: demand zeroing and copy-on-write
Possible remedies are more resident page frames, less multiprogramming, or reorganizing accesses to improve temporal locality. For this toy sequence, one extra page frame suffices under LRU replacement; that is not a universal threshold or policy. Page replacement alone cannot make every simultaneously needed memory page fit.
// Target: computer-science.bigb
Topological order Created 2026-10-14 Updated 2026-10-31
A topological order of a finite directed graph is a sequence containing every vertex exactly once, withThus every directed edge points forward in the list. Equivalently, a bijection assigning positions satisfies for every directed edge . A topological ordering names the same kind of list. [ref]
The toy Directed acyclic graph has exactly five topological orders: , , , , and . These lists were checked by enumerating all permutations and retaining precisely those satisfying all five directed edge inequalities. Every list ends with , since all other tasks have a directed path to publication. A topological order need not put adjacent entries next to one another in the directed graph: and are consecutive in without a directed edge between them.
A directed cycle would force the impossible chain of position inequalities . In the toy example, adding requires review before publication and publication before review, so there are no topological orders. Together with the construction in topological sorting, this proves that a finite directed graph admits a topological order if and only if it is a Directed acyclic graph. The empty directed graph has the empty sequence as its topological order.
There is also a useful connection to partial orders: define when or there is a directed path from to . For a Directed acyclic graph, this reachability relation is a partial order, and its linear extensions are exactly the topological orders. The Directed acyclic graph specifies which pairs must be ordered; a topological order chooses positions for all the remaining pairs.
Topological vector space Created 2026-09-24 Updated 2026-10-14
A topological vector space is a vector space over or , equipped with a topology such that vector addition and scalar multiplication are jointly continuous:The domains carry the product topology, and the scalar field carries its usual topology. Joint continuity permits both inputs to vary at once. Here the definition does not impose the Hausdorff condition; we state it separately when needed. [ref]
https://www.math.lmu.de/~philip/publications/lectureNotes/philipPeter_FunctionalAnalysis.pdf. Peter Philip, Functional Analysis, Definition 1.1 and Example 1.2
.Every normed vector space is a topological vector space: the triangle inequality gives , whilecontrols scalar multiplication near any . More generally, a seminorm topology supplies many measurements of smallness, rather than one norm. Translation by any vector is a homeomorphism, so a neighbourhood basis at zero determines all neighbourhoods by translation.
The compatibility matters: on a nonzero real vector space, the discrete topology makes vector addition continuous, but not scalar multiplication. For , the sequence of scalars tends to zero, whereas the sequence never enters the open set . Thus choosing a topology arbitrarily need not respect the linear algebra.
This framework lets functional analysis choose the appropriate notion of limit of a sequence. Norm topology measures one global error, weak topology tests linear functionals, and the Fréchet space of smooth functions controls every order of derivative. In each case the operations forming linear combinations are continuous, making approximation compatible with the underlying equations.
Topologist's sine curve Created 2026-10-14 Updated 2026-10-31
Consider the graph of a function , using the sine of the multiplicative inverse of , together with a vertical closed interval:Give the subspace topology from the Euclidean plane. The symbol denotes a Cartesian product. The right endpoint belongs to . The continuous map sends the connected real interval onto . Hence is connected, and its closure is connected by closure of a connected set. Every height in is approached as tends to zero; for example,For , these inputs are and . For any other height , choose with ; then the sequence lies in and has limit of a sequence .
Nevertheless, has exactly two path components, and . Within , join inputs by the continuous path . Within , use for heights .
The obstruction to a continuous path between and is persistent oscillation, not a visible gap. Proof outline: suppose such a path exists, directed from to , and take its last time in . Immediately afterwards its first coordinate approaches zero and its second coordinate is . The intermediate value theorem forces the first coordinate to pass through inputs of both displayed types arbitrarily close to that departure time. The second coordinate therefore takes both values and arbitrarily close to that time, contradicting continuity. [ref]
The topologist's sine curve has one connected component and two path components; the graph of a function is drawn only for , with further oscillations omitted near the vertical closed interval
. Details. The sampled graph of a function illustrates the formulas; it does not prove connectedness or the failure of path connectedness. Taking a closure preserves connectedness, but this example shows that it can destroy path connectedness.
Trail in a graph 2026-10-14
A trail is a walk whose edge sequence has no repetitions. Its vertices may repeat, including its first and last vertices. The zero-length walk is a trail because it repeats no edge. Every graph path is a trail, but the converse fails: the trail in the shared example isIts six edges are pairwise distinct, although occurs twice. Visiting a junction again and traversing a road segment again are different events.[ref]
https://people.math.binghamton.edu/zaslav/Oldcourses/581.S99/notes.html. Thomas Zaslavsky, Supplementary Notes for Graduate Graph Theory: trails and paths
In an undirected graph, traversing and then repeats the same edge; direction of travel does not give it a new identity. In a multigraph with distinct parallel edges joining and , the closed walk is a trail, whereas is not. Both have the same vertex sequence . In a directed graph, separate directed edges and may instead be used once each; record their identities and obey their directions. Thus testing a trail means checking the actual edge records, not merely checking consecutive endpoint labels.
For a finite graph, a trail has length at most ; unrestricted walks can have arbitrarily large length whenever a positive-length closed walk exists, since it can be repeated. An Eulerian trail is the special trail that uses every edge, so its length is exactly . Our length-six trail omits and is therefore not an Eulerian trail. In a road-inspection model, a trail describes servicing its selected segments once while allowing returns to junctions; requiring service of every segment leads to the Eulerian trail question. If extra travel between serviced segments is necessary, the complete journey can be a walk even when each segment is serviced only once. This distinction keeps the service requirement separate from the route actually travelled.
Expand an infinite first-order structure by Skolem functions, choose distinct elements , and fix a nonprincipal ultrafilter on . For each finite subset of the required index order, form the ultrapower over using the ordered Fubini product of ultrafilters. Pullback along coordinate projections gives coherent elementary maps by the Łoś theorem. In their directed limit of elementary embeddings, the classes of the coordinate functions are distinct and form an order-indiscernible sequence; every first-order formula on increasing coordinates has the same nested ultrafilter test. Their Skolem hull gives an Ehrenfeucht-Mostowski model. An index-order automorphism sends a term in the generators to the same term in the transported generators; indiscernibility makes this well defined. Uniqueness is in the specified Skolem expansion, not necessarily in its reduct. If generators must respect a definable infinite order, first produce an increasing sequence by an ultrapower of finite increasing chains.
Uniform convergence Created 2026-09-24 Updated 2026-10-14
A sequence of functions converges uniformly to , where is a metric space with metric , precisely whenFor real numbers, use the absolute value . Compare the universal quantification and existential quantification:The decisive change is whether can depend on . Uniform convergence implies pointwise convergence.[ref]
6.1 Pointwise and uniform convergence. Basic Analysis: Introduction to Real Analysis, Volume I by Jiří Lebl, §6.1.2, Definition 6.1.6 and Proposition 6.1.7
For functions taking values in real numbers on a nonempty domain of a function, the supremum error is , allowing . Then uniform convergence is equivalent to . The supremum need not be a maximum: pointwise strict bounds below only give , so use tolerance when proving this equivalence. This single error bound controls every possible input, including one chosen after seeing the index.
For and its pointwise limit on , the error is zero at one but approaches one as from below. Consequentlyfor every positive integer . This supremum is never attained: below one the error is , and at one it is zero. Deleting the endpoint leaves the same supremum error on . To disprove uniform convergence directly, choose : for any proposed , take and . The error equals , violating the strict tolerance. Thus a moving input defeats every proposed common threshold.
On the smaller interval , for a fixed , the pointwise limit is zero andFor and , the exact first successful common threshold isThe logarithm and floor function turn an infinite approximation statement into a finite stopping rule. At , fails tolerance , while succeeds. At and , the ratio is exactly three: is necessary because equality is insufficient. For , every error is zero. The domain of a function determines whether one threshold can certify every input.
For another explicit stopping rule, let on . Its uniform limit is zero and its supremum error is . For every , works, using the ceiling function. Unlike on , it controls even the endpoint.
The practical beauty of uniform convergence is that one quantitative bound can survive further operations: the uniform limit theorem preserves continuity, and uniform convergence preserves integrals on a compact interval controls accumulated error. Differentiation needs additional hypotheses, such as uniform derivative convergence with an anchored value. These results distinguish an approximation that looks accurate at selected inputs from one that justifies replacing a whole function in a calculation.
Uniform labelled tree generation 2026-10-14
For , choose independent random variables, each with the uniform distribution on a finite set , and decode their values as a Prüfer sequence. Every sequence has probability , and the bijection gives each labelled tree the same probability. This produces a uniform spanning tree of the complete graph without repeatedly proposing sets of edges and rejecting those that fail to be trees. It supplies random inputs for testing implementations of breadth-first search and a tractable model of random connections. [ref]
https://sites.math.rutgers.edu/~zeilberg/Combo20/hw.html. Doron Zeilberger, Rutgers Math 454 (2020), Lecture 23: generate random labelled trees by sampling and inverting Prüfer codes
This distribution is uniform over fixed-label trees, rather than over unlabelled trees. With four labels, the star graph shape has probability and the path graph shape has probability . Also, for a fixed label , the Prüfer degree formula givesHere the binomial distribution counts the independent code positions equal to . The expected value agrees with the average vertex degree from the degree-sum formula. Individual labels have the same distribution by symmetry, though their vertex degrees are constrained together by their fixed sum. When , simply return the single isolated vertex.
Uniformly continuous function Created 2026-09-24 Updated 2026-10-18
A uniformly continuous function has one input tolerance valid throughout its domain of a function. For , with , uniform continuity meansChoose the output tolerance first, then a positive valid for every pair of function inputs. It may depend on , the function and its domain of a function, but not on the pair’s location. The absolute values measure input and output distance.[ref]
Basic Analysis: Introduction to Real Analysis, Volume I by Jiří Lebl. §3.4, Definition 3.4.1: a single positive input tolerance for all pairs in the specified real domain
Compare the quantifier order with the epsilon-delta definition of continuity:Both lines end with . In the first, can depend on the point ; in the second, it is chosen before . Thus uniform continuity implies continuity at every point. Each requested gets its own shared tolerance.
For an exact example, take the polynomial function on the closed interval . For every pair of function inputs in that interval, polynomial factorization givesConsequently works everywhere on this domain of a function. With , the common tolerance is . Near the right endpoint, for example, and have input distance and output distance . The bound is sufficient; it does not claim the largest admissible input window at each point.
On the whole real line, the same polynomial function is a continuous function but fails uniform continuity. Take the sequences and , for positive integers . ThenFor any proposed , choose an integer . The inputs are closer than , yet their outputs violate the fixed tolerance . The sequences need not themselves have a finite limit: their mutual distance is what tends to zero. This is the obstruction captured by the sequential criterion for uniform continuity. Restricting the domain of a function to removes these escaping pairs.
A uniformly continuous function need not be a bounded function. The identity function on the real line has , so always works, although its image of a function is the unbounded real line. Uniform continuity controls changes between nearby inputs, not the overall size of outputs. Likewise, an unbounded domain of a function does not by itself prevent uniform continuity.
The square root supplies a different common tolerance on the interval . Assuming , put and . Since ,Interchanging the inputs when necessary provesThus guarantees uniform continuity on the entire domain of a function, including zero. For , any input distance below suffices. The pairs and both have input distance ; their output distances are respectively and . The common guarantee accommodates quite different local sensitivities.
This Hölder continuity bound allows a curved tolerance rule. It is weaker than a Lipschitz bound: at zero the output change divided by the input change isNo finite Lipschitz constant works near zero, even though uniform continuity does. A Lipschitz function does have uniform continuity, choosing when its Lipschitz bound is positive; when it is a constant function.[ref]
Basic Analysis: Introduction to Real Analysis, Volume I by Jiří Lebl. §3.4, Proposition 3.4.8 and Example 3.4.10: Lipschitz continuity implies uniform continuity; the square root on the nonnegative half-line separates the properties
Square-root input changes share an output tolerance even though amplification near zero is unbounded
. At left, the exact output changes for base points stay inside whenever and . The right panel computes the amplification for inputs : it grows without bound as decreases. These are calculated function graphs, with no experimental measurements. Details.For general metric spaces, replace the absolute values by the respective distance functions. The Heine-Cantor theorem gives an existence guarantee: every continuous function on a compact metric space is uniformly continuous. In particular, continuity on a finite closed interval provides a common tolerance, even when no simple formula for it is known.[ref]
Basic Analysis: Introduction to Real Analysis, Volume I by Jiří Lebl. §7.5, Definition 7.5.10 and Theorem 7.5.11: uniform continuity between metric spaces and the compact-domain theorem
For a short proof outline, fix . Continuity gives each point an open ball of radius within which outputs differ from by less than . The open balls of half these radii still cover the domain of a function. Compactness supplies a finite subcover. Take to be the smallest half-radius in this finite set. Two inputs closer than lie together in one of the original open balls, so the triangle inequality bounds their output distance by . The beautiful step is that the compact set turns local choices into finitely many choices, whose minimum stays positive.
A shared tolerance also makes uniformly continuous functions preserve Cauchy sequences: after choosing for , all sufficiently late input pairs are closer than , so all corresponding output pairs are closer than . Unlike a convergent sequence argument, this does not require an input limit inside the domain of a function. It is why uniform continuity is useful for extending a function toward missing endpoints and for the decay argument below.
Uniform payoff bound against Tit for tat 2026-10-25
In a symmetric two-action stage game write for mutual cooperation, mutual defection, sole defection and sole cooperation payoffs. Suppose , and . Against an initially cooperative Tit for tat, every action sequence has limiting upper average payoff at most .
For a deviator's actions , put , and . The opponent at time plays . Check the four transitions: to and to satisfywith equality; to uses , and to uses . A telescoping sum gives the displayed finite-horizon bound. Divide by the horizon and let it increase. Mutual Tit for tat yields every round, so it is a Nash equilibrium under the long-run average payoff criterion. The argument is pathwise and therefore covers arbitrary deviations representable by finite-state machines, as well as action sequences outside that class.
Uniform recurrence Created 2026-10-05 Updated 2026-10-14
A two-sided sequence over a finite alphabet is uniformly recurrent if every finite word over an alphabet occurring in it occurs with bounded gaps. More precisely, for each such word some ensures that every length- interval contains a complete occurrence. This is equivalent to being a minimal point of the full shift: a finite cover of the orbit closure by preimages of a word's cylinder set bounds its return gaps; conversely, bounded gaps pass to all points of the orbit closure and make every forward orbit dense there. The property concerns finite words, not infinite integer intervals.
Union-find operation bounds 2026-10-18
Assume identifiers, pointers and ranks fit into constant-size machine words, with constant-cost indexed array access, comparison and assignment. Initializing members costs time and machine words. With union by rank and full path compression, any sequence of disjoint-set find operations and disjoint-set union operations then has total time complexity, in Big O notation,Here is a conventionally normalized inverse Ackermann function. The documented path-halving implementation has the same amortized analysis bound.[ref]
UF.java. Algorithms, 4th edition by Robert Sedgewick and others; UF.java, class documentation: linear constructor, logarithmic worst-case operations and inverse-Ackermann sequence bound for rank with halving
A disjoint-set union operation includes two disjoint-set find operations and a constant amount of additional linking work. Including in the bound accounts for initialization even if no queries follow.
This is a bound on an entire sequence. It is not a worst-case constant bound for each call: a disjoint-set find operation can still encounter a previously uncompressed route of logarithmic length. The inverse Ackermann function grows extraordinarily slowly but is unbounded, so it cannot be replaced by a mathematical constant in this asymptotic statement. The general distinction between a per-operation maximum and a whole-sequence guarantee is explained in amortized analysis.
Robert Tarjan's 1975 paper established an inverse Ackermann function bound for set union. Its abstract states the sharper two-parameter form for representative queries and intermixed merges: the worst total cost is bounded above and below by positive constant multiples of . Those variables count different operations from the convenient formulation above; the abstract's matching lower bound is about its analyzed method, rather than a claim that every conceivable representation obeys the same lower bound.[ref]
The intuition is that union by rank limits how parent routes grow, while path compression makes an expensive traversal improve later queries. The rank argument alone proves only a logarithmic bound. Establishing the inverse Ackermann function bound requires a finer accounting of traversals across rank ranges; it does not follow merely from drawing a flatter rooted tree. The useful result is that repeated merging and membership queries can share the work of maintaining a changing partition of a set.
Walk in a graph Created 2026-10-06 Updated 2026-10-14
A walk records a journey through a graph as a finite alternating sequencewhere each edge joins the consecutive vertices and . Both vertices and edges may repeat. Its length is , counting edge traversals with repetitions, rather than counting different edges or measuring the drawing. Here a graph path means a walk with no repeated vertices; a trail instead forbids repeated edges. These conventions distinguish a journey's record from the subgraph consisting of the connections it used.[ref]
https://ptwiddle.github.io/MAS341-Graph-Theory-2017/lecturenotes/lecture3.html. Paul Johnson, MAS341, Lecture 3: walks and trails
Unless stated otherwise, the examples below use a finite simple graph that is an undirected graph, so an edge may be traversed in either direction. In a multigraph, retain each edge's individual identity as well as its endpoint vertices: two parallel edges are different choices for the same step. If self-loops are allowed, traversing one leaves the current vertex unchanged but adds one to the length. In a directed graph, each step must follow its directed edge from its initial to its terminal vertex, giving a directed walk; reversing a journey need not be possible.[ref]
https://people.math.binghamton.edu/zaslav/Oldcourses/581.S99/notes.html. Thomas Zaslavsky, Supplementary Notes for Graduate Graph Theory: edge identities and walks
We allow the zero-length walk at every vertex . It uses no edges, so it is also a trail and a graph path, and its coinciding endpoints make it a closed walk. This means staying put is a legitimate journey; a graph with no vertices has no such walk. Positive-length restrictions will be stated explicitly.[ref]
Mathematics for Computer Science by Eric Lehman and others. Lehman, Leighton and Meyer, Mathematics for Computer Science, §11.8.1: length-zero convention
Use the same constructed graph throughout these three sections:Here denotes the unordered pair , and . Two triangles in a graph, and , share , with one extra edge . These are schematic connections, not measured roads; the highlighted connections in the diagram show which edges are used, while the numbered sequence records their order.
The length-six walk uses and twice, so it is not a trail. The length-six trail returns to but uses six different edges, so it is not a graph path. The length-three graph path repeats neither vertices nor edges. Thusfor this particular graph. The restrictions answer different routing questions: revisiting a junction is harmless for many journeys, whereas reusing a serviced road segment can matter for an inspection route. Travel costs require a weighted graph; a walk's cost adds the weight of each traversal, even when an edge is used again.
Every finite walk from to contains a graph path from to after deleting detours. For a proof outline, if with , delete the intervening closed walk. The retained steps still meet at the same vertex, and the length strictly decreases. Repeating terminates with no repeated vertices, or with the zero-length graph path when . This explains why reachability can be formulated using either walks or graph paths. With nonnegative edge weights, deletion also cannot increase cost, connecting the argument to the shortest path problem; with negative weights that cost conclusion fails.[ref]
https://ptwiddle.github.io/MAS341-Graph-Theory-2017/lecturenotes/lecture3.html. Paul Johnson, MAS341, Lecture 3: deleting repeated-vertex detours
Well-quasi-ordering Created 2026-10-06 Updated 2026-10-14






