Theory-of-Computation
May 4, 2024
Question 8822 – Algorithms
May 4, 2024
Theory-of-Computation
May 4, 2024
Question 8822 – Algorithms
May 4, 2024

Theory-of-Computation

Question 25

Given the language L ={ab,aa,baa}, which of the following strings are in L *?

    1) abaabaaabaa
    2) aaaabaaaa
    3) baaaaabaaaab
    4) baaaaabaa
A
1, 2 and 3
B
2, 3 and 4
C
1, 2 and 4
D
1, 3 and 4
Question 25 Explanation: 
L* will contain all those strings which can be obtained by any combination (and repetition) of the strings in language i,e, from L= {ab, aa, baa}
String 1: abaabaaabaa : ab aa baa ab aa
String 2: aaaabaaaa : aa aa baa aa
String 3: baaaaabaaaab: baa aa ab aa aa b, because of the last “b” the string cannot belong to L*.
String 4: baaaaabaa : baa aa ab aa

Correct Answer: C
Question 25 Explanation: 
L* will contain all those strings which can be obtained by any combination (and repetition) of the strings in language i,e, from L= {ab, aa, baa}
String 1: abaabaaabaa : ab aa baa ab aa
String 2: aaaabaaaa : aa aa baa aa
String 3: baaaaabaaaab: baa aa ab aa aa b, because of the last “b” the string cannot belong to L*.
String 4: baaaaabaa : baa aa ab aa

Leave a Reply

Your email address will not be published. Required fields are marked *