Weak Component
   HOME

TheInfoList



OR:

In
graph theory In mathematics, graph theory is the study of ''graphs'', which are mathematical structures used to model pairwise relations between objects. A graph in this context is made up of '' vertices'' (also called ''nodes'' or ''points'') which are conne ...
, the weak components of a
directed graph In mathematics, and more specifically in graph theory, a directed graph (or digraph) is a graph that is made up of a set of vertices connected by directed edges, often called arcs. Definition In formal terms, a directed graph is an ordered pa ...
partition the vertices of the graph into subsets that are
totally ordered In mathematics, a total or linear order is a partial order in which any two elements are comparable. That is, a total order is a binary relation \leq on some set X, which satisfies the following for all a, b and c in X: # a \leq a ( reflexive) ...
by
reachability In graph theory, reachability refers to the ability to get from one vertex to another within a graph. A vertex s can reach a vertex t (and t is reachable from s) if there exists a sequence of adjacent vertices (i.e. a walk) which starts with s an ...
. They form the finest partition of the set of vertices that is totally ordered in this way.


Definition

The weak components were defined in a 1972 paper by
Ronald Graham Ronald Lewis Graham (October 31, 1935July 6, 2020) was an American mathematician credited by the American Mathematical Society as "one of the principal architects of the rapid development worldwide of discrete mathematics in recent years". He ...
,
Donald Knuth Donald Ervin Knuth ( ; born January 10, 1938) is an American computer scientist, mathematician, and professor emeritus at Stanford University. He is the 1974 recipient of the ACM Turing Award, informally considered the Nobel Prize of computer sc ...
, and (posthumously)
Theodore Motzkin Theodore Samuel Motzkin (26 March 1908 – 15 December 1970) was an Israeli-American mathematician. Biography Motzkin's father Leo Motzkin, a Ukrainian Jew, went to Berlin at the age of thirteen to study mathematics. He pursued university studi ...
, by analogy to the
strongly connected component 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 an arbitrary directed graph form a partition into subgraphs that a ...
s of a directed graph, which form the finest possible partition of the graph's vertices into subsets that are
partially ordered In mathematics, especially order theory, a partially ordered set (also poset) formalizes and generalizes the intuitive concept of an ordering, sequencing, or arrangement of the elements of a set. A poset consists of a set together with a binary r ...
by reachability. Instead, they defined the weak components to be the finest partition of the vertices into subsets that are totally ordered by In more detail, defines the weak components through a combination of four
symmetric relation A symmetric relation is a type of binary relation. An example is the relation "is equal to", because if ''a'' = ''b'' is true then ''b'' = ''a'' is also true. Formally, a binary relation ''R'' over a set ''X'' is symmetric if: :\forall a, b \in X( ...
s on the vertices of any directed graph, denoted here as *For any two vertices u and v of the graph, u\Leftrightarrow v if and only if each vertex is reachable from the other: there exist paths in the graph from u to v and from v The \Leftrightarrow relation is an
equivalence relation 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. Each equivalence relation ...
, and its
equivalence class In mathematics, when the elements of some set S have a notion of equivalence (formalized as an equivalence relation), then one may naturally split the set S into equivalence classes. These equivalence classes are constructed so that elements a ...
es are used to define the strongly connected components of the graph. *For any two vertices u and v of the graph, u\parallel v if and only if neither vertex is reachable from the other: there do not exist paths in the graph in either direction between u *For any two vertices u and v of the graph, u\approx v if and only if either u\Leftrightarrow v That is, there may be a two-way connection between these vertices, or they may be mutually unreachable, but they may not have a one-way connection. *The relation \asymp is defined as the
transitive closure In mathematics, the transitive closure of a binary relation on a set is the smallest relation on that contains and is transitive. For finite sets, "smallest" can be taken in its usual sense, of having the fewest related pairs; for infinite s ...
That is, u\asymp v when there is a sequence u\approx\cdots\approx v of vertices, starting with u and ending such that each consecutive pair in the sequence is related Then \asymp is an
equivalence relation 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. Each equivalence relation ...
: every vertex is related to itself by \asymp (because it can reach itself in both directions by paths of length zero), any two vertices that are related by \asymp can be swapped for each other without changing this relation (because \asymp is built out of the symmetric relations \Leftrightarrow and \asymp is a
transitive relation In mathematics, a relation on a set is transitive if, for all elements , , in , whenever relates to and to , then also relates to . Each partial order as well as each equivalence relation needs to be transitive. Definition A homog ...
(because it is a transitive closure of another relation). As with any equivalence relation, it can be used to partition the vertices of the graph into
equivalence class In mathematics, when the elements of some set S have a notion of equivalence (formalized as an equivalence relation), then one may naturally split the set S into equivalence classes. These equivalence classes are constructed so that elements a ...
es, subsets of the vertices such that two vertices are related by \asymp if and only if they belong to the same equivalence class. These equivalence classes are the weak components of the given The original definition by Graham, Knuth, and Motzkin is equivalent but formulated somewhat differently. Given a directed they first construct another graph \hat G as the
complement graph In the mathematical field of graph theory, the complement or inverse of a graph is a graph on the same vertices such that two distinct vertices of are adjacent if and only if they are not adjacent in . That is, to generate the complement of a ...
of the
transitive closure In mathematics, the transitive closure of a binary relation on a set is the smallest relation on that contains and is transitive. For finite sets, "smallest" can be taken in its usual sense, of having the fewest related pairs; for infinite s ...
As describes, the edges in \hat G represent , pairs of vertices that are not connected by a path Then, two vertices belong to the same weak component when either they belong to the same strongly connected component of G or As Graham, Knuth, and Motzkin prove, this condition defines an equivalence the same one defined above 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 Circuit Component may refer to: •Are devices that perform functions when they are connected in a circuit.   In engineering, science, and technology Generic systems * System components, an entity with discrete structure, such as an assem ...
in the underlying unconnected graph, for which Knuth suggests the alternative terminology


Properties

If X and Y are two weak components of a directed graph, then either all vertices in X can reach all vertices in Y by paths in the graph, or all vertices in Y can reach all vertices 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 X when all vertices in X can reach all vertices By definition, This is an
asymmetric relation In mathematics, an asymmetric relation is a binary relation R on a set X where for all a, b \in X, if a is related to b then b is ''not'' related to a. Formal definition A binary relation on X is any subset R of X \times X. Given a, b \in X, ...
(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 This ordering on the weak components can alternatively be interpreted as a
weak ordering 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 set ...
on the vertices themselves, with the property that when u in the weak ordering, there necessarily exists a path from u but not from v However, this is not a complete characterization of this weak ordering, because two vertices u and v could have this same reachability ordering while belonging to the same weak component as each Every weak component is a union of strongly connected If the strongly connected components of any given graph are contracted to single vertices, producing a
directed acyclic graph In mathematics, particularly graph theory, and computer science, a directed acyclic graph (DAG) is a directed graph with no directed cycles. That is, it consists of vertices and edges (also called ''arcs''), with each edge directed from one ve ...
(the 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


Algorithms

An
algorithm In mathematics and computer science, an algorithm () is a finite sequence of rigorous instructions, typically used to solve a class of specific Computational problem, problems or to perform a computation. Algorithms are used as specificat ...
for computing the weak components of a given directed graph in
linear time In computer science, the time complexity is the computational complexity that describes the amount of computer time it takes to run an algorithm. Time complexity is commonly estimated by counting the number of elementary operations performed by ...
was described by , and subsequently simplified by and As Tarjan observes,
Tarjan's strongly connected components algorithm 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 ...
based on
depth-first search Depth-first search (DFS) is an algorithm for traversing or searching tree or graph data structures. The algorithm starts at the root node (selecting some arbitrary node as the root node in the case of a graph) and explores as far as possible alon ...
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 In the mathematical field of graph theory, an induced subgraph of a graph is another graph, formed from a subset of the vertices of the graph and ''all'' of the edges (from the original graph) connecting pairs of vertices in that subset. Defini ...
. After all components are generated, this partition will describe the weak components of the whole It is convenient to maintain the current partition into weak components in a
stack Stack may refer to: Places * Stack Island, an island game reserve in Bass Strait, south-eastern Australia, in Tasmania’s Hunter Island Group * Blue Stack Mountains, in Co. Donegal, Ireland People * Stack (surname) (including a list of people ...
, with each weak component maintaining additionally a list of its , 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 Thus, the algorithm performs the following *Initialize an empty stack of weak components, each associated with a list of its source components. *Use Tarjan's strongly connected components algorithm to generate the strongly connected components of the given graph in the reverse of a topological order. When each strongly connected component S is generated, perform the following steps with it: **While the stack is non-empty and S has no edges to the top weak component of the stack, pop that component from the stack. **If the stack is still non-empty, and some sources of its top weak component are not hit by edges again pop that component from the stack. **Construct a new weak containing as sources S and all of the unhit sources from the top component that was popped, and push W onto the stack. Each test for whether any edges from S hit a weak component can be performed in constant time once we find an edge from S 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.


References

{{reflist, refs= {{citation , last1 = Graham , first1 = R. L. , author1-link = Ronald Graham , last2 = Knuth , first2 = D. E. , author2-link = Donald Knuth , last3 = Motzkin , first3 = T. S. , author3-link = Theodore Motzkin , doi = 10.1016/0012-365X(72)90057-X , journal =
Discrete Mathematics Discrete mathematics is the study of mathematical structures that can be considered "discrete" (in a way analogous to discrete variables, having a bijection with the set of natural numbers) rather than "continuous" (analogously to continuous f ...
, mr = 323577 , pages = 17–29 , title = Complements and transitive closures , url = https://mathweb.ucsd.edu/~fan/ron/papers/72_08_complements.pdf , volume = 2 , year = 1972
{{citation , last = Knuth , first = Donald E. , author-link = Donald Knuth , contribution = Weak components , date = January 15, 2022 , pages = 11–14 , title = The Art of Computer Programming, Volume 4, Pre-Fascicle 12A: Components and Traversal , url = https://cs.stanford.edu/~knuth/fasc12a+.pdf {{citation , last = Pacault , first = Jean François , doi = 10.1137/0203005 , journal =
SIAM Journal on Computing The ''SIAM Journal on Computing'' is a scientific journal focusing on the mathematical and formal aspects of computer science. It is published by the Society for Industrial and Applied Mathematics (SIAM). Although its official ISO abbreviation is ...
, mr = 376418 , pages = 56–61 , title = Computing the weak components of a directed graph , volume = 3 , year = 1974
{{citation , last = Tarjan , first = Robert Endre , author-link = Robert Tarjan , date = July 1974 , doi = 10.1016/0020-0190(74)90040-4 , issue = 1 , journal =
Information Processing Letters ''Information Processing Letters'' is a peer reviewed scientific journal in the field of computer science, published by Elsevier Elsevier () is a Dutch academic publishing company specializing in scientific, technical, and medical content. Its ...
, pages = 13–15 , title = A new algorithm for finding weak components , volume = 3
Graph connectivity Graph theory objects