retagged by
5,032 views

2 Answers

Best answer
22 votes
22 votes

$L=\{a^n c b^{2n}\}$
$\quad=\{acbb,aacbbbb,aaacbbbbbb,\ldots\}$

Here, $\textbf{c}$ acts as center. Push $2$ $a$'s for each $\textbf{a}$  and after $\textbf{c}$ start popping an $\textbf{a}$ for each $\textbf{b}$. If stack is empty and string is finished we move to $q_2$ which is the acceptance state.

edited by
2 votes
2 votes

Two way to draw it

2 figure) For single  input a push two a's on stack for state 0 and when c comes then don't do anything and change the state to 1 now as b will come the then top of the stack will have a then pop the a's for b's ,so when stack becomes empty then on seeing the input Null we can accept it by changing state to 2 (final) state.

1 figure) by pushing a's then don't do anything as c comes and move to state to 1 now if b comes then top of stack has a, don't do anything for first b (move to state 2)then for second b pop  the a(move to state 3) repeat steps if there are more a's on the stack (as shown in figure,by moving from state 3 to state 2 ) otherwise accept it by moving from state 3 to 4.

Related questions

36 votes
36 votes
2 answers
1
Kathleen asked Sep 14, 2014
5,265 views
Construct DFA's for the following languages:$L=\left\{w \mid w \in \{a,b\}^*, \text{ w has baab as a substring } \right\}$$L=\left\{w \mid w \in \{a,b\}^*, \text{ w has ...
21 votes
21 votes
5 answers
2
7 votes
7 votes
3 answers
3
go_editor asked Feb 8, 2018
1,986 views
Consider a relation examinee (regno, name, score), where regno is the primary key to score is a real number.Write an SQL query to list the regno of examinees who have a s...