Docsity

CS402 Assignment 02: Constructing Finite Automata and Regular Expressions, Assignments of Human-Computer Interaction Design

Toggle sidebar
bg1
Theory of Automata (CS402)
Assignment # 02
Spring 2021
Total marks = 20
Deadline 04 June,
2021
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 concern the recommended books to clarify your concepts as handouts are not
sufficient.
You are supposed to submit your assignment in Doc or Docxformat.
Any other formats like scan images, PDF, Zip, Rar, Ppt, and Bmp,etc will not be accepted.
Topic Covered:
The objective of this assignment is to assess the understanding of students about:
• The concept of languages
• Regular Expressions
• Transition Graphs
• Generalized Transition Graph
• Finite automata.
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:
Question No 1: Marks: 10
Let FA1:
And FA2:
pf3

Partial preview of the text

Download CS402 Assignment 02: Constructing Finite Automata and Regular Expressions and more Assignments Human-Computer Interaction Design in PDF only on Docsity!

Theory of Automata (CS402) Assignment # 02 Spring 2021 Total marks = 20 Deadline 04 June, 2021 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 concern the recommended books to clarify your concepts as handouts are not sufficient. You are supposed to submit your assignment in Doc or Docxformat. Any other formats like scan images, PDF, Zip, Rar, Ppt, and Bmp,etc will not be accepted. Topic Covered: The objective of this assignment is to assess the understanding of students about:
  • The concept of languages
  • Regular Expressions
  • Transition Graphs
  • Generalized Transition Graph
  • Finite automata. 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] Question No 1: Marks: 10 Let FA 1 : And FA 2 :

Construct an FA 3 defining the UNION of FA 1 and FA2. Also, write the regular expression for FA 3. Sol: Old state A B -X,1=z1 Y,2=z2 X,1=z +Y,2=z2 Y,2=z2 X,3=z +X,3=z3 Y,3=z4 X,3=z +Y,3=z4 Y,3=z4 X,3=z Fa3 a Diagram: b a b b a b R.E= a Question No 2: Marks: 10 Construct a regular expression and Transition Graph (TG) defining the following language over ∑={x,y}: All strings of x’s and y’s having y, x, and y as a subsequence. SOL: R.E= T.G= (x+y) (x+y) (x+y) (x+y) Y x y

Note: this file looks ok to me 100% if u find any error or mistake must correct at

yourself.Diagram khud bannein aur neat and clean work kre mean har chez saf

nazr aye arrow ka khyal rkhein k state ku lazmi touch kre….use paint or word for

diagram…

Concept:

question 2 (hum ne regular expression draw kya ha according to given expression

sub se pehle (x+y)* mean x aur y se banne waly sub string read kare ga and x ,y

also then y read kre ga then again (x+y)* x aur y se banne waly sub string read kre

ga then x read kre ga and x,y also then again (x+y)* x,y se banne waly sub string

read kre ga and x,y also then y read kre ga then (x+y)* x,y se banne waly string