background preloader

Abstract Machines

Facebook Twitter

Pat of Chomsky's Hierarchy.

Finite State Machine

Chomsky Hierarchy. Type-3 Grammer. Formal Grammer. Regular Grammer. Nondeterministic Pushdown (Abstract Machine) Formal Grammer. Context-Free Grammer. Chomsky Hierarchy. Type-2 Grammer. Linear-bounded (Abstract Machine) Formal Grammer. Context-Sensitive Grammer's. Chomsky Hierarchy. Type-1 Grammer. Turing Machine. Formal Grammer. Unrestricted Grammer. Chomsky Hierarchy. Type-0 Grammer. Deterministic acyclic finite state automaton. The strings "tap", "taps", "top", and "tops" stored in a Trie (left) and a DAFSA (right), EOW stands for End-of-word.

Deterministic acyclic finite state automaton

A DAFSA is a special case of a finite state recognizer that takes the form of a directed acyclic graph with a single source vertex (a vertex with no incoming edges), in which each edge of the graph is labeled by a letter or symbol, and in which each vertex has at most one outgoing edge for each possible letter or symbol. The strings represented by the DAFSA are formed by the symbols on paths in the graph from the source vertex to any sink vertex (a vertex with no outgoing edges). In fact, a deterministic finite state automaton is acyclic if and only if it recognizes a finite set of strings.[1] Comparison to tries[edit] By allowing the same vertices to be reached by multiple paths, a DAFSA may use significantly fewer vertices than the strongly related trie data structure.

Aperiodic finite state automaton. Nested word. Formal definition[edit] To define nested words, we first need to define matching relation.

Nested word

As usual, for a nonnegative integer , we use the notation to denote the set , with the special case A matching relation ↝ of length is a subset of such that: all nesting edges are forward, that is, if i ↝ j then i<j;nesting edges never have a finite position in common, that is, for -∞ < i < ∞, there is at most one position h such that h ↝ i, and there is at most one position j such that i ↝ j; andnesting edges never cross, that is, we can't find i<i’≤j<j’ such that both i ↝ j and i’ ↝ j’.

Deterministic pushdown automaton. In automata theory, a deterministic pushdown automaton (DPDA or DPA) is a variation of the pushdown automaton .

Deterministic pushdown automaton

The DPDA accepts the deterministic context-free languages, a proper subset of context-free languages.[1] Machine transitions are based on the current state and input symbol, and also the current topmost symbol of the stack. Symbols lower in the stack are not visible and have no immediate effect. Machine actions include pushing, popping, or replacing the stack top. Embedded pushdown automaton. History and applications[edit] EPDAs were first described by K.

Embedded pushdown automaton

Vijay-Shanker in his 1988 doctoral thesis.[1] They have since been applied to more complete descriptions of classes of mildly context-sensitive grammars and have had important roles in refining the Chomsky hierarchy. Various subgrammars, such as the linear indexed grammar, can thus be defined.[2] EPDAs are also beginning to play an important role in natural language processing. While natural languages have traditionally been analyzed using context-free grammars (see transformational-generative grammar and computational linguistics), this model does not work well for languages with crossed dependencies, such as Dutch, situations for which an EPDA is well suited. Thread automaton. In automata theory, a thread automaton (plural: automata) is a finite-state automaton that can make use of a thread.[1] Thread automata are capable of recognizing a mildly context-sensitive language class above the tree-adjoining languages.[2] Formal definition[edit] A thread automaton consists of a set N of states,[note 1]a set Σ of terminal symbols,a start state AS ∈ N,a final state AF ∈ N,a set U of path components,a partial function δ: N → U⊥, where U⊥ = U ∪ {⊥} for ⊥ ∉ U,a finite set Θ of transitions.

Thread automaton

SWAP B →a C: consumes the input symbol a, and changes the state of the active thread: SWAP B →ε C: similar, but consumes no input: PUSH C: creates a new subthread, and suspends its parent thread: POP [B]C: ends the active thread, returning control to its parent: Nested stack automaton. A nested stack automaton has the same devices as a pushdown automaton, but has less restrictions for using them.

Nested stack automaton

A nested stack automaton is capable of recognizing an indexed language,[2] and in fact the class of indexed languages is exactly the class of languages accepted by one-way nondeterministic nested stack automata.[1][3] Nested stack automata should not be confused with embedded pushdown automata, which have less computational power. [citation needed] Formal definition[edit] Automaton[edit]

P (complexity) In computational complexity theory, P, also known as PTIME or DTIME(nO(1)), is one of the most fundamental complexity classes.

P (complexity)

It contains all decision problems that can be solved by a deterministic Turing machine using a polynomial amount of computation time, or polynomial time. Cobham's thesis holds that P is the class of computational problems that are "efficiently solvable" or "tractable"; in practice, some problems not known to be in P have practical solutions, and some that are in P do not, but this is a useful rule of thumb. A language L is in P if and only if there exists a deterministic Turing machine M, such that M runs for polynomial time on all inputsFor all x in L, M outputs 1For all x not in L, M outputs 0 P can also be viewed as a uniform family of boolean circuits.

Machine that always halts. In computability theory, a machine that always halts—also called a decider (Sipser, 1996) or a total Turing machine (Kozen, 1997)—is a Turing machine that halts for every input.

Machine that always halts

Because it always halts, the machine is able to decide whether a given string is a member of a formal language. The class of languages which can be decided by such machines is exactly the set of recursive languages. However, due to the Halting Problem, determining whether an arbitrary Turing machine halts on every input is itself an undecidable decision problem. Functions computable by total Turing machines[edit] In practice, many functions of interest are computable by machines that always halt. It is not required that the machine be entirely free of looping capabilities, however, to guarantee halting. We can further define a programming language in which we can ensure that even more sophisticated functions always halt. Relationship to partial Turing machines[edit]