Bhanu Priya has Published 1449 Articles

Construct a TM for adding 1 to a binary natural number?

Bhanu Priya

Bhanu Priya

Updated on 16-Jun-2021 12:18:10

1K+ 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 ... Read More

Construct a Turing machine for adding 2 to the binary natural number?

Bhanu Priya

Bhanu Priya

Updated on 16-Jun-2021 12:15:53

1K+ 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 ... Read More

How to use Turing machines to recognize languages in TOC?

Bhanu Priya

Bhanu Priya

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

1K+ 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 ... Read More

Draw a Turing machine to find 2’s complement of a binary number

Bhanu Priya

Bhanu Priya

Updated on 15-Jun-2021 15:33:34

8K+ Views

2’s complement of binary numbers can be done by using two approaches.Adding 1’s complement+1Traverse bits from left to right, find the 1st 1 bit then reverse all the bits after the 1 bit.ExampleLet the input be 1110010Thus, after performing 2’s complement, the output will be as follows −Output − 0001110Coming ... Read More

Draw a Turing machine to find 1’s complement of a binary number

Bhanu Priya

Bhanu Priya

Updated on 15-Jun-2021 15:24:58

5K+ Views

1’s complement means transforming the 0 bit to 1 and the 1 bit to 0.Let the input be −B00101110BThe output is as follows −B11010001BConceptThe concept is explained below −Step 1 − Start scanning the input from left to right.Step 2 − If the R/W is at 1, then make it ... Read More

Construct a TM for the language L= {ww : w ∈ {0,1}}

Bhanu Priya

Bhanu Priya

Updated on 15-Jun-2021 15:12:46

2K+ Views

ProblemThe language L = {ww | w ε {0, 1}} having the string of 0’s and 1’s which is followed by itselfL={00, 11, 1100, 0011, …..}SolutionThe logic for solving the problem is as follows −Find the midpoint of the string.Then match the symbols.ExplanationStep 1 − First, we need to find ... Read More

Construct PDA for accepting L = {anb(2n) | n>=1} U {anbn | n>=1}

Bhanu Priya

Bhanu Priya

Updated on 15-Jun-2021 15:07:47

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 ... Read More

Construct a DPDA for anb2n n ≥ 1 in TOC

Bhanu Priya

Bhanu Priya

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

25K+ 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 ... Read More

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

Bhanu Priya

Bhanu Priya

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

3K+ 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 ... Read More

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

Bhanu Priya

Bhanu Priya

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

8K+ 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 ... Read More

Advertisements