Dovetailing (computer science)

Dovetailing (computer science)

Dovetailing in algorithm design, is a technique that interleaves different computations, performing them essentially simultaneously. Algorithms that use dovetailing are sometimes referred to as dovetailers.

Consider a tree that potentially contains a path of infinite length: if a depth-first search is performed in this environment, the search may move down an infinite path and never return, potentially leaving part of the tree unexplored. However, if a breadth-first search is used, the existence of an infinite path is no longer a problem: each node is visited in a branching manner according to its distance from the root, so an infinite path will only impact the part of the search travelling down that path.

We can regard this tree as analogous to a collection of programs; in this case, the depth-first approach corresponds to running one program at a time, moving to the next only when the current program has finished running. In the case where one of the programs runs for an infinite amount of time, this transition will never happen. The breadth-first approach of visiting each child on the same level of the tree corresponds to dovetailing, where a single step is performed for every program before moving to the next. Thus, progress is made in each program, regardless of the potential existence of a program of infinite runtime.

In the case of an infinite number of programs, all potentially infinitely long, neither the breadth-first nor depth-first would be sufficient to ensure progress on all programs. Instead, the following technique can be used: perform the first step of the first program; next, perform the first step of the second program and the second step of the first program; next, perform the first step of the third program, the second step of the second program, and the third step of the first program; and so on.

Etymology

  1. The term might have come from dovetail card shuffling.
  2. An analogy with the interleaving ends of a dovetail joint in woodworking.

See also

Recursive enumeration


Wikimedia Foundation. 2010.

Игры ⚽ Поможем решить контрольную работу

Look at other dictionaries:

  • Dovetail (disambiguation) — Dovetail may refer to: The dovetail joint used in woodworking The dovetail or riffle method of shuffling playing cards German equatorial mount, or dovetail plate, used to fix a telescope to its mount Dovetailing (computer science), a technique in …   Wikipedia

  • Chaitin's constant — In the computer science subfield of algorithmic information theory, a Chaitin constant or halting probability is a real number that informally represents the probability that a randomly constructed program will halt. These numbers are formed from …   Wikipedia

  • Recursively enumerable set — In computability theory, traditionally called recursion theory, a set S of natural numbers is called recursively enumerable, computably enumerable, semidecidable, provable or Turing recognizable if: There is an algorithm such that the set of… …   Wikipedia

  • Charles Radtke — (born 1964) is a studio furniture maker working in Cedarburg, Wisconsin.  His focus is design, rarely if ever repeating an object. His work is found primarily in private collections, with the exception of his Sarcophagus #1 residing in… …   Wikipedia

  • Intel — For other uses, see Intel (disambiguation). Coordinates: 37°23′16.54″N 121°57′48.74″W / 37.3879278°N 121.9635389°W / 37.3879278; 121.9 …   Wikipedia

  • Intel Corporation — Infobox Company company name = Intel Corporation company company type = Public (nasdaq|INTC, hkex|4335) slogan = Leap Ahead foundation = 1968 1 location = Santa Clara, California (incorporated in Delaware) USA key people = Paul S. Otellini, CEO… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”