in Theory of Computation
1,578 views
2 votes
2 votes

Is the following two languages regular?

  1. L = { $w$ | the number of occurrences of $'01'$ in $w$ is equal to the number of occurrences of $'10'$}
  2. Late(L) = {$x\in \Sigma^*$ : for some $a\in \Sigma$, string $ax\in L$ where $L$ is regular}

(A) Only $I$        (B) Only $II$        (C) Both $I$ & $II$        (D) Neither $I$ nor $II$

in Theory of Computation
by
1.6k views

4 Comments

L contains a set of strings. Now as per definition in questions Late(L) contains the same set of strings except the first character being removed from all of them.
2
2
here L = Number of occurance of 01 and 10 which must be same where memory which is similar to $ WW^r$ so that 1st is non regular..

 

not understand Late(L)
0
0
First answer is intuitive- but problem of intuitiveness is it can be wrong. Here, first one is regular. There are only finite states needed- why? because the difference of the number of "01" and "10" in a string cannot be more than 1.

For second, let $L = \{a, aba, baaa\}$, now $LATE(L) = \{\epsilon, ba, aaa\}$. This also should be regular as we can make a DFA for this from DFA of L.
2
2
first is not regular bz here one comparison  required .  .......

 

i am not clear abt 2nd .explain abt it
0
0

1 Answer

4 votes
4 votes
Best answer

I.  is regular , all strings over {0,1} that start and ends with same symbol.

II. is also regular. we need to remove first symbol from stings accepted by L 

Design DFA for L, Move with one transition from start state, and the states we reach, say some Q,mark them as new start state, it seems we have more than one start states, then add a new state as start state and  connect it with these Q with null move. 

Example

L = { all strings over {0,1} those start with 00 }, having regular expression 00(0+1)* 

DFA for L

on giving symbols { 0,1} at start state we reach to q1 and q3, add new start state and connect it with q1 and q3 with ∊ moves.

After removing Null moves (∊-moves) , we have new DFA for Late(L)

having language Late(L) = { all strings over {0,1} those starts with 0 } having regular expression 0(0+1)*

selected by

4 Comments

Those strings reaching to non-final states will get rejected
1
1
What if  the occurence of 011 and 111 had to be same?Then in that case would L be a regular language??
0
0
Could you give any example for the same?
0
0

Related questions