In graph theory, the weak components of a directed graph partition the vertices of the graph into subsets that are totally ordered by reachability. They form the finest partition of the set of vertices that is totally ordered in this way.
The weak components were defined in a 1972 paper by Ronald Graham, Donald Knuth, and (posthumously) Theodore Motzkin, by analogy to the strongly connected components of a directed graph, which form the finest possible partition of the graph's vertices into subsets that are partially ordered by reachability. Instead, they defined the weak components to be the finest partition of the vertices into subsets that are totally ordered by reachability. [1] [2]
In more detail, Knuth (2022) defines the weak components through a combination of four symmetric relations on the vertices of any directed graph, denoted here as ,,,and :
Then is an equivalence relation: every vertex is related to itself by (because it can reach itself in both directions by paths of length zero), any two vertices that are related by can be swapped for each other without changing this relation (because is built out of the symmetric relations and ), and is a transitive relation (because it is a transitive closure). As with any equivalence relation, it can be used to partition the vertices of the graph into equivalence classes, subsets of the vertices such that two vertices are related by if and only if they belong to the same equivalence class. These equivalence classes are the weak components of the given graph. [2]
The original definition by Graham, Knuth, and Motzkin is equivalent but formulated somewhat differently. Given a directed graph , they first construct another graph as the complement graph of the transitive closure of . As Tarjan (1974) describes, the edges in represent non-paths, pairs of vertices that are not connected by a path in . [3] Then, two vertices belong to the same weak component when either they belong to the same strongly connected component of or of . [1] [3] As Graham, Knuth, and Motzkin show, this condition defines an equivalence relation, [1] the same one defined above as . [4]
Corresponding to these definitions, a directed graph is called weakly connected if it has exactly one weak component. This means that its vertices cannot be partitioned into two subsets, such that all of the vertices in the first subset can reach all of the vertices in the second subset, but such that none of the vertices in the second subset can reach any of the vertices in the first subset. It differs from other notions of weak connectivity in the literature, such as connectivity and components in the underlying unconnected graph, for which Knuth suggests the alternative terminology undirected components. [2]
If and are two weak components of a directed graph, then either all vertices in can reach all vertices in by paths in the graph, or all vertices in can reach all vertices in . However, there cannot exist reachability relations in both directions between these two components. Therefore, we can define an ordering on the weak components, according to which when all vertices in can reach all vertices in . By definition, . This is an asymmetric relation (two elements can only be related in one direction, not the other) and it inherits the property of being a transitive relation from the transitivity of reachability. Therefore, it defines a total ordering on the weak components. It is the finest possible partition of the vertices into a totally ordered set of vertices consistent with reachability. [1]
This ordering on the weak components can alternatively be interpreted as a weak ordering on the vertices themselves, with the property that when in the weak ordering, there necessarily exists a path from to , but not from to . However, this is not a complete characterization of this weak ordering, because two vertices and could have this same reachability ordering while belonging to the same weak component as each other. [2]
Every weak component is a union of strongly connected components. [2] If the strongly connected components of any given graph are contracted to single vertices, producing a directed acyclic graph (the condensation of the given graph), and then this condensation is topologically sorted, then each weak component necessarily appears as a consecutive subsequence of the topological order of the strong components. [3]
An algorithm for computing the weak components of a given directed graph in linear time was described by Pacault (1974), and subsequently simplified by Tarjan (1974) and Knuth (2022). [2] [3] [5] As Tarjan observes, Tarjan's strongly connected components algorithm based on depth-first search will output the strongly connected components in (the reverse of) a topologically sorted order. The algorithm for weak components generates the strongly connected components in this order, and maintains a partition of the components that have been generated so far into the weak components of their induced subgraph. After all components are generated, this partition will describe the weak components of the whole graph. [2] [3]
It is convenient to maintain the current partition into weak components in a stack, with each weak component maintaining additionally a list of its sources, strongly connected components that have no incoming edges from other strongly connected components in the same weak component, with the most recently generated source first. Each newly generated strongly connected component may form a new weak component on its own, or may end up merged with some of the previously constructed weak components near the top of the stack, the ones for which it cannot reach all sources. [2] [3]
Thus, the algorithm performs the following steps: [2] [3]
Each test for whether any edges from hit a weak component can be performed in constant time once we find an edge from to the most recently generated earlier strongly connected component, by comparing the target component of that edge to the first source of the second-to-top component on the stack.
In topology and related branches of mathematics, a connected space is a topological space that cannot be represented as the union of two or more disjoint non-empty open subsets. Connectedness is one of the principal topological properties that are used to distinguish topological spaces.
In mathematics, an equivalence relation is a binary relation that is reflexive, symmetric and transitive. The equipollence relation between line segments in geometry is a common example of an equivalence relation. A simpler example is equality. Any number is equal to itself (reflexive). If , then (symmetric). If and , then (transitive).
In mathematics, especially in order theory, a preorder or quasiorder is a binary relation that is reflexive and transitive. Preorders are more general than equivalence relations and (non-strict) partial orders, both of which are special cases of a preorder: an antisymmetric preorder is a partial order, and a symmetric preorder is an equivalence relation.
In mathematics, a hypergraph is a generalization of a graph in which an edge can join any number of vertices. In contrast, in an ordinary graph, an edge connects exactly two vertices.
In graph theory, a component of an undirected graph is a connected subgraph that is not part of any larger connected subgraph. The components of any graph partition its vertices into disjoint sets, and are the induced subgraphs of those sets. A graph that is itself connected has exactly one component, consisting of the whole graph. Components are sometimes called connected components.
This is a glossary of graph theory. Graph theory is the study of graphs, systems of nodes or vertices connected in pairs by lines or edges.
In mathematics, a partition of a set is a grouping of its elements into non-empty subsets, in such a way that every element is included in exactly one subset.
In the mathematical theory of directed graphs, a graph is said to be strongly connected if every vertex is reachable from every other vertex. The strongly connected components of a directed graph form a partition into subgraphs that are themselves strongly connected. It is possible to test the strong connectivity of a graph, or to find its strongly connected components, in linear time (that is, Θ(V + E )).
In the mathematical theory of matroids, a graphic matroid is a matroid whose independent sets are the forests in a given finite undirected graph. The dual matroids of graphic matroids are called co-graphic matroids or bond matroids. A matroid that is both graphic and co-graphic is sometimes called a planar matroid ; these are exactly the graphic matroids formed from planar graphs.
In mathematics, especially order theory, a weak ordering is a mathematical formalization of the intuitive notion of a ranking of a set, some of whose members may be tied with each other. Weak orders are a generalization of totally ordered sets and are in turn generalized by (strictly) partially ordered sets and preorders.
In computer science, a topological sort or topological ordering of a directed graph is a linear ordering of its vertices such that for every directed edge (u,v) from vertex u to vertex v, u comes before v in the ordering. For instance, the vertices of the graph may represent tasks to be performed, and the edges may represent constraints that one task must be performed before another; in this application, a topological ordering is just a valid sequence for the tasks. Precisely, a topological sort is a graph traversal in which each node v is visited only after all its dependencies are visited. A topological ordering is possible if and only if the graph has no directed cycles, that is, if it is a directed acyclic graph (DAG). Any DAG has at least one topological ordering, and algorithms are known for constructing a topological ordering of any DAG in linear time. Topological sorting has many applications, especially in ranking problems such as feedback arc set. Topological sorting is possible even when the DAG has disconnected components.
In graph theory, a bridge, isthmus, cut-edge, or cut arc is an edge of a graph whose deletion increases the graph's number of connected components. Equivalently, an edge is a bridge if and only if it is not contained in any cycle. For a connected graph, a bridge can uniquely determine a cut. A graph is said to be bridgeless or isthmus-free if it contains no bridges.
In graph theory, the Dulmage–Mendelsohn decomposition is a partition of the vertices of a bipartite graph into subsets, with the property that two adjacent vertices belong to the same subset if and only if they are paired with each other in a perfect matching of the graph. It is named after A. L. Dulmage and Nathan Mendelsohn, who published it in 1958. A generalization to any graph is the Edmonds–Gallai decomposition, using the Blossom algorithm.
In graph theory, reachability refers to the ability to get from one vertex to another within a graph. A vertex can reach a vertex if there exists a sequence of adjacent vertices which starts with and ends with .
In mathematics, a partial equivalence relation is a homogeneous binary relation that is symmetric and transitive. If the relation is also reflexive, then the relation is an equivalence relation.
In the mathematical field of graph theory, a transitive reduction of a directed graph D is another directed graph with the same vertices and as few edges as possible, such that for all pairs of vertices v, w a (directed) path from v to w in D exists if and only if such a path exists in the reduction. Transitive reductions were introduced by Aho, Garey & Ullman (1972), who provided tight bounds on the computational complexity of constructing them.
In graph theory, a biconnected component is a maximal biconnected subgraph. Any connected graph decomposes into a tree of biconnected components called the block-cut tree of the graph. The blocks are attached to each other at shared vertices called cut vertices or separating vertices or articulation points. Specifically, a cut vertex is any vertex whose removal increases the number of connected components.
Tarjan's strongly connected components algorithm is an algorithm in graph theory for finding the strongly connected components (SCCs) of a directed graph. It runs in linear time, matching the time bound for alternative methods including Kosaraju's algorithm and the path-based strong component algorithm. The algorithm is named for its inventor, Robert Tarjan.
In graph theory, the modular decomposition is a decomposition of a graph into subsets of vertices called modules. A module is a generalization of a connected component of a graph. Unlike connected components, however, one module can be a proper subset of another. Modules therefore lead to a recursive (hierarchical) decomposition of the graph, instead of just a partition.
In the mathematics of infinite graphs, an end of a graph represents, intuitively, a direction in which the graph extends to infinity. Ends may be formalized mathematically as equivalence classes of infinite paths, as havens describing strategies for pursuit–evasion games on the graph, or as topological ends of topological spaces associated with the graph.