100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
COS2601 Assignment 4 marked memo 2024 $7.03   Add to cart

Other

COS2601 Assignment 4 marked memo 2024

 40 views  7 purchases
  • Course
  • Institution

COS2601 Assignment 4 marked memo 2024

Preview 3 out of 26  pages

  • September 16, 2024
  • 26
  • 2024/2025
  • Other
  • Unknown
avatar-seller
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

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller foxNotes. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $7.03. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

77764 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$7.03  7x  sold
  • (0)
  Add to cart