• retagged by
8,571 views
29 29 votes

In the automaton below, $s$ is the start state and $t$ is the only final state.

Consider the strings $u = abbaba, v = bab, \text{and} w = aabb$. Which of the following statements is true?

  1. The automaton accepts $u$ and $v$ but not $w$
  2. The automaton accepts each of $u, v,$ and $w$
  3. The automaton rejects each of $u, v,$ and $w$
  4. The automaton accepts $u$ but rejects $v$ and $w$

5 Answers

Best answer
35 35 votes
$${\begin{array}{l|l|l|l}
\textbf{for u}&    \textbf{for v}&  \textbf{for w}  \\\hline   \delta(s,abbaba) & \delta(s,bab)   & \delta(s,aabb) \\\hline
\quad \vdash \delta(x,bbaba)  &\quad \vdash \delta(t,ab)    &\quad   \vdash \delta(x,abb)  \\\hline
\quad \vdash  \delta(x,baba)  &\quad \vdash \delta(t,b)  &\quad  \vdash \delta(s,bb) \\\hline
\quad \vdash \delta(x,aba) &\quad  \vdash \mathbf{s} - \textbf{rejected}  &\quad  \vdash \delta(t,b)  \\\hline
\quad \vdash \delta(s,ba)  &       &\quad  \vdash \mathbf{s} - \textbf{rejected}  \\\hline
\quad \vdash \delta(t,a)  &       & \\\hline
\quad \vdash \mathbf{t} - \textbf{accepted} &     &  \\\hline  \end{array}}$$Correct Answer: $D$
• edited by
1 1 vote

Only accepts u,it reject v bcoz its not ended in final state and language is not accepting srting w.

correct answer-D

correct me if im wrong. 

0 0 votes
Here only the string u is accepted as both v and w end up in non final states (just trace the path of the given string state by state you will see that they end up in non final states which means they're not accepted by the machine ie., not part of the language)
0 0 votes
  • Trace string $u = abbaba$:

    • $s \xrightarrow{a} q \xrightarrow{b} q \xrightarrow{b} q \xrightarrow{a} s \xrightarrow{b} t \xrightarrow{a} t$

    • Ends in state $t$ (Accepting state).

    • Result: $u$ is accepted.

  • Trace string $v = bab$:

    • $s \xrightarrow{b} t \xrightarrow{a} t \xrightarrow{b} s$

    • Ends in state $s$ (Non-accepting state).

    • Result: $v$ is rejected.

  • Trace string $w = aabb$:

    • $s \xrightarrow{a} q \xrightarrow{a} s \xrightarrow{b} t \xrightarrow{b} s$

    • Ends in state $s$ (Non-accepting state).

    • Result: $w$ is rejected.

Answer:
Position:
Show:

Related questions

48 48 votes
7 answers 7 answers
18.1k
18.1k views
Ishrat Jahan asked Oct 31, 2014
18,073 views
Let $L$ be a context-free language and $M$ a regular language. Then the language $L ∩ M$ isalways regularnever regularalways a deterministic context-free languagealways a...
41 41 votes
1 answers 1 answer
12.5k
12.5k views
Ishrat Jahan asked Oct 31, 2014
12,459 views
Which of the following statements about regular languages is NOT true ?Every language has a regular supersetEvery language has a regular subsetEvery subset of a regular l...
27 27 votes
3 answers 3 answers
6.8k
6.8k views
Ishrat Jahan asked Oct 31, 2014
6,770 views
In the context-free grammar below, $S$ is the start symbol, $a$ and $b$ are terminals, and $\epsilon$ denotes the empty string.$S \rightarrow aSa \mid bSb \mid a \mid b \...
65 65 votes
5 answers 5 answers
14.7k
14.7k views
Ishrat Jahan asked Oct 31, 2014
14,691 views
For a state machine with the following state diagram the expression for the next state $S^+$ in terms of the current state $S$ and the input variables $x$ and $y$ is$S^+ ...