Third model of computation, Theory of Computation

Assignment Help:

Computer has a single LIFO stack containing ?xed precision unsigned integers (so each integer is subject to over?ow problems) but which has unbounded depth (so the stack itself never over?ows).

In your program you should limit yourself to accessing this with methods like push(i), top(), pop(), and a predicate like empty?(). These will push a value into the stack, return the value stored in the top of the stack (the most recent value pushed), discard the top of stack,
and test the stack for empty, respectively. Don't forget that you have no storage outside of the stack, so you need to work directly with the values in the stack-you can't pull a value out of the stack and assign it to some other variable. Similarly, while you can call input() as
often as you wish, the only way to store the value of the input is to push it directly into the stack (e.g., push(input())).

(a) Sketch an algorithm to recognize the language of strings of the form wcwr where w is any sequence of ‘a's and ‘b's and wr is exactly the same sequence of ‘a's and ‘b's in reverse order, so these are all palindromes over the alphabet {a, b, c} in which 'c' occurs only as the middle symbol. It includes strings like:

abbbcabbb aca ababacababa c

(In the last example there are no ‘a's or ‘b's, the "re?ected" string is empty.)

(b) What is your intuition about recognizing this language within the second model (i.e., using just a single counter)?

(c) What is your intuition about the possibility of recognizing the language of strings of the form wcw, where w is an arbitrary string of ‘a's and ‘b's? This is the set of strings made up of any sequence of ‘a's and ‘b's followed by a 'c' and then exactly the same sequence of ‘a's and ‘b's in exactly the same order; it's referred to as the (deterministic) copy language.


Related Discussions:- Third model of computation

Closure properties of recognizable languages, We got the class LT by taking...

We got the class LT by taking the class SL and closing it under Boolean operations. We have observed that LT ⊆ Recog, so certainly any Boolean combination of LT languages will also

Positiveness problem - decision problems, For example, the question of whet...

For example, the question of whether a given regular language is positive (does not include the empty string) is algorithmically decidable. "Positiveness Problem". Note that

Pushdown automator, draw pda for l={an,bm,an/m,n>=0} n is in superscript

draw pda for l={an,bm,an/m,n>=0} n is in superscript

Gastric juice, what are composition and its function of gastric juice

what are composition and its function of gastric juice

Computation of an automaton, The computation of an SL 2 automaton A = ( Σ,...

The computation of an SL 2 automaton A = ( Σ, T) on a string w is the maximal sequence of IDs in which each sequential pair of IDs is related by |- A and which starts with the in

Data retriving, i have research method project and i meef to make prposal w...

i have research method project and i meef to make prposal with topic. If this service here please help me

Equivalence of nfas and dfas, In general non-determinism, by introducing a ...

In general non-determinism, by introducing a degree of parallelism, may increase the accepting power of a model of computation. But if we subject NFAs to the same sort of analysis

Non deterministic finite state automaton, Automaton (NFA) (with ε-transitio...

Automaton (NFA) (with ε-transitions) is a 5-tuple: (Q,Σ, δ, q 0 , F i where Q, Σ, q 0 and F are as in a DFA and T ⊆ Q × Q × (Σ ∪ {ε}). We must also modify the de?nitions of th

Nfas with e-transitions, We now add an additional degree of non-determinism...

We now add an additional degree of non-determinism and allow transitions that can be taken independent of the input-ε-transitions. Here whenever the automaton is in state 1

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd