in Theory of Computation edited by
1,083 views
3 votes
3 votes

The regular expression denoting all the strings such that every even position occupied by ‘a’

  1. [a+ba]* (a+b+c)
  2. b(a)a* + a(a)*
  3. ba(b)* aa(b)* aa(b)* aa(a)*
  4. Both a and c
in Theory of Computation edited by
by
1.1k views

3 Answers

7 votes
7 votes
Best answer

Regular expression , such that every even position is occupied by a ==>

( ba + aa)* 

selected by
by

4 Comments

Option B accepts some languages only,

It does not accepts aaba, aababa ....

No option is matching ...
0
0
what are some invalid string here
0
0

( ba + aa)* (a+b+epsilon)      i think this should be the answer as the above answer cannot produce a string ending with b so i think this answer whould be more appropreate  correct me if wrong

0
0
1 vote
1 vote

Answer B

Condition is every even position must be a

  • A. (a+ba)* followed by (a+b+c)  can produce ab. // b at even position
  • C.bab* can generate babbbbbb........//b at even position

Only B follows the condition that only as will be present at even positions

by

4 Comments

Sorry @Akhil sir,

That was a mistake.

Regular expression a+b says L produce either a or b not both!!

In our case it can produce either a(a)*  or  b(a)a*  not both.

If the expression was (a(a)*+b(a)a*)*  we can loop over  both terms.

1
1

sh!va  question is asking all the string such that every even position occupied by 'a' .

The question specially mentions the word "all the string"

Things are either True, or False.It is not the case that one false thing can be more falsey than the other false thing.

1
1
@sh!va  thanks for the correction . between im not a sir.. im just a toddler in the world  GATE .
0
0
0 votes
0 votes

all option are wrong

Related questions