ArticleslgStudy

science

St-connectivity

St-connectivity 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 St-connectivity rather than just read about it. In short: In computer science, st-connectivity or STCON is a decision problem asking, for vertices s and t in a directed graph, if t is reachable from s. Formally, the decision problem is given by PATH = {⟨D, s, t⟩ | D is a directed graph with a path from vertex s to t}.

St-connectivity — main illustration
St-connectivity — illustration

Key takeaways

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

Reference excerpt

In computer science, st-connectivity or STCON is a decision problem asking, for vertices s and t in a directed graph, if t is reachable from s. Formally, the decision problem is given by

PATH = {⟨D, s, t⟩ | D is a directed graph with a path from vertex s to t}.

Complexity On a sequential computer, st-connectivity can easily be solved in linear time by either depth-first search or breadth-first search. The interest in this problem in computational complexity concerns its complexity with respect to more limited forms of computation. For instance, the complexity class of problems that can be solved by a non-deterministic Turing machine using only a logarithmic amount of memory is called NL. The st-connectivity problem can be shown to be in NL, as a non-deterministic Turing machine can guess the next node of the path, while the only information which has to be stored is the total length of the path and which node is currently under consideration. The algorithm terminates if either the target node t is reached, or the length of the path so far exceeds n, the number of nodes in the graph. The complement of st-connectivity, known as st-non-connectivity, is also in the class NL, since NL = coNL by the Immerman–Szelepcsényi theorem. In particular, the problem of st-connectivity is actually NL-complete, that is, every problem in the class NL is reducible to connectivity under a log-space reduction. This remains true for the stronger case of first-order reductions (Immerman 1999, p. 51). The log-space reduction from any language in NL to STCON proceeds as follows: Consider the non-deterministic log-space Turing machine M that accepts a language in NL. Since there is only logarithmic space on the work tape, all possible states of the Turing machine (where a state is the state of the internal finite state machine, the position of the head and the contents of the work tape) are polynomially many. Map all possible states of the deterministic log-space machine to vertices of a graph, and put an edge between u and v if the state v can be reached from u within one step of the non-deterministic machine. Now the problem of whether the machine accepts is the same as the problem of whether there exists a path from the start state to the accepting state. Savitch's theorem guarantees that the algorithm can be simulated in O(log2 n) deterministic space. The same problem for undirected graphs is called undirected s-t connectivity and was shown to be in L by Omer Reingold. This research won him the 2005 Grace Murray Hopper Award. Undirected st-connectivity was previously known to be complete for the class SL, so Reingold's work showed that SL is the same class as L. On alternating graphs, the problem is P-complete (Immerman 1999, p. 54).

References Sipser, Michael (2006), Introduction to the Theory of Computation, Thompson Course Technology, ISBN 0-534-95097-3 Immerman, Neil (1999), Descriptive Complexity, New York: Springer-Verlag, ISBN 0-387-98600-6

Illustrations

St-connectivity: There is a path directed from "s" to "t" in the first graph, but not in the second.
There is a path directed from "s" to "t" in the first graph, but not in the second.

Worked examples

Example 1 — a first encounter with St-connectivity

Start with the simplest possible case. Write down what St-connectivity 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 St-connectivity 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 St-connectivity 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 St-connectivity

In research
St-connectivity 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 St-connectivity 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
St-connectivity is common in secondary-school and first-year university syllabi. It links to neighbouring topics Directed graphs, Graph connectivity, NL-complete problems, so understanding it makes those chapters shorter.
In everyday life
Look for St-connectivity 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.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “St-connectivity” →

How to study St-connectivity in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what St-connectivity 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 St-connectivity out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is St-connectivity in simple terms?

In computer science, st-connectivity or STCON is a decision problem asking, for vertices s and t in a directed graph, if t is reachable from s. Formally, the decision problem is given by PATH = {⟨D, s, t⟩ | D is a directed graph with a path from vertex s to t}.

Why does St-connectivity 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 St-connectivity?

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 St-connectivity.

Tags

  • Directed graphs
  • Graph connectivity
  • NL-complete problems

Keep exploring