Greedy coloring 2026-10-14
For a finite simple graph, choose an order of its vertices and process them one at a time. Give each vertex the smallest positive colour label not already used by its coloured neighbours, and keep all earlier assignments. This is greedy coloring: each step makes a locally available choice. The resulting graph coloring is proper because, for each edge, its later endpoint avoids the colour of its earlier endpoint.[ref]
https://ocw.mit.edu/courses/6-042j-mathematics-for-computer-science-fall-2010/1ccaf180bcd244fddd32e60789fa922f_h9wxtqoa1jY.pdf. Leighton, MIT Graph Theory and Coloring, transcript pages 12–13
If the maximum degree of a graph is , a vertex has at most previously coloured neighbours, forbidding at most that many distinct colours. At least one label among remains available. Consequently every order givesThis is an upper bound, not a promise that greedy coloring attains the chromatic number.[ref]
Consider the path graph with edges . In the order , greedy coloring assigns the colours respectively. In the order , it assigns colours in processing order: vertices both get colour , then vertex gets colour , and finally vertex sees colours and at its two neighbours and must take colour . Written in vertex order , this second colouring is .
The path graph has chromatic number two: the first assignment achieves two colours, and any edge rules out one. Its maximum degree of a graph is two, so three colours in the second assignment still satisfy the bound. The extra colour comes entirely from the processing order. The crown graph gives a larger family where a poor order can make greedy coloring use arbitrarily many colours although the chromatic number remains two.
Hamilton cycle Created 2026-09-24 Updated 2026-10-14
A Hamilton cycle, also called a Hamiltonian cycle, is a cycle in a graph containing every vertex of the graph. Here the convention is a finite simple graph whose edges are undirected, with . A traversal is a sequencewhere are all the distinct vertices and for . Thus "once" means once before the closing return: the start appears again at the end, and there are exactly traversed edges. The graph may contain additional unused edges.[ref]
Hamilton Cycles. Diestel, Graph Theory, Chapter 10, opening paragraph, printed p. 323: Hamilton cycles, Hamilton paths, and the contrast with Euler tours
A Hamiltonian path visits all vertices once without requiring a return. Removing an edge from a Hamilton cycle gives a Hamiltonian path; a particular Hamiltonian path closes only if its endpoints are adjacent. An Euler circuit instead traverses every edge exactly once and can revisit vertices midway. The two requirements are independent, as these original labelled examples show.
Two graphs separate Hamilton cycle vertex coverage from Euler circuit edge coverage; arrows mark traversal order, not directed edges
. Details. For the complete graph , use and , where abbreviates the unordered pair . The route is a Hamilton cycle: it visits every vertex and uses four of the six edges, omitting and . It is not an Euler circuit, and the graph admits no Euler circuit at all: every vertex degree is three, contradicting the Euler circuit criterion. The crossing of the drawn diagonals is not another vertex.
Conversely, take two triangles in a graph sharing only , with and . The route is an Euler circuit, using all six edges once; the vertex degrees are . It cannot be a Hamilton cycle, since occurs midway as well as at the start and end. More strongly, no Hamilton cycle exists: is a cut vertex, and deleting it leaves the two separate edges and . Nevertheless, is a Hamiltonian path, whose endpoints are not adjacent.
Hamiltonian graph 2026-10-14
A Hamiltonian graph is a graph containing a Hamilton cycle. This describes existence of a spanning graph cycle, rather than requiring every edge of the graph to belong to that graph cycle. In the finite simple graph convention, is a Hamiltonian graph for , because any ordering of its vertices closes using available edges.
Independence number Created 2026-10-03 Updated 2026-10-14
The independence number is the largest cardinality of an independent set in a finite simple graph:It answers "how many mutually compatible objects can be selected at once?", while the chromatic number asks how many compatible groups are needed for all the vertices. Diestel uses this notation for a largest independent set.[ref]
For the cycle graph , the independent set shows that . Three selected vertices would require at least three unselected vertices separating them around the cycle graph, which has only five vertices. Thus . There are five largest independent sets, obtained by rotating around the cycle graph, and five corresponding minimum vertex covers.
For the complete bipartite graph , an independent set cannot contain a vertex from each side, since every such pair is joined by an edge. The larger side has three vertices, so . A triangle in a graph has independence number one. A graph with no edges and vertices has independence number , including when .
The complement correspondence between vertex covers and independent sets gives, with ,Every extra vertex that can be left in an independent set is one fewer vertex needed in a minimum vertex cover. This identity holds for all finite simple graphs, including the triangle in a graph and the cycle graph ; it does not require the bipartite graph hypothesis of Kőnig's theorem for bipartite matching.
For a nonempty graph, every colour class of a proper vertex colouring contains at most vertices. Counting all the vertices therefore givesSince the chromatic number is an integer, the bound rounds up: for the cycle graph , . It is attained by assigning colour to , colour to , and colour to . All five edges, including , have differently coloured endpoints.
Independent set (graph theory) Created 2026-10-14 Updated 2026-10-18
An independent set selects mutually compatible objects when an edge of a graph represents a conflict. For example, if vertices are activities and edges join activities that cannot occur together, an independent set is a collection that can share one time slot. Finding the largest such collection is measured by the independence number.[ref]
https://introtcs.org/public/lec_12_NP.html. Barak, Introduction to Theoretical Computer Science, Chapter 14, The independent set problem
In a finite simple graph , an independent set is a subset with no edge joining two selected vertices:The empty set and every singleton set are independent sets. In the cycle graph drawn under vertex cover, is an independent set, but is not: the closing edge joins those two vertices. Choosing nonconsecutive labels is insufficient unless the wraparound edge is checked.
An independent set of maximum size has cardinality equal to the independence number. Being unable to add another vertex only makes an independent set inclusion-maximal. In the star graph , the centre alone is inclusion-maximal, since it is adjacent to every leaf, but the three leaves form a larger independent set. This distinction mirrors the difference between an inclusion-minimal vertex cover and a minimum vertex cover.
Every independent set has a vertex cover as its complement of a set; a largest independent set has a minimum vertex cover as its complement. In every proper vertex colouring, each colour class is an independent set, so graph coloring partitions the vertices into mutually compatible groups.
Independent vertex cover 2026-10-25
An independent vertex cover is a vertex cover that is also an independent set. Its complement is an independent set as well, since the cover condition forbids edges entirely in that complement. Thus such a cover is a side of a bipartition of the graph. This standard definition is stronger than independent dominating set on graphs without isolated vertices, and remains a different notion when isolated vertices are present. In a nonempty simple graph, two possibly repeated witnesses with and no edge outside express existence of an independent vertex cover of size at most two.
Kuratowski's theorem 2026-10-14
A finite simple graph is a planar graph if and only if it contains no graph subdivision of the complete graph or the complete bipartite graph as a subgraph; equivalently, neither is a topological minor. The easy direction follows by tracing each replacement graph path as one drawn edge. The converse asserts that every failure of planarity contains one of these two patterns.[ref]
Graph Theory by Reinhard Diestel (Planar Graphs preview, §4.4, Theorem 4.4.6, printed p. 111) dates Kuratowski's theorem to 1930 and the equivalent graph minor characterization to 1937. These dates are that textbook's historical attribution.
Mantel theorem Created 2026-09-24 Updated 2026-10-14
The complete bipartite graph has vertex sets and , with every edge between and and none inside either part. Its six vertices support edges and no triangles in a graph: among any three vertices, two belong to the same independent set and have no joining edge.
Add the single edge . Each is a common neighbour of its endpoints, producing the triangle in a graph . These are exactly the three new triangles in a graph, because every triangle in a graph must use the only edge inside a part. The new count is ten edges; nine was the last possible count without a triangle in a graph on six vertices.
In general, every simple graph with a finite set of vertices that is triangle-free has at mostedges. This is the case of Turán's theorem, with forbidden clique . Equality holds exactly for the balanced complete bipartite graph , up to graph isomorphism; empty parts are allowed for .[ref]
Graph Theory by Reinhard Diestel. third electronic edition (2005), §7.1, printed p. 165, Theorem 7.1.1 and the definition of Turán graphs, specialized to the forbidden graph K3
The floor function gives the exact integer bound. Splitting vertices into two independent sets of sizes and , and putting in every cross edge, givesThe count is largest when is an integer nearest . For it is ; for it is . Both equal . This proves attainability for every , including the empty graph.
A short proof of the upper bound uses degrees of vertices. In a triangle-free graph, the endpoints of an edge have disjoint vertex neighbourhoods: a common neighbour would complete a triangle in a graph. Thus . Summing over edges counts once for each of the edges incident to , givingFor , the Cauchy-Schwarz inequality and handshaking lemma yieldIf , division gives ; is immediate. Since is an integer, apply the floor function. The case is immediate too. This proves the bound; the full equality characterization follows from Turán's theorem.
The useful reversal is that more than edges force a triangle in a graph, whatever their placement. A global count certifies a local pattern. The extremizer is bipartite, but a triangle-free graph need not be bipartite: a five-vertex graph cycle has five edges, below the bound of six. Historically, Willem Mantel posed the triangle-exclusion question in 1907.[ref]
Wie weet wie Willem Wijthoff was? by Robbert Fokkink. Robbert Fokkink, Wie weet wie Willem Wijthoff was?, Nieuw Archief voor Wiskunde 5/17(4), December 2016, printed p. 279, Wythoffs bewijs van de stelling van Mantel: attribution of problem 28 in 1907
Matching (graph theory) Created 2026-10-14 Updated 2026-10-31
A matching in a graph is a set of edges of an undirected graph with no shared endpoints: each vertex has capacity for at most one selected edge. It describes simultaneous compatible pairs, such as jobs assigned to distinct available workers, or tasks each occupying two resources that cannot be shared. The empty set is a valid matching in a graph.[ref]
Graph Theory by Reinhard Diestel. Matching, Covering and Packing, opening paragraph, printed p. 1: independent edges and matchings
For a finite simple graph , write when is selected and otherwise. The vertex capacity constraint is exactlyThese are constraints on a discrete selection, not a requirement that every vertex be used. A matching in a graph with matching saturation of all vertices is a perfect matching; an unmatched vertex in a matching uses none of its capacity.
The objective must be specified separately. A maximum cardinality matching selects as many edges as possible; a maximum-weight matching selects the greatest total benefit; a minimum-weight perfect matching minimizes cost while requiring every vertex to be paired. A maximal matching only says that no additional edge fits alongside the current choices. The four-vertex path graph below separates these notions: choosing the middle edge blocks both outer edges, yet replacing it by those two edges pairs more vertices.
This model is useful because conflicts are local at vertices, while the quality of a selection can depend on coordinated changes along a whole augmenting path in a matching. A greedy matching gives a quick feasible selection; Berge's theorem explains when searching for such changes has reached a maximum cardinality matching. Repeating the pairing problem over time leads instead to proper edge colouring, where each time slot is a matching in a graph.
Maximal matching Created 2026-09-24 Updated 2026-10-14
A maximal matching is a matching in a graph to which no extra edge can be added while retaining all current selected edges. Equivalently, no edge joins two unmatched vertices in a matching; those vertices form an independent set. Every maximum cardinality matching is a maximal matching, but the converse fails.
Take the path graph with vertices and edges . A greedy algorithm that first selects the middle edge produces . Both remaining edges touch a matched vertex, so this size-one matching in a graph is maximal. Yet has two edges. No matching in a graph on four vertices has more than two edges, so is a maximum cardinality matching. The two remaining free vertices of , namely and , are not adjacent; that does not prevent a longer augmenting path in a matching from joining them.
Choosing the middle edge of P₄ gives a maximal matching of size one; the outer edges give a maximum cardinality matching of size two
. Details. Maximality is useful as a quick stopping rule and a modest guarantee. For any maximal matching and maximum cardinality matching in a finite simple graph, every edge of touches an endpoint of an edge of . Assign it to one such edge of . Since has disjoint endpoints, each edge of receives at most two assignments, proving . The P₄ example reaches equality. Thus maximality guarantees at least half the largest cardinality, but says nothing comparable about arbitrary edge benefits. Its selected endpoints also form a vertex cover, as explained under vertex cover.
Minimum vertex cover Created 2026-10-14 Updated 2026-10-25
A minimum vertex cover is a vertex cover of smallest cardinality among all vertex covers of the same finite simple graph. The optimum size is the vertex cover number. By the complement of a set correspondence, a minimum vertex cover leaves a largest possible independent set unselected.
Minimum size is stronger than merely being unable to remove a selected vertex. In the star graph , the three leaves form a vertex cover from which no vertex can be removed: each leaf covers its own edge. Nevertheless, the centre alone is a minimum vertex cover of size one. Such an inclusion-minimal vertex cover can therefore be much larger than a minimum vertex cover.
Multiple edges 2026-10-14
Multiple edges are distinct edges with the same pair of endpoint vertices in an undirected graph. A multigraph permits them; a simple graph does not. In an orientation of a graph of a multigraph, each such edge receives its own direction, so two of them can supply opposite directed edges between the same vertices.
Mycielskian Created 2026-10-14 Updated 2026-10-14
The Mycielski construction replaces a graph with a graph having one shadow vertex for each original vertex and one further vertex adjacent to every shadow. It satisfiesand preserves triangle-freeness. Iterating it from the five-cycle gives triangle-free graphs of arbitrarily large chromatic number.
Here is a finite simple graph with at least one vertex; it need not have an edge. The Mycielskian separates two ways of needing many colours: a large clique forces distinct colours immediately, but a triangle-free graph can impose incompatible choices through its whole pattern of graph adjacency. The Mycielski construction increases that global constraint while preserving the absence of triangles in a graph.
Write the vertex set of as , with . Keep these vertices, add distinct Mycielski shadow vertices , and add a Mycielski apex . The vertex set and complete list of edges areThere are no other edges: the Mycielski shadow vertices form an independent set, has no original vertex as a neighbour, and is not adjacent to . Each Mycielski shadow vertex copies its original vertex's graph neighbourhood within the original vertex set, not its position in the drawing. This is the construction in the inspected research paper.[ref]
For original vertices and original edges, direct counting gives vertices and edges. The original vertices induce a copy of , so no original graph adjacency is lost. A drawing crossing is not an extra vertex.
Start with the complete graph , whose only edge is , abbreviating . Its Mycielskian has exactly the edges . Reading them as gives the cycle graph . A proper vertex colouring gives colour 1, colour 2, and colour 3. Two colours cannot close an odd cycle, so its chromatic number is exactly three.
Mycielskian chromatic increase 2026-10-14
For a nonempty finite simple graph, the upper bound copies an optimal proper vertex colouring to its Mycielski shadow vertices and gives the Mycielski apex a fresh colour. For the lower bound, suppose uses colours, with coloured . Shadows avoid . Replace colour at each original by 's colour. Changed originals form an independent set; unchanged neighbours differ because is an edge. This proper vertex colouring of uses colours, contradicting its chromatic number.[ref]
Mycielski graphs and PR proofs by Emre Yolcu and others. §4.1, Proposition 1 and proof, manuscript pp. 6–7
The nonempty condition means , not . An edgeless -vertex graph with has chromatic number one; its Mycielskian is a star graph on together with isolated vertices, and needs two colours. If has no vertices, is a single vertex, so the same formula also holds with the convention .
Mycielskian triangle preservation 2026-10-14
A finite simple graph is a triangle-free graph if and only if its Mycielskian is a triangle-free graph. No triangle in a graph can contain the Mycielski apex, whose neighbours are an independent set, or two Mycielski shadow vertices. A triangle in a graph containing one shadow and two originals requires all three original edges , hence an original triangle in a graph. Conversely every original triangle in a graph remains. In fact each original triangle in a graph gives four in : itself and the three choices of replacing one of its vertices by its shadow. Thus triangle-freeness is preserved, but a positive triangle count is multiplied by four.
Necessary conditions for a Hamilton cycle 2026-10-14
A Hamiltonian graph must be a connected graph and have minimum degree : each vertex has two distinct neighbours on its Hamilton cycle. It also has no cut vertex. Indeed, deleting any vertex from the Hamilton cycle leaves a graph path through every remaining vertex, so the remaining graph is connected. These are quick ways to rule out a Hamilton cycle.[ref]
Hamilton Cycles. Diestel, Graph Theory, §10.1, printed pp. 323–324: necessary minimum degree two and 2-connectivity
Even these conditions together are not sufficient: the complete bipartite graph is connected, has minimum degree two and no cut vertex, but has no Hamilton cycle. Every graph cycle in a bipartite graph alternates between its two parts, using equally many vertices from each; it cannot use all two and all three.
In the other direction, Dirac's theorem gives a sufficient condition: a finite simple graph with and has a Hamilton cycle. Failure of this inequality proves nothing by itself: the cycle graph has a Hamilton cycle despite .[ref]
Neighbour enumeration 2026-10-14
Neighbour enumeration reports the neighbours of a specified vertex. For a simple graph, scan its adjacency list and report each entry. With constant-time list access and work per entry, a list of length needs time in Big O notation, conventionally written for nonempty lists. Use vertex degree for an undirected graph and outdegree for a directed graph. Obtaining the list reference can take constant time; consuming it requires visiting every entry.[ref]
Digraph.java. Digraph.java, class documentation and adj: obtaining the collection versus iterating in time proportional to outdegree
In our undirected example, enumerating 's neighbours reads : three entries. Scanning row of the full adjacency matrix reads six entries, , to produce the same answer. In the directed variant, enumerating 's outgoing neighbours reads no neighbour entries, but still needs constant work to locate and recognize its empty list. For a multigraph, scanning lists enumerates incident edges with multiplicity; reporting only distinct neighbours additionally requires removing repetitions.
For a short time complexity argument, each reported entry requires at least one output operation, and one scan suffices. Across all vertices, the undirected entry count is by the handshaking lemma; the directed count is . A graph search that processes each vertex once and scans each of its entries once therefore does structural work, provided its visited-state access and FIFO queue or stack operations also have the required constant-time costs. With a full adjacency matrix, scanning every row instead inspects entries. This is how the representation enters the analysis of breadth-first search and depth-first search.
Nonplanarity by edge counts 2026-10-14
The complete graph has and , exceeding the planar graph edge bound . Therefore it is not a planar graph. The complete bipartite graph has and . The general bound allows twelve edges, but the bipartite planar graph edge bound allows only eight, proving nonplanarity.
Actual plane-graph face counts compared with impossible face counts for the two complete-graph obstructions
. Details. These are necessary bounds, not a complete planarity test. For an original counterexample, subdivide every edge of once. The resulting simple graph is a connected graph with , , and is bipartite: put all original vertices in one part and all nine new vertices in the other. Both inequalities hold, and . Nevertheless, a crossing-free graph drawing would let us trace each two-edge graph path as one curve, producing an impossible embedding of . The graph subdivision preserves this obstruction. Kuratowski's theorem supplies a stronger characterization than these counts.
Order-induced acyclic orientation Created 2026-10-14 Updated 2026-10-31
Choose a strict total order of the vertices of a finite simple graph. Direct every edge from to when . Along every directed path, the index strictly increases. Returning to the starting vertex would require an impossible strict increase back to the initial index, so this is an acyclic orientation. The displayed comes from .
The chosen strict total order is a topological order of the resulting Directed acyclic graph. Conversely, every acyclic orientation of a finite simple graph has a topological order, and orienting its edges from earlier to later in that order recovers it. Different topological orders can induce the same acyclic orientation, since vertices with no edge between them need not impose a choice of arrow.[ref]
Lecture 14: Graphs II: Depth-First Search. printed pp. 4–6: job scheduling, topological sorting and its edge-order correctness condition
An order respects reachability but does not create it: in a chosen topological order does not imply a directed path from to . For example, orient the two edges of the graph path using . The arrows are and ; there is no directed path from to , despite . In , however, reaches both directly and via . Following outgoing directed edges with graph search decides this directional reachability.[ref]
Lecture 14: Graphs II: Depth-First Search. printed pp. 1–2: directed adjacency lists contain outgoing edges; a search sees vertices reachable from its start
Orientation of a graph Created 2026-10-07 Updated 2026-10-14
An orientation of a graph keeps the same vertex set and the same individual edges. For every edge with distinct endpoints, choose exactly one directed edge, either or . Replacing it by both arrows is a different construction: it doubles the edges and permits travel both ways along that connection. In an orientation of a graph, the return journey must use another route.[ref]
The Basics (author-hosted chapter preview). §1.10, printed p. 28: an orientation retains the vertex and edge sets and assigns initial and terminal endpoints
All examples below use finite simple graphs: no self-loops and no multiple edges. For a multigraph, each individual nonloop edge receives its own direction, so two multiple edges can point in opposite directions. A self-loop becomes , which is already a directed cycle of length one and therefore prevents an acyclic orientation. A finite simple graph with edges has orientations of a graph, since the two choices for each edge are independent.
Think of vertices as junctions and edges as streets. An orientation of a graph makes each street one-way; reachability asks whether a legal journey exists from one specified junction to another. Two useful aims pull in different directions: an acyclic orientation rules out circular dependencies, while a strong orientation permits journeys between every ordered pair of junctions.





