Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4,6 TrustPilot
logo-home
Other

COS2601 Assignment 4 marked memo 2024

Rating
-
Sold
7
Pages
26
Uploaded on
16-09-2024
Written in
2024/2025

COS2601 Assignment 4 marked memo 2024

Content preview

UNISA  2024  COS2601-24-Y  Assessments  Assessment 4

QUIZ




Started on Wednesday, 11 September 2024, 10:06 PM
State Finished
Completed on Sunday, 15 September 2024, 8:22 PM
Time taken 3 days 22 hours
Grade 19.00 out of 20.00 (95%)

,Question 1

Correct

Mark 1.00 out of 1.00




Consider the following FA with the regular expression r:




By applying Kleene’s theorem, an FA must be built for the regular expression r*. In the process a transition table is compiled.
We compile a suitable transition table by using the algorithm provided in Cohen page 129.




1.  From the discussion, it is clear that this option is the correct
New state Read an a Read an b
option
±z1 = w1 z2 z3

z2 = w1 z2 z3

z3 = w2 z2 +z4

+z4 = w1 or w3 +z4 +z5

+z5 = w1 or w2 or w3 +z4 +z5



2.
New state Read an a Read an b

z1 = w1 z1 z2

z2 = w2 z1 +z3

+z3 = w1 or w3 +z3 +z4

+z4 = w1 or w2 or w3 +z3 +z4



3.
New state Read an a Read an b

±z1 = w1 ±z1 z2

z2 = w2 ±z1 +z3

+z3 = w1 or w3 +z3 +z4

+z4 = w1 or w2 or w3 +z3 +z4



4.
New state Read an a Read an b

z1 = w1 z1 z2

z2 = w2 z1 +z3

+z3 = w3 +z3 +z3




Your answer is correct.

By applying Kleene’s theorem, an FA must be built for the regular expression r*. In the process, a transition table is compiled.
Which one of the following represents the correct transition table?

In state ±z1 = x1 we can read

, an a: we go to +x2 or (because +x2 is a final state) to x1; so we have x1 or +x2 = +z3 which is also a final state; or
a b: we go to x3 = z4.
In state z2 = x1 we can read

an a: we go to +x2 or (because +x2 is a final state) to x1; so we have x1 or +x2 = +z3 which is also a final state; or
a b: we go to x3 = z4.
In state z3 = x1 or +x2 we can read
an a: if in x1, we go to +x2 or (because +x2 is a final state) to x1; if in x2, we stay in +x2 or (because +x2 is a final state) to x1;
so together we have x1 or +x2 which is +z3; or
a b: if in x1, we go to x3; if in x2, we also go to x3; so together we have x3, which is z4.
In state z4 = x3 we can read
an a: we go to +x2 or (because +x2 is a final state) to x1; so together we have x1 or +x2 which is +z3; or
a b: we stay in x3, which is z4.

We provide the compiled table:

New state Read an a Read an b

±z1 = w1 z2 z3

z2 = w1 z2 z3

z3 = w2 z2 +z4

+z4 = w1 or w3 +z4 +z5

+z5 = w1 or w2 or w3 +z4 +z5




The correct answers are:


New state Read an a Read an b

±z1 = w1 z2 z3

z2 = w1 z2 z3

z3 = w2 z2 +z4

+z4 +z5
+z4 = w1 or w3
+z4 +z5
+z5 = w1 or w2 or w3
,




New state Read an a Read an b

z1 z2
z1 = w1
z1 +z3
z2 = w2

+z3 = w3 +z3 +z3

Document information

Uploaded on
September 16, 2024
Number of pages
26
Written in
2024/2025
Type
OTHER
Person
Unknown

Subjects

R119,33
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

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.
foxNotes Acsess Business Academy
View profile
Follow You need to be logged in order to follow users or courses
Sold
113
Member since
3 year
Number of followers
63
Documents
36
Last sold
3 weeks ago
saveNotes

5,0

5 reviews

5
5
4
0
3
0
2
0
1
0

Trending documents

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