ArticleslgStudy

science

Reachability

Reachability is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Reachability rather than just read about it. In short: In graph theory, reachability refers to the ability to get from one vertex to another within a graph. A vertex s {\displaystyle s} can reach a vertex t {\displaystyle t} (and t {\displaystyle t} is reachable from s {\displaystyle s} ) if there exists a sequence of adjacent vertices (i.e. a walk) which starts with s {\displaystyle s} and ends with t {\displaystyle t} .

Reachability — main illustration
Reachability — illustration

Key takeaways

  • Reachability belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Reachability to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Reachability from memory before moving on to harder problems.

Reference excerpt

In graph theory, reachability refers to the ability to get from one vertex to another within a graph. A vertex s {\displaystyle s} can reach a vertex t {\displaystyle t} (and t {\displaystyle t} is reachable from s {\displaystyle s} ) if there exists a sequence of adjacent vertices (i.e. a walk) which starts with s {\displaystyle s} and ends with t {\displaystyle t} . In an undirected graph, reachability between all pairs of vertices can be determined by identifying the connected components of the graph. Any pair of vertices in such a graph can reach each other if and only if they belong to the same connected component; therefore, in such a graph, reachability is symmetric ( s {\displaystyle s} reaches t {\displaystyle t} iff t {\displaystyle t} reaches s {\displaystyle s} ). The connected components of an undirected graph can be identified in linear time. The remainder of this article focuses on the more difficult problem of determining pairwise reachability in a directed graph (which, incidentally, need not be symmetric).

Definition For a directed graph G = ( V , E ) {\displaystyle G=(V,E)} , with vertex set V {\displaystyle V} and edge set E {\displaystyle E} , the reachability relation of G {\displaystyle G} is the transitive closure of E {\displaystyle E} , which is to say the set of all ordered pairs ( s , t ) {\displaystyle (s,t)} of vertices in V {\displaystyle V} for which there exists a sequence of vertices v 0 = s , v 1 , v 2 , . . . , v k = t {\displaystyle v_{0}=s,v_{1},v_{2},...,v_{k}=t} such that the edge ( v i − 1 , v i ) {\displaystyle (v_{i-1},v_{i})} is in E {\displaystyle E} for all 1 ≤ i ≤ k {\displaystyle 1\leq i\leq k} . If G {\displaystyle G} is acyclic, then its reachability relation is a partial order; any partial order may be defined in this way, for instance as the reachability relation of its transitive reduction. A noteworthy consequence of this is that since partial orders are anti-symmetric, if s {\displaystyle s} can reach t {\displaystyle t} , then we know that t {\displaystyle t} cannot reach s {\displaystyle s} . Intuitively, if we could travel from s {\displaystyle s} to t {\displaystyle t} and back to s {\displaystyle s} , then G {\displaystyle G} would contain a cycle, contradicting that it is acyclic. If G {\displaystyle G} is directed but not acyclic (i.e. it contains at least one cycle), then its reachability relation will correspond to a preorder instead of a partial order.

Algorithms Algorithms for determining reachability fall into two classes: those that require preprocessing and those that do not. If you have only one (or a few) queries to make, it may be more efficient to forgo the use of more complex data structures and compute the reachability of the desired pair directly. This can be accomplished in linear time using algorithms such as breadth first search or iterative deepening depth-first search. If you will be making many queries, then a more sophisticated method may be used; the exact choice of method depends on the nature of the graph being analysed. In exchange for preprocessing time and some extra storage space, we can create a data structure which can then answer reachability queries on any pair of vertices in as low as O ( 1 ) {\displaystyle O(1)} time. Three different algorithms and data structures for three different, increasingly specialized situations are outlined below.

Floyd–Warshall Algorithm The Floyd–Warshall algorithm can be used to compute the transitive closure of any directed graph, which gives rise to the reachability relation as in the definition, above. The algorithm requires O ( | V | 3 ) {\displaystyle O(|V|^{3})} time and O ( | V | 2 ) {\displaystyle O(|V|^{2})} space in the worst case. This algorithm is not solely interested in reachability as it also computes the shortest path distance between all pairs of vertices. For graphs containing negative cycles, shortest paths may be undefined, but reachability between pairs can still be noted.

… excerpt ends here. Continue reading the full article.

Illustrations

Reachability: The same graph as above after Kameda's algorithm has run, showing the DFS labels for each verte
The same graph as above after Kameda's algorithm has run, showing the DFS labels for each verte

Worked examples

Example 1 — a first encounter with Reachability

Start with the simplest possible case. Write down what Reachability claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Reachability before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Reachability ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Reachability

In research
Reachability appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Reachability in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Reachability is common in secondary-school and first-year university syllabi. It links to neighbouring topics Graph connectivity, so understanding it makes those chapters shorter.
In everyday life
Look for Reachability outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Reachability in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Reachability means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Reachability out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Reachability in simple terms?

In graph theory, reachability refers to the ability to get from one vertex to another within a graph. A vertex s {\displaystyle s} can reach a vertex t {\displaystyle t} (and t {\displaystyle t} is reachable from s {\displaystyle s} ) if there exists a sequence of adjacent vertices (i.e. a walk) wh…

Why does Reachability matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Reachability?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Reachability.

Tags

  • Graph connectivity

Keep exploring