Header Ads

  • Highlights

    👩🏻‍💻 Hello Readers 🧑🏻‍💻!!! Would you like to Explore more ? Hit on ⓘ(Ads)... ✨🌹

    What is Push Down Automata in TOC?


    A pushdown automaton is a machine that is capable of recognizing context-free grammar. They’re similar to automata with an additional element — a stack, which gives them more control over memory.

    PDA = Finite state machine + stack

    A pushdown automaton has three components −

    ·        an input tapes

    ·        a control unit

    ·        a stack with an infinite size

    The stack head scans the top symbol of the stack.

    A stack does two operations –   (1) Push      (2) POP

    Push − a new symbol is added at the top.

    Pop − the top symbol is read and removed.

    Formally, a pushdown automaton is defined as a 6-tuple:  (Q,Σ, Γ,δ,q0, F) , with the following variable definitions:

    Ø Q is a finite set of states

    Ø Σ is a finite alphabet—the input

    Ø Γ is a finite alphabet—the stack

    Ø δ is the transition functions, with the following composition:

    Q x Σ x Γ→P (Q x Γ)

    Ø q0 is the start state

    Ø F is the set of accepted states Q

    δ : PDA will read input symbol and stack symbol (top of the stack) and move to a new state and change the symbol of the stack.

    PDA is of two types:

    ·        Deterministic PDA (Going to only one state and pushing one element to TOS)

    ·        Non - deterministic PDA (Going to more than one states and print more than one element to TOS)

    Application:

    ·        For designing the parsing phase of a compiler (Syntax Analysis).

    ·        For implementation of stack applications.

    ·        For evaluating the arithmetic expressions.

    ·        For solving the Tower of Hanoi Problem.

    ·        Understand PDA with examples

     Also, Study about: 

    Also Read, some interview tips

    No comments

    Post Bottom Ad

    Powered by Blogger.