in Theory of Computation
2,260 views
3 votes
3 votes
input {0,1} Set of all strings that begin and end with either 0 or 1. What does this statement/line means and what would be the R.E for this?
in Theory of Computation
by
2.3k views

4 Comments

it means string begin and end with either 0 or 1 which means (0+1)^+

Strings like 0,1,00,01,10,11,000,111,001............... All these string are either begin and end with either 0 or 1.
1
1

@ Shubhanshu  You sure, bro!?

0
0
It means for input symbols {0,1} set of all string that begins and ends with either 0 or set of all string that begins and ends with 1.

R.E.:- $(\ 1 \ (0+1)^{*} \ 1 \ \ + \ \ 0 \ (0+1)^{*} \ 0 \ )$
1
1

@Shubhanshu Add it as answer, bro!

0
0

2 Answers

2 votes
2 votes

It means all the string that begin and end with same symbol, so the language generated will be 

{0,1,00,11,000........}.

The regular expression will be 

0(0+1)*0 + 1(0+1)*1

4 Comments

edited by

@LeenSharma @Rishabh Agrawal can 01 and 10 be a valid string? 

See this ques - https://gateoverflow.in/1307/gate2009-15 and see Arjun Sir's answer!

0
0

@rahul sharma 5 Sir, can you pitch in?

0
0
No,the question is all the string that begin and end with same symbol.

So 01 and 10 will be invalid.
0
0

see this - https://gateoverflow.in/1307/gate2009-15 and read Praveen Saini's Answer!

0
0
0 votes
0 votes

it resides 2 answers

1)  ( 0(0+1)*1 + 1 (0+1)* 0)

2)  ( 1(0+1)*1 + 0 (0+1)* 0)