You are on page 1of 2

 

FACULTY OF ENGINEERING, SCIENCES AND TECHNOLOGY  

Subject:  Formal Languages & Finite Theory of Automata    Marks:  
Instructor: Muhammad Faizan Tahir                      Assignment # 01 
Program: BS (CS)                                             
 

S.No.  Assignment  Coverage 


Q#1  Describe the given languages:   

L1 = {00,001,0011,00111,...,10,101,1011,10111,...} 
L2 = {a, aa, aba, aaa, abba, aaba, abaa, aaaa, …} 
L3 = {Ʌ, a, b, aa, ab, ba, bb} 
Q#2  Find the sample strings for each of the following languages:   

L1 = {w ∈ {0,1}∗ : the number of 0s in w equals the number of 1s in w} 
Hint: L1 can be read as: w is a word such that w contains any possible 
combination  of  0  and  1  including  null  value  (Kleene  star  closure 
property applied here) where the number of 0s is equal to the number 
of 1s. 
Sample Strings: {Ʌ, 01, 10, 1010, 0011, 1001, 1100, …} 
L2 = {w ∈ {0,1,2}∗ | w ∈ {0}∗ or w ∈ {1}∗ w ∈ {2}∗} 
L3 = {w: w is a binary string containing an odd number of 1s} 
L4 = {w ∈ {0,1}∗ |each block of 4 consecutive symbols contains at least 
two 0’s} 
L5 = {ayab ∈ {a,b}∗ | |y| = 3k, for some k ≥ 0} 
L6 = {anbman : n ≥ 0,m ≥ 0} 
L7 = {anbmcn+m : n ≥ 0,m ≥ 0} 
L8 = {w: w contains the substring 1101} 
L9 = {w: w has length at least 2 and does not end with 10}  
L10 = {w: w contains an even number of 0s and exactly two 1s} 
 

You might also like