• edited by
9,262 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
56 56 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
18.1k
18.1k views
Kathleen asked Sep 14, 2014
18,056 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
10 answers 10 answers
16.3k
16.3k views
Kathleen asked Sep 14, 2014
16,299 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...
35 35 votes
5 5 answers
10.1k
10.1k views
Kathleen asked Sep 14, 2014
10,092 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. ...
14 14 votes
2 2 answers
4.5k
4.5k views
Kathleen asked Sep 14, 2014
4,456 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...