Question

In: Computer Science

Provide an informal description and state diagram of pushdown automata for the following languages, with the...

Provide an informal description and state diagram of pushdown automata for the following languages, with the alphabet {a, b}

A) {w | w = (a^i)(b^j) where i > j > 0}

B) {w | w contains an even number of b's}

C) {w | (a^k)bbb(a^k) where k >= 0}

D) {w | w=(b^k)a(b^k)(a^j)(b^j) where j, k >= 0}

Solutions

Expert Solution

Solution of A) : Push all a's onto stack and then pop one a for each b. If there is at least one a on stack then the string will be accepted.

Solution of B) : There has to be one b for each b. i.e when a comes as input symbol do not perform any operation and when b comes as input symbol, push it first time and pop it second time.

Solution of C) push all a's onto stack first. Then count 3 b's and then pop one a for each input symbol a.

Solution of D) : Initially push all b's onto stack. One a is seen as input symbol, start pop operation for each b as input string. pop one b for each input symbol b. Then count number of a's and number of b's using stack. If at the end there is no symbol on stack and no input symbol remains then accept the string.

If you have any doubts, you can ask in comment section.


Related Solutions

(a) How Context Free languages are different from Regular languages. (b) What are the automata accepting...
(a) How Context Free languages are different from Regular languages. (b) What are the automata accepting those languages and how they are different from DFA and NFA. (c) How the grammar of Context Free Languages looks different from those in Regular languages.
Automata Theory and Formal Languages Instructions: Draw the DFA (Deterministic Finite Automaton) of the following: DFA...
Automata Theory and Formal Languages Instructions: Draw the DFA (Deterministic Finite Automaton) of the following: DFA in which set of all strings can be accepted which end with ‘a’ DFA in which set of all strings can be accepted which start with ab DFA in which set of all strings can be accepted which contain ab DFA in which set of all strings can be accepted which ends with ab
Automata Theory and Formal Languages Instructions: Draw the DFA (Deterministic Finite Automaton) of the following: DFA...
Automata Theory and Formal Languages Instructions: Draw the DFA (Deterministic Finite Automaton) of the following: DFA for binary number divisible by 2 DFA for binary number divisible by 3 DFA in which set of all strings can be accepted which start with a DFA in which set of all strings can be accepted which contains ‘a’
Provide the complete valence bond description for C2H4 with a orbital diagram showing overlap
Provide the complete valence bond description for C2H4 with a orbital diagram showing overlap
1. (a) State if the sign in (+) or (-) for the following description.
  1.       (a) State if the sign in (+) or (-) for the following description.                       Q is (      ) if the test tube is getting hot.                         W is (      ) if the system is expanding.                         W is (      ) if the work is done by the surrounding on the system.                         H is (      ) if the reaction is endothermic.                         S is (      ) if solid sublimes.                         G is (      ) if the reaction is...
Description: In this assignment, you will implement a deterministic finite automata (DFA) using C++ programming language...
Description: In this assignment, you will implement a deterministic finite automata (DFA) using C++ programming language to extract all matching patterns (substrings) from a given input DNA sequence string. The alphabet for generating DNA sequences is {A, T, G, C}. Write a regular expression that represents all DNA strings that begin with ‘A’ and end with ‘T’. Note: assume empty string is not a valid string. Design a deterministic finite automaton to recognize the regular expression. Write a program which...
Diagram the classical pathway of complement activation. Include terminal pathway. Provide a brief description of major...
Diagram the classical pathway of complement activation. Include terminal pathway. Provide a brief description of major events at each step
Some languages support many modes of parameter passing. Provide 2 examples using two different programming languages...
Some languages support many modes of parameter passing. Provide 2 examples using two different programming languages which support the user of the programming language deciding which to use when creating their method. (Programming Languages)
Formal Languages Give a regular expression for each of the following languages: L2a = {w ?...
Formal Languages Give a regular expression for each of the following languages: L2a = {w ? {0,1}* | w corresponds to the binary encoding of non-negative integers that are evenly divisible by 4 L2b = {w ? {a,b}* | w contains at least one 'a' and exactly two b's} L2c = {w ? {0, 1, 2}* | w starts with a 2, ends with a 1 and contains an even number of 0's}.
(Description of graph: The following diagram shows the effects of tax increase on price and quantity...
(Description of graph: The following diagram shows the effects of tax increase on price and quantity of cigarettes. The initial equilibrium values before tax increase occurs at the equilibrium Quantity of 20 billion packs of cigarettes at the equilibrium price of $4.50. Assume the government increases the tax rate on cigarettes per pack, and this action of the government shifts the supply curve to the left. The new equilibrium values after tax increase are new equilibrium Quantity of 18 billion...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT