in Theory of Computation retagged by
579 views
0 votes
0 votes
  • L1= aibic     (i>=0)
  • L2= abici     (i>=0)

What is L1 intersection L2 ?

in Theory of Computation retagged by
579 views

2 Answers

1 vote
1 vote

Given the languages, let us see what strings are generated

$L_1= a^ib^ic$ ($i >=0$)

It generates below strings

$\left \{c, abc, aabbc, aaabbbccc, aaaabbbbc \right \}$

Above are strings which begin with $a$'s followed by equal number of $b$'s and end with single $c$

$L_2= ab^ic^i$ ($i >=0$)

It generates below strings

$\left \{a, abc, abbcc, abbbccc, abbbbcccc \right \}$

Above are strings which begin with $a$ followed by $b$'s followed by equal number of $c$'s

So, the intersection of above languages would contain

only the string $\left \{abc \right \}$ as no other string is common between these languages

So, the language would be

$L= abc$
edited by
1 vote
1 vote

plz make me correct if i m wrong.........

4 Comments

edited by

a/c to me only abc will be the common string among both

L1=c,abc,aabbc,aaabbbc......no of a's and no of b's will be equal in each of the string

L2=a,abc,abbcc,abbbccc.....no of b's and no of c's will be equal here in every string 

now see in the above possiblities only abc is common among them.

how the string  abbc is common ?? In L2 no of b's and c's both should be same as well as in L1 no of a's and b's . so its not following both the condition .

correct  me with example if  i am wrong.

0
0
you are correct when n = 1 abc will come as only common string
1
1
Yes mam, you are very right. Thanks, I edited the answer !
1
1