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

ToC Assignment #1

This document contains an assignment for an advanced theory of computation course. It includes questions about set operations, functions, strings belonging to various languages, and instructions to download JFLAP, an automata simulation software, to complete future assignments. Specifically, it asks the student to: 1) Determine subsets, unions, and intersections of sets A and B. 2) Calculate the number of elements in the Cartesian product and power set of given sets. 3) Find the values of functions f and g given their domains and ranges. 4) Provide valid and invalid strings for 10 different languages over the alphabet {a,b}. 5) Download and install JFLAP to simulate automata and

Uploaded by

nazer
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views

ToC Assignment #1

This document contains an assignment for an advanced theory of computation course. It includes questions about set operations, functions, strings belonging to various languages, and instructions to download JFLAP, an automata simulation software, to complete future assignments. Specifically, it asks the student to: 1) Determine subsets, unions, and intersections of sets A and B. 2) Calculate the number of elements in the Cartesian product and power set of given sets. 3) Find the values of functions f and g given their domains and ranges. 4) Provide valid and invalid strings for 10 different languages over the alphabet {a,b}. 5) Download and install JFLAP to simulate automata and

Uploaded by

nazer
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

CS602-Advance Theory of Computation

Dr. Abdus Salam


Assignment # 1
_____________________________________________________________________________________
1. Let A = {x, y, z} and B = {x, y}.
a. Is A a subset of B?
b. Is B a subset of A?
c. What is A U B?
d. What is A ∩ B?
e. What is A x B?
f. What is the power set of B?
2. If A has a elements and B has b elements, how many elements are in A x B?

3. If C is a set with c elements, how many elements are in the power set of C?

4. Let X = {I, 2, 3, 4, 5} and Y = {6, 7, 8, 9, 10}. The unary function f: X → Y and the binary function g: X x Y
→ Y are described in the following tables.

n f(n) g 6 7 8 9 10
1 6 1 10 10 10 10 10
2 7 2 7 8 9 10 6
3 6 3 7 7 8 8 9
4 7 4 9 8 7 6 10
5 6 5 6 6 6 6 6
a. What is the value of f(2)?
b. What are the range and domain of f?
c. What is the value of g(2, 10)?
d. What are the range and domain of g?
e. What is the value of g( 4, f( 4))?
5. Give five (5) valid and five (5) invalid strings for the following languages.
a) L1 = {w {a, b}* : each a in w is immediately preceded and immediately followed by a b}.
b) L2 = {w  {a, b}* : w has abab as substring}.
c) L3 = {w {a, b}* : w has neither aa nor bb as a substring}.
d) L4 = {w  {a, b}* : w has an even number of substring ab}.
e) L5 = {w  {a, b}* : w has both ab & ba as substrings}.
f) L6 = {w  {a, b}* : w contains a’s and b’s and end in bb}.
g) L7 = {w {a, b}* : w contains different first and last letters. If word begins with a a, to be
accepted it must end with a b and vice versa}.
h) L8 = {w  {a, b}* : w starts with a and has odd number of a’s or starts with b and has even
number of b’s }.
i) L9 = {w  {a, b}* : w has three consecutive b’s (not necessarily at the end)}.
j) L10 = {w  {a, b}* : w contain odd number of a’s and b’s}

6. JFLAP is an application created especially for computer scientists and those who want to study various
computational problems. With this application you can to design and analyze various automata,
pushdown automata, multi-tape parsing, Turing machines, and several other types of grammars and
systems.
You are required to download and install JFLAP (or any other automata simulator) on your PCs. For all
future assignments you will be required to solve those exercises using JFLAP simulator.

You might also like