0% found this document useful (0 votes)
20 views3 pages

Fall 2024 - CS402 - 1 - SOL

This document outlines the assignment instructions for Theory of Automata (CS402) with a total of 20 marks. It emphasizes submission rules, acceptable formats, and the topics covered, including Regular Expressions, Finite Automata, and Transition Graphs. The document also includes specific questions related to these topics and their corresponding solutions.

Uploaded by

sa3876891
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)
20 views3 pages

Fall 2024 - CS402 - 1 - SOL

This document outlines the assignment instructions for Theory of Automata (CS402) with a total of 20 marks. It emphasizes submission rules, acceptable formats, and the topics covered, including Regular Expressions, Finite Automata, and Transition Graphs. The document also includes specific questions related to these topics and their corresponding solutions.

Uploaded by

sa3876891
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/ 3

Theory of Automata (CS402) Total marks = 20

Assignment # 01
Fall 2024 Deadline Date

Please carefully read the following instructions before attempting the


assignment.

RULES FOR MARKING


It should be clear that your assignment would not get any credit if:
 The assignment is submitted after the due date.
 The submitted assignment does not open or the file is corrupt.
 Strict action will be taken if the submitted solution is copied from any other
student or the internet.

You should consult the recommended books to clarify your concepts as


handouts are not sufficient.
You are supposed to submit your assignment in Doc or Docx format.
Any other formats like scan images, PDF, ZIP, RAR, PPT, BMP, etc. will not be
accepted.

Topic Covered:
The objective of this assignment is to assess the understanding of students about:
 Regular Expression (RE)
 Finite Automata (FA)
 Transition Graph (TG)
 Generalized Transition Graph (GTG)

NOTE
No assignment will be accepted after the due date via email in any case (whether
it is the case of load shedding or internet malfunctioning etc.). Hence refrain from
uploading assignments in the last hour of the deadline. It is recommended to
upload the solution file at least two days before its closing date.

If you people find any mistake or confusion in the assignment (Question


statement), please consult with your instructor before the deadline. After the
deadline, no queries will be entertained in this regard.
For any query, feel free to email at:
[email protected]
Questions No 01 Marks: 5+6 =
111=

a.
exact one b and can have any number of a’s (excluding none) before it, over the
Write the regular expression for language consists of all strings that ends and have

set of alphabets Σ={a,b}.

b. Draw the Finite Automaton for above language?

Solution:
a. a (a*) b
b.

Question No 2: Marks: 3+3+3=9


Consider the language L of strings, defined over ∑= {a, b}, Write the answers of the following:

a) If the regular expression is (𝑎𝑏)*, how many different strings of length 4 are in this
language?
b) If the regular expression is (𝑎∣𝑏)2, how many strings of length 2 can it generate?
c) If the regular expression is (𝑎𝑏∣𝑏𝑎)2, how many distinct strings of length 4 can be
generated?

Solution:

a) 1
( the only possible string of length 4 in this language is: abab. So, there is only 1
string of length 4 in the language L=(ab)∗.
(The 4 possible strings are: 𝑎𝑎 𝑎𝑏 𝑏𝑎 𝑏𝑏. So, the regular expression (𝑎∣𝑏)2 can
b) 4

generate 4 different strings of length 2.

c) 4

𝑎𝑏𝑏𝑎, 𝑏𝑎𝑎𝑏, 𝑏𝑎𝑏𝑎. So, the regular expression (ab∣ba)2 can


(The distinct strings generated by the regular expression (𝑎𝑏∣𝑏𝑎)2 are:𝑎𝑏𝑎𝑏,

generate 4 distinct strings of length 4.)

You might also like