edited by
8,794 views
41 41 votes
  1. Construct as minimal finite state machine that accepts the language, over $\{0,1\}$, of all strings that contain neither the substring $00$ nor the substring $11$.
  2. Consider the grammar
    • $S \to aSAb $
    • $S \to \epsilon $
    • $A \to bA $
    • $ A \to \epsilon $

    where $S$, $A$ are non-terminal symbols with $S$ being the start symbol; $a, b$ are terminal symbols and $\epsilon$ is the empty string. This grammar generates strings of the form $a^ib^j$ for some $i, j \geq 0$, where $i$ and $j$ satisfy some condition. What is the condition on the values of $i$ and $j$?

2 Answers

Best answer
55 55 votes
  1. Language $L = (0+1)^*- (0+1)^*(00+11) (0+1)^*$
    $\textsf{DFA}$ contains $4$ states of which $3$ are final and $1$ is dead state.
  2. $i \leq j$
    as $S \rightarrow aSAb$ 
    There will be always one $a$ in left and minimum one $b$ in right and $A  \rightarrow bA \mid \epsilon$ can generate any number of $b\text{’}$s including null string. If $A$ is $\epsilon$ then $i=j$ and if $A$ is generating any $b,$ then $j>i$ so  condition is $i\leq j.$
edited by
2 2 votes
j>=i is the condition.solve using some examples there will never be a condition when # of a's would be greater than # of b's
Position:
Show:

Related questions

51 51 votes
8 answers 8 answers
17.2k
17.2k views
Kathleen asked Sep 14, 2014
17,182 views
A multiset is an unordered collection of elements where elements may repeat any number of times. The size of a multiset is the number of elements in it, counting repetiti...
51 51 votes
9 answers 9 answers
15.7k
15.7k views
Kathleen asked Sep 14, 2014
15,690 views
What can be said about a regular language $L$ over $\{ a \}$ whose minimal finite state automaton has two states?$L$ must be $\{a^n \mid n \ \text{ is odd}\}$$L$ must be...
34 34 votes
5 5 answers
9.5k
9.5k views
Kathleen asked Sep 14, 2014
9,491 views
A push down automation (pda) is given in the following extended notation of finite state diagram:The nodes denote the states while the edges denote the moves of the pda. ...
13 13 votes
2 2 answers
4.3k
4.3k views
Kathleen asked Sep 14, 2014
4,344 views
Consider a bank database with only one relation transaction (transno, acctno, date, amount)The amount attribute value is positive for deposits and negative for withdrawa...