in Theory of Computation recategorized by
988 views
1 vote
1 vote

Which of the following statement is not correct?

  1. $a^nb^nc^m$ is not CFG
  2. $a^mb^nc^n$ is deterministic CFG
  3. $a^nb^n$ is CFG
  4. $a^{800}b^{800}c^{800}$ is CFG
in Theory of Computation recategorized by
988 views

9 Comments

@Applied CourseIf we were to draw DFA for option D, we will get 2400 states right ??

0
0
edited by
No. 2401. (like a^2 will require 2 + 1 = 3 state, a^3 will require 3 + 1 = 4 state . and so on)

since states are finite option d is correct as it is regular language. ( regular languages are also accepted by CFG.)

if option is like a^n b^n c^n  then it is CSL which would not been accepted by CFG.
0
0
we need 2401 states not 2400
1
1
For dead state??
0
0
we need 1 extra state for accepting. like for accepting aa we need 3 states.

state 1 -> a -> state 2 -> a -> accept state.
1
1
But what about a dead state??is it not required here??like after b ,a should not cone
0
0
2401 states for NFA and 2402 for DFA.
1
1
Cool....got it👍
0
0
we need to check whether language is regular or not so we can check it by making NFA or DFA.
0
0

1 Answer

1 vote
1 vote
(A) $\rightarrow a^n b^n c^m$  is not CFG. NOT correct. $a^n b^n c^m$ is accepted by one stack PDA and generated by CFG.
(B) $\rightarrow a^m b^n c^n$ is deterministic CFG (TRUE)(CORRECT). $a^m b^n c^n$ is accepted by one stack PDA and generated by CFG.
(C) $\rightarrow a^n b^n$ is CFG - TRUE. (CORRECT). $a^n b^n$ is accepted by one stack PDA and generated by CFG.
(D) $\rightarrow a^{800}b^{800} c^{800}$ is CFG - TRUE (CORRECT).

3 Comments

a^n b^n c^n  is csl right ? . in some questions statement d is false
0
0
a^n b^n c^n  is csl  if n can take any value. but if n value is specific like n =800. then it is regular.
0
0
got it thanks bro
0
0
Answer:

Related questions