Push down Automata Acceptance

Acceptance of Language by Push down Automata

Push down Automata accepts the language, which is called context free language.

Push down Automata Acceptance

Push down Automata = Finite Automata + Auxiliary Memory (Stack)

Auxiliary Memory helps Push down Automata to behave more powerful than finite state machine.

Push down automata with two stacks is much more powerful than push down automata with one stack, which means:

Push down automata = Finite Automata + 2 Stack // equivalent to a Turing machine.

Ways of Acceptance

The Push down Automata indicates its acceptance in following two ways:

  • Acceptance by final state
  • Acceptance by empty stack

These two methods are equivalent and we will prove it in this topic. They do not affect the language accepted by Push down Automata.

Acceptance by final state

Push down Automata P contains 7 elements (Q, ?, ?, ?, q0, Z0, F).

Q: It contains finite states of Push down Automata.

?: It contains set of input Symbols.

?: It contains stack alphabet that are allowed to add element push into the stack.

q0: It contains the initial state of the Push down automata. i.e. q0 ? Q.

Z: It is called the start symbol.

F: It contains final states of Push down automata.

?: It represents transition function.

A string w is accepted by the final state defined as:

L (P) = { w ? ?* | (q0, w, Z0 ) |-* (qf , ? , ? ) }

For some qf ? F and ? ? ?*.

Let L (P) is the language accepted by final state.

Example:

Construct a Push down Automata that accepts the following language by final state.

L = { 0n12n | n > 0 }

Solution:

The strings that can be derived from given language are of the form:

011, 001111, 000111111,……………..

Let PDA P = (Q, ?, ?, ?, q0, Z0, F) which recognize above given language.

Q = { q0, q1, q2, qf } represents finite states.

? = { 0, 1 } represents finite input symbols.

? = { 0, Z0 } represents tape states.

F = { qf } represents final state.

q0 is the initial state of Push down Automata.

 ? can be defined as:

R1: ? (q0, 0, Z0) = {(q0, 0Z0)}

R2: ? (q0, 0, 0) = {(q0, 00)}

R3: ? (q0, 1, 0) = {(q1, 0)}

R4: ? (q1, 1, 0) = {(q2, ?)}

R5: ? (q2, 1, 0)  = {(q1, 0 )}

R6: ? (q2, ?, 0) = {(qf, Z0)}

Acceptance by Empty stack

Push down Automata P contains 7 elements (Q, ?, ?, ?, q0, Z0, F).

Q: It contains finite states of Push down Automata.

?: It contains set of input Symbols.

?: It contains stack alphabet that are allowed to add element push into the stack.

q0: It contains the initial state of the Push down automata. i.e. q0 ? Q.

Z: It is called the start symbol.

F: It contains final states of Push down automata.

?: It represents transition function.

A string w is accepted by the empty stack or null stack is defined as:

N (P) = { w ? ?* | (q0, w, Z0 ) |-* (qf , ? , ? ) }

For some q ? Q.

N (P) is the language accepted by Push down Automata by empty stack.

Example:

Construct a Push down Automata that accepts the following language by empty stack.

L = { 0n12n | n > 0 }

Solution:

The strings that can be derived from given language are of the form:

011, 001111, 000111111, ……………..

Let PDA P = (Q, ?, ?, ?, q0, Z0, F) which recognize above given language

Q = { q0, q1, q2, qf } represents finite states.

? = { 0, 1 } represents finite input symbols.

? = { 0, Z0 } represents tape states.

F = { ? } represents tape state.

q0 is the initial state of Push down Automata.

 ? can be defined as:

R1: ? (q0, 0, Z0) = {(q0, 0Z0)}

R2: ? (q0, 0, 0) = {(q0, 00)}

R3: ? (q0, 1, 0) = {(q1, 0)}

R4: ? (q1, 1, 0) = {(q2, ?)}

R5: ? (q2, 1, 0)  = {(q1, 0 )}

R6: ? (q2, ?, 0) = {(qf, Z0)}

R7: ? (qf, ?, Z0) = {(qf, ?)}


Related Topics

Simplification of Context Free Grammar - Automata

Simplification of Context Free Grammar Context Free Grammar has recursive structure. The languages that are accepted with Context Free Grammar are called Context Free Languages. Context Free Grammar has one condition...

3 minutes read.

Conversion from Mealy Machine to Moore Machine

Conversion from Mealy Machine to Moore Machine In this topic, we will see different ways that are used for the conversion of Mealy Machine to Moore Machine. Moore Machine The output of Moore...

4 minutes read.

Derivation Tree of Context Free Grammar - Automata

Derivation Tree of Context Free Grammar Derivation tree gives a way to show how a string can be derived from context free grammar. It is also called as parse tree, production...

3 minutes read.

Automata Tutorial

What is Automata? Automata is a mathematical model and abstract model, which is used to detect string in various languages. In Automata, Regular language is recognized by Finite state AutomataContext Free language...

4 minutes read.

Conversion of DFA to Regular expression

Conversion of DFA to Regular expression To convert the DFA to Regular Expression (RE), we are going to use a method called converting DFA to regular expression by eliminating states. This...

3 minutes read.

Push down Automata Acceptance

Acceptance of Language by Push down Automata Push down Automata accepts the language, which is called context free language. Push down Automata = Finite Automata + Auxiliary Memory (Stack) Auxiliary Memory helps Push...

3 minutes read.

Automata Chomsky Hierarchy

Chomsky Hierarchy Formal languages: A language with precise syntax and semantics are called formal languages. Noam Chomsky has defined the Chomsky hierarchy in 1956. He is an American scientist and philosopher, and...

3 minutes read.

Pumping Lemma for Context Free Languages

Pumping Lemma for Context Free Languages The Pumping Lemma is made up of two words, in which, the word pumping is used to generate many input strings by pushing the symbol...

3 minutes read.

What is Automata Theory?

What is Automata Theory? Automata theory is used to study the abstract machine and automata (the self-acting machine).  Abstract machine is a theoretical model of a computer used in Automata theory. Automata...

4 minutes read.

Context Free Grammar - Automata

Context Free Grammar Grammar defines a set of rules, and with the help of these rules valid sentences in a language are constructed. A grammar consists of collection of substitution rules,...

3 minutes read.

Conversion from NFA to DFA

Conversion from NFA to DFA A Non-deterministic Finite Automata (NFA) is a finite state machine, in which, the move from one state to another is not fully deterministic, i.e., for a...

4 minutes read.

Non-deterministic Turing Machine - Automata

A non-deterministic Turing machine (NTM) is a theoretical machine used in computability theory to study the extent to which a machine can "guess" at a solution and yet still be...

4 minutes read.

Finite Automata with Output

Finite Automata with Output The Finite State machine is similar to Finite Automata, except that it has the additional capacity of producing output. Finite State machine = Finite Automata + Output Capabilities Types...

3 minutes read.

Minimization of Finite Automata

Minimization of Finite Automata The term minimization refers to the construction of finite automata with a minimum number of states, which is equivalent to the given finite automata. The number of...

4 minutes read.

Automata Regular Expressions

Regular Expressions Regular expressions are also referred as rational expressions, which are used to describe the algebraic description of regular languages. It is generally a sequence of characters that is used...

3 minutes read.

Ambiguity in Context Free Grammar - Automata

Ambiguity in Context Free Grammar? Context Free Grammar Context Free Grammar has one condition for production rules, which is, on the left-hand side of each rule, there must be only single variable,...

4 minutes read.

Automata Greibach Normal Form

Greibach Normal Form In Greibach Normal Form, there is restriction on the position, in which, terminals and variables can appear on right-hand side of production rules. In Greibach Normal Form, every...

4 minutes read.

Converting Finite Automata to Regular Expression using Arden’s Theorem

Converting Finite Automata to Regular Expression using Arden’s Theorem The Arden’s Theorem can be applied to find the regular expression recognized by the given transition diagram. This theorem can be applied...

4 minutes read.

Finite Automata

Finite Automata Finite state Automata or Finite State Machine is the simplest model used in Automata. Finite state automata accepts regular language. In this, the term finite means it has a...

4 minutes read.

Pumping Lemma for Regular Languages - Automata

Pumping Lemma for Regular Languages The language accepted by the finite automata is called Regular Language. If we are given a language L and asked whether it is regular or not?...

4 minutes read.