100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Other

cos2601 assignment 3 semester 1/2, 2021

Rating
-
Sold
3
Pages
11
Uploaded on
07-07-2021
Written in
2020/2021

This document contains solution and detailed explanation of COS2601 assignment 3, 2021










Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
July 7, 2021
Number of pages
11
Written in
2020/2021
Type
Other
Person
Unknown

Subjects

Content preview

COS2601 Assignment 03
Semester 1/2 2021

, Question 1
Kleene’s theorem can be used to turn a transition graph (TG) into a regular expression. Which one of the
following regular expressions would generate a language that would be equivalent to the language
described by the following TG?




1. aab*a + bba*
2. (aa + bb)(b + a)*a
3. aabb(a + b)*a
4. (bba*)* + (aab*a)* + ba

Answer: Option 1

Discussion
The b-loop at x2 can be written as b* and the a-loop at x4 as a*.
One path from start to final state (x1 to x3) is thus: aab*a.
The second path from start to final state (x1 to x4) is thus: bba*.
The ba-edge from x1 to x5 can be ignored as it does not lead to a final state.

It is now simply a matter of combining these parts of the regular expression to get
to aab*a + bba*
From this, it is clear that option 1 is the correct option.

The other options misinterpret the paths to final states, often incorrectly concatenating paths.

Question 2
Given FA1 (with regular expression r1) and FA2 (with regular expression r2), a transition table is being put
together to build an FA for r1 + r2.

New state Read an a Read an b
-z1 +z2 z3
+z2

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
reagantarbots-hepomarlpayne University of South Africa (Unisa)
View profile
Follow You need to be logged in order to follow users or courses
Sold
86
Member since
5 year
Number of followers
73
Documents
1
Last sold
1 year ago

3,5

10 reviews

5
1
4
4
3
4
2
1
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions