You are on page 1of 1

Theory of Automata & Formal Languages

Assignment-01 (Spring 2023)

Submission should be in Handwritten Form


Due Date: Friday, April 07, 2023 in Class Timings

Task 1

Provide the language L of strings defined over ∑= {0, 1, 2} for the strings belonging to the
following languages: [w means a string of that language – string first position is 1]

At least in your language set add first 20 strings

a) All strings having zeros in multiples of three, but always having 2 either followed or
behind but not both
b) All strings that do not start with double zero.
c) All strings starting with zero have no consecutive 1’s or 2’s in them.
d) L1 = {w | w contains an even number of 0’s and odd number of 1’s}
e) L2 = {w | Every odd position of w is a 0 and for even no rule to follow}
f) L3 = {w | w contains the substring 11 an odd number of times, but no overlapping to be
counted}.

Task 2

Provide the language L of strings defined over


At least in your language set add first 15 strings
a) Language of odd length strings defined over ∑ = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}.
b) Language of valid integer numbers (as string) where integer number is divisible by 2
or 3 but not both defined over ∑ = {1, 3, 5, 6, 7, 0}.
c) Language of valid integer numbers (as string) where digit sum is always even defined
over ∑ = {1, 3, 5, 6, 7, 0}.
d) Language of valid binary numbers (as string) where it is divisible by 2 or 3 but not both
defined over ∑ = {0, 1}.
e) Language of Palindrome having odd length defined over ∑ = {a, b}.
f) Language defined over ∑ = {0, 1} having even number of 1’s.
g) Language defined over ∑ = {a, b, c} such that it contains all words in which ‘b’
occurs exactly once in a string.

Faculty of Information Technology


University of Central Punjab
Lahore, Pakistan

You might also like