Found 690 Articles for Computer Science

Construct a DPDA for anb2n n ≥ 1 in TOC

Bhanu Priya
Updated on 15-Jun-2021 15:05:23

17K+ Views

A deterministic finite automata (DFA) can remember a finite amount of information but A push down automata (PDA) can remember an infinite amount of information.Basically a PDA is as follows −“Finite state machine+ a stack”PDA has three components, which is as follows −An Input tapeA control unitA Stack with infinite sizeA PDA can be formally described as seven tuples (Q, Σ, S, δ, q0, I, F)Q is finite number of statesΣ is input alphabetS is stack symbolΔ is the transition function: QX(Σ∪{e})XSXQq0 is the initial state (q0 belongs to Q)I is the initial state top symbolF is a set of ... Read More

Construct PDA for L = {0n1m2(n+m) | m,n >=1}

Bhanu Priya
Updated on 15-Jun-2021 15:03:33

2K+ Views

A push down automata (PDA) can be formally described as seven tuples(Q, Σ, S, δ, q0, I, F)Where, Q is finite number of statesΣ is input alphabetS is stack symbolΔ is the transition function: QX(Σ∪{e})XSXQq0 is the initial state (q0 belongs to Q)I is the initial state top symbolF is a set of accepting states(F belongs to Q)ProblemConstruct PDA for 0n1m2(n+m) where n, m>=1.SolutionSo, the strings which are generated by the given language are as follows −L={0122, 001222, 000112222, ….}That is to add the number of 0's and 1's, and that will equal the number of 2's.So for every 0's ... Read More

Construct a PDA for language L = {0n 1m2m3n | n>=1, m>=1}

Bhanu Priya
Updated on 15-Jun-2021 15:01:45

5K+ Views

A push down automata (PDA) can be formally described as seven tuples(Q, Σ, S, δ, q0, I, F)Where, Q is finite number of statesΣ is input alphabetS is stack symbolΔ is the transition function: QX(Σ∪{e})XSXQq0 is the initial state (q0 belongs to Q)I is the initial state top symbolF is a set of accepting states(F belongs to Q)ProblemConstruct PDA for 0n1m2m3n where n, m≥1.SolutionSo, the strings which are generated by the given language are −L={0123, 011223, 001233….}The number of 1’s and 3’s are same and number of 2’s and 1’s are sameConstruction of PDA for given problemThe PDA is as ... Read More

Construct DPDA for a(n+m)bmcn n,m≥1 in TOC

Bhanu Priya
Updated on 15-Jun-2021 15:00:03

778 Views

A push down automata (PDA) can be formally described as seven tuples(Q, Σ, S, δ, q0, I, F)Where, Q is finite number of statesΣ is input alphabetS is stack symbolΔ is the transition function: QX(Σ∪{e})XSXQq0 is the initial state (q0 belongs to Q)I is the initial state top symbolF is a set of accepting statesProblemConstruct PDA for a(n+m)bmcn n, m≥1.SolutionSo, the strings which are generated by the given language are −L={aabc, aaaabccc, aaaaabbccc, ….}That is to add the number of b's and c's, and that will equal the number of a's.For every b's and c's we will pop a's from ... Read More

How to use Turing machines to recognize languages in TOC?

Bhanu Priya
Updated on 16-Jun-2021 12:12:55

886 Views

A Turing machine (TM) can be formally described as seven tuples −(Q, X, ∑, δ, q0, B, F)Where, Q is a finite set of states.X is the tape alphabet.∑ is the input alphabet.δ is a transition function: 𝛿:QxX->QxXx{left shift, right shift}.q0 is the initial state.B is the blank symbol.F is the final state.A Turing machine T recognises a string x (over ∑) if and only when T starts in the initial position and x is written on the tape, T halts in a final state.T is said to recognize a language A, if x is recognised by T and if ... Read More

Explain the basic properties of the Turing machine?

Bhanu Priya
Updated on 15-Jun-2021 14:22:10

3K+ Views

Turing machines are more powerful than both finite automata (FA) and pushdown automata (PDA). They are as powerful as any computer we have ever built.The main improvements from PDAs in Turing machine are explained below −Infinite “all” accessible memory (in the form of a tape) – option to read and write to it.A read/write head can move to the left and to the right on the input tape (or don’t change a position).The TM works on an infinite tape divided into cells (infinite in both directions), each of which contains either a symbol from an alphabet or the blank symbol. ... Read More

Distinguish between DPDAs and NPDAs in TOC?

Bhanu Priya
Updated on 15-Jun-2021 14:18:46

5K+ Views

Similar to the finite automata (FA), push-down automata (PDA) can be either deterministic or non-deterministic.A deterministic push down automata (DPDA) never has a choice of the next step −It has the possible output for every combination of state, input character and stack character, as compared to the deterministic finite automata (DFA).We need to be careful about every combination of state and stack character. Only one of the transactions is allowed either for the empty symbol ∧ or for an input symbol. Or there can be no transaction at all.ExampleA non-deterministic push-down automaton (NPDA) can contain the following instructions, but a ... Read More

Design a push down automaton for L = {wwR | w ∈ {a, b}+}?

Bhanu Priya
Updated on 15-Jun-2021 13:40:41

6K+ Views

A pushdown automaton is used to implement a context-free grammar in the same way that we use a technique to design DFA for a regular grammar. A DFA work on a finite amount of information, where as a PDA works on an infinite amount of information.Generally, a pushdown automaton is −"Finite state machine" + "a stack"A pushdown automaton consist of three components −an input tape, a control unit, anda stack with infinite size.Now consider a problem that how to design push down automata for a given language −ProblemDesign a push down automaton which recognizes even length palindromes for L = ... Read More

What happens when a String is accepted or rejected by NPDA?

Bhanu Priya
Updated on 15-Jun-2021 13:25:44

223 Views

A string is accepted by an Non-deterministic Push down Automata (NPDA), if there is some path (i.e., sequence of instructions) from the start state to a final state that consumes all the letters of the string. Otherwise, the string is rejected by the NPDA.The language of an NPDA is the set of all strings that it accepts.An input string rejected by the NPDA under following conditions −If reading an input string finishes without reaching a final state.If for a current state/symbol on the stack/input symbol there is no transition.If it attempts to pop the empty stack.ExampleBuild an NPDA which recognises ... Read More

Explain non-deterministic push down automata in TOC?

Bhanu Priya
Updated on 15-Jun-2021 13:23:41

8K+ Views

The Non-deterministic Push down Automata (NPDAs) are like finite automata (FA), except they also have a stack memory where they can store an arbitrary amount of information.Read/write stack memory works as LIFO: Last In, First OutWhat can we do with a stack?The pop operation reads the top symbol and removes it from the stack, the push operation writes a designated symbol onto the top of the stack, e.g. push(X) means put X on top of the stack, the nop operation does nothing to the stack.The stack symbols are different from the “language” alphabet used on the input tape.We start with ... Read More

Advertisements