ArticleslgStudy

computer science

Decision-to-decision path

Decision-to-decision path is a computer 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 Decision-to-decision path rather than just read about it. In short: A decision-to-decision path, or DD-path, is a path of execution (usually through a flow graph representing a program, such as a flow chart) between two decisions. More recent versions of the concept also include the decisions themselves in their own DD-paths.

Decision-to-decision path — main illustration
Decision-to-decision path — illustration

Key takeaways

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

Reference excerpt

A decision-to-decision path, or DD-path, is a path of execution (usually through a flow graph representing a program, such as a flow chart) between two decisions. More recent versions of the concept also include the decisions themselves in their own DD-paths.

Definition In Huang's 1975 paper, a decision-to-decision path is defined as path in a program's flowchart such that all the following hold (quoting from the paper):

its first constituent edge emanates either from an entry node or a decision box; its last constituent edge terminates either at a decision box or at an exit node; and there are no decision boxes on the path except those at both ends Jorgensen's more recent textbooks restate it in terms of a program's flow graph (called a "program graph" in that textbook). First define some preliminary notions: chain and a maximal chain. A chain is defined as a path in which:

initial and terminal nodes are distinct, and all interior nodes have in-degree = 1 and out-degree = 1. A maximal chain is a chain that is not part of a bigger chain. A DD-path is a set of nodes in a program graph such that one of the following holds (quoting and keeping Jorgensen's numbering, with comments added in parentheses):

It consists of a single node with in-degree = 0 (initial node) It consists of a single node with out-degree = 0 (terminal node) It consists of a single node with in-degree ≥ 2 or out-degree ≥ 2 (decision/merge points) It consists of a single node with in-degree = 1 and out-degree = 1 It is a maximal chain of length ≥ 1. According to Jorgensen (2013), in Great Britain and ISTQB literature, the same notion is called linear code sequence and jump (LCSAJ).

Properties From the latter definition (of Jorgensen) we can conclude the following:

Every node on a flow graph of a program belongs to one DD-path. If the first node on a DD-path is traversed, then all other nodes on that path will also be traversed. The DD path graph is used to find independent path for testing. Every statement in the program has been executed at least once.

DD-path testing According to Jorgensen's 2013 textbook, DD-path testing is the best known code-based testing method, incorporated in numerous commercial tools. DD-path testing is also called C2 testing or branch coverage.

See also Basic block Basis path testing and its ancillary articles Cyclomatic complexity Essential complexity Code coverage White-box testing

References

External links https://www.eecs.yorku.ca/course_archive/2011-12/W/4313/slides/11-Paths.pdf

Illustrations

Decision-to-decision path: A flow graph of a program. Each color denotes a different DD-path. Nodes 1,2,5 and 6 are each in their own DD-path containing a single node. Nodes 3 and 4 together form one DD-path (they are a maximal chain).
A flow graph of a program. Each color denotes a different DD-path. Nodes 1,2,5 and 6 are each in their own DD-path containing a single node. Nodes 3 and 4 together form one DD-path (they are a maximal chain).

Worked examples

Example 1 — a first encounter with Decision-to-decision path

Start with the simplest possible case. Write down what Decision-to-decision path claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer 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 Decision-to-decision path 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 Decision-to-decision path 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 Decision-to-decision path

In research
Decision-to-decision path appears in computer 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 Decision-to-decision path 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
Decision-to-decision path is common in secondary-school and first-year university syllabi. It links to neighbouring topics Software engineering stubs, Software testing, so understanding it makes those chapters shorter.
In everyday life
Look for Decision-to-decision path 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 “Decision-to-decision path” →

How to study Decision-to-decision path in 20 minutes

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

Frequently asked questions

What is Decision-to-decision path in simple terms?

A decision-to-decision path, or DD-path, is a path of execution (usually through a flow graph representing a program, such as a flow chart) between two decisions. More recent versions of the concept also include the decisions themselves in their own DD-paths.

Why does Decision-to-decision path matter?

Because it connects several computer 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 Decision-to-decision path?

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 Decision-to-decision path.

Tags

  • Software engineering stubs
  • Software testing

Keep exploring