0% found this document useful (0 votes)
277 views

Assignment 1

This document provides instructions for an assignment on automata theory. It contains 3 problems to list languages and determine cardinalities based on certain constraints. Problem 1 defines languages over the alphabet {a,b} of varying lengths and characteristics. Problem 2 defines languages over the alphabet {0,1,2} based on the sum of digits in strings. Problem 3 asks to write additional languages in set notation. Students are to provide the strings in each language in ascending order of length and state the cardinality for each part.

Uploaded by

Ali Hamza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
277 views

Assignment 1

This document provides instructions for an assignment on automata theory. It contains 3 problems to list languages and determine cardinalities based on certain constraints. Problem 1 defines languages over the alphabet {a,b} of varying lengths and characteristics. Problem 2 defines languages over the alphabet {0,1,2} based on the sum of digits in strings. Problem 3 asks to write additional languages in set notation. Students are to provide the strings in each language in ascending order of length and state the cardinality for each part.

Uploaded by

Ali Hamza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Theory of Automata

Assignment 1 --- Sections (A)

Due Date: 30st October in the Class

Give the strings of each language of the following problems in ascending order of word length and also
give the cardinalities of the languages.

Example: 𝐿 = {𝑤 𝑜𝑣𝑒𝑟 Σ = {a, b} | |𝑤| ≤ 3 }, list the members of L and what is the cardinality of L.

L = { Λ, a, b, aa, ab, ba, bb, aaa, aab, aba, abb, baa, bab, bba, bbb} Cardinality is 15.

Problem#1: Consider Σ = {a, b}

a. 𝐿1 = Σ0 ∪ Σ1 ∪ Σ2 ∪ Σ3 .
b. 𝐿2 = {𝑤 𝑜𝑣𝑒𝑟 Σ | |𝑤| > 2 𝑎𝑛𝑑 |𝑤| ≤ 5 𝑎𝑛𝑑 |𝑤| 𝑖𝑠 𝑜𝑑𝑑 }.
c. 𝐿3 = {𝑤 𝑜𝑣𝑒𝑟 Σ | |𝑤| > 2 𝑎𝑛𝑑 |𝑤| ≤ 5 𝑎𝑛𝑑 |𝑤| 𝑖𝑠 𝑒𝑣𝑒𝑛 }.
d. 𝐿4 = {𝑤 𝑜𝑣𝑒𝑟 Σ | |𝑤| > 2 𝑎𝑛𝑑 |𝑤| ≤ 5 }.
e. 𝐿5 = {𝑤 𝑜𝑣𝑒𝑟 Σ | |𝑤| > 2 𝑎𝑛𝑑 |𝑤| ≤ 5 𝑎𝑛𝑑 |𝑤| 𝑖𝑠 𝑜𝑑𝑑 𝑎𝑛𝑑 𝑤 𝑠𝑡𝑎𝑟𝑡𝑠 𝑤𝑖𝑡ℎ 𝑎 𝑎𝑛𝑑 𝑒𝑛𝑑𝑠 𝑎𝑡 𝑏 }.
f. 𝐿6 = {𝑤 𝑜𝑣𝑒𝑟 Σ | |𝑤| > 2 𝑎𝑛𝑑 |𝑤| ≤ 5, 𝑡ℎ𝑖𝑟𝑑 𝑐ℎ𝑎𝑟𝑐𝑡𝑒𝑟 𝑜𝑓 𝑤 𝑖𝑠 𝑏 }.
g. 𝐿2 ∩ 𝐿3 and |𝐿2 ∩ 𝐿3 | = ?
h. 𝐿2 ∩ 𝐿4 and |𝐿2 ∩ 𝐿4 | = ?
i. 𝐿3 ∩ 𝐿4 and |𝐿3 ∩ 𝐿4 | = ?
j. 𝐿2 − 𝐿4 𝑎𝑛𝑑 |𝐿2 − 𝐿4 | = ?
k. 𝐿3 − 𝐿4 𝑎𝑛𝑑 |𝐿3 − 𝐿4 | = ?

Problem#2: Consider Σ = {0, 1, 2}

a. 𝐿1 = {𝑠 𝑜𝑣𝑒𝑟 Σ | |𝑠| ≤ 4 𝑎𝑛𝑑 𝑠𝑢𝑚 𝑜𝑓 𝑑𝑖𝑔𝑖𝑡𝑠 𝑖𝑛 𝑠 𝑎𝑟𝑒 ≥ 5 𝑎𝑛𝑑 ≤ 10}


b. 𝐿2 = {𝑠 𝑜𝑣𝑒𝑟 Σ | |𝑠| ≤ 4 𝑎𝑛𝑑 𝑠𝑢𝑚 𝑜𝑓 𝑑𝑖𝑔𝑖𝑡𝑠 𝑖𝑛 𝑠 𝑖𝑠 𝑑𝑖𝑣𝑖𝑠𝑖𝑏𝑙𝑒 𝑏𝑦 2 }
c. 𝐿3 = {𝑠 𝑜𝑣𝑒𝑟 Σ | |𝑠| ≤ 4 𝑎𝑛𝑑 𝑠𝑢𝑚 𝑜𝑓 𝑑𝑖𝑔𝑖𝑡𝑠 𝑖𝑛 𝑠 𝑖𝑠 𝑑𝑖𝑣𝑖𝑠𝑖𝑏𝑙𝑒 𝑏𝑦 3 }
d. 𝐿4 = {𝑠 𝑜𝑣𝑒𝑟 Σ | |𝑠| ≤ 4 𝑎𝑛𝑑 𝑠𝑢𝑚 𝑜𝑓 𝑑𝑖𝑔𝑖𝑡𝑠 𝑖𝑛 𝑠 𝑖𝑠 𝑑𝑖𝑣𝑖𝑠𝑖𝑏𝑙𝑒 𝑏𝑦 2 𝑜𝑟 𝑑𝑖𝑣𝑖𝑠𝑖𝑏𝑙𝑒 𝑏𝑦 3 }
e. 𝐿5 = {𝑠 𝑜𝑣𝑒𝑟 Σ | |𝑠| ≤ 4 𝑎𝑛𝑑 𝑠𝑢𝑚 𝑜𝑓 𝑑𝑖𝑔𝑖𝑡𝑠 𝑖𝑛 𝑠 𝑖𝑠 𝑑𝑖𝑣𝑖𝑠𝑖𝑏𝑙𝑒 𝑏𝑦 2 𝑎𝑛𝑑 𝑑𝑖𝑣𝑖𝑠𝑖𝑏𝑙𝑒 𝑏𝑦 3 }
f. 𝐿6 = {𝑠 𝑜𝑣𝑒𝑟 Σ | |𝑠| ≤ 4 𝑎𝑛𝑑 𝑠𝑢𝑚 𝑜𝑓 𝑑𝑖𝑔𝑖𝑡𝑠 𝑖𝑛 𝑠 𝑖𝑠 𝑑𝑖𝑣𝑖𝑠𝑖𝑏𝑙𝑒 𝑏𝑦 2 𝑏𝑢𝑡 𝑛𝑜𝑡 𝑑𝑖𝑣𝑖𝑠𝑖𝑏𝑙𝑒 𝑏𝑦 3 }
g. 𝐿7 = {𝑠 𝑜𝑣𝑒𝑟 Σ | |𝑠| ≤ 4 𝑎𝑛𝑑 𝑠𝑢𝑚 𝑜𝑓 𝑑𝑖𝑔𝑖𝑡𝑠 𝑖𝑛 𝑠 𝑖𝑠 𝑑𝑖𝑣𝑖𝑠𝑖𝑏𝑙𝑒 𝑏𝑦 3 𝑏𝑢𝑡 𝑛𝑜𝑡 𝑑𝑖𝑣𝑖𝑠𝑖𝑏𝑙𝑒 𝑏𝑦 2 }
h. 𝐿8 = {𝑠 𝑜𝑣𝑒𝑟 Σ − {2} | |𝑠| ≤ 8 𝑎𝑛𝑑 𝑠𝑢𝑚 𝑜𝑓 𝑑𝑖𝑔𝑖𝑡𝑠 𝑖𝑛 𝑠 𝑖𝑠 𝑑𝑖𝑣𝑖𝑠𝑖𝑏𝑙𝑒 𝑏𝑦 3}
i. 𝐿9 = {𝑠 𝑜𝑣𝑒𝑟 Σ − {2} | |𝑠| ≤ 8 𝑎𝑛𝑑 𝑠𝑢𝑚 𝑜𝑓 𝑑𝑖𝑔𝑖𝑡𝑠 𝑖𝑛 𝑠 𝑖𝑠 𝑑𝑖𝑣𝑖𝑠𝑖𝑏𝑙𝑒 𝑏𝑦 2}
Problem#3: In each of the following parts, write the language in set modular form as written in problem
#1 and #2.

a. The language of all strings over {a, b} containing exactly two a’s.
b. The language of all strings over {a, b} containing at least two a’s.
c. The language of all strings over {a, b} that do not end with ab.
d. The language of all strings over {a, b} not containing the substring ab.
e. The language of all strings over {0, 1} in which number of 0’s are even and string length is odd.

You might also like