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

COS3701 Assignment 3 memo 2024

Rating
2,0
(2)
Sold
31
Pages
6
Uploaded on
28-08-2024
Written in
2024/2025

COS3701 Assignment 3 memo 2024: Material to be tested: Cohen, Chapter 19, 21 - 25 Question 1 [10] Build/design a Turing machine (TM) that determines whether a given word contains at least one instance of the substring aab. If it does, then the TM should write a T on the tape after the input word. Question 2 [10] Build/design a TM that: · accepts all words that start with an a, and ends with a b, · loops forever on all words that start with a b, and · rejects all other words. Question 3 [10] Build a 2PDA that accepts the language {anb2nan+1bn | n > 0}. Question 4 [10] Build a Turing Machine that: · accept even number of as, · loops forever if start with b, and · rejects all other words. Question 5 [10] Convert the following TM into summary table and then into their code words in CWL. What is the language accepted by this TM.

Show more Read less









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

Document information

Uploaded on
August 28, 2024
Number of pages
6
Written in
2024/2025
Type
Other
Person
Unknown

Subjects

Content preview

COS3701 Assignment 3 memo 2024
Detailed complete explanation and everything that is needed


Crystal Indigo!
Crystal Indigo!
Providing all solutions you need anytime
+27 76 626 8187

, Question 1 Build/design a Turing machine (TM) that determines whether
a given word contains at least one instance of the substring aab. If it
does, then the TM should write a T on the tape after the input word

Explanation:
This TM checks whether a given word contains the substring "aab". If the substring is found, it
writes "T" on the tape after the input word.
• States and Transitions: The TM starts in an initial state, it start with either an "a" or "b". It
reads the input symbols one by one, looking for the sequence "aab". If it finds "a", it stays in
the current state; when it sees another "a", it might move to a new state. Upon seeing "b"
after two "a"s, it transitions to a state where it will write "T" after the word.
• Halting: The TM halts once it has written "T" on the tape, signaling that the substring was
found.




Question 2 Build/design a TM that:

· accepts all words that start with an a, and ends with a b,

· loops forever on all words that start with a b, and

· rejects all other words.

Explanation:
This TM accepts words that start with an "a" and end with a "b". It loops forever on words that start
with a "b" and rejects all other words.
• States and Transitions: For words starting with "a" and ending with "b", the TM transitions
through states that validate the sequence. If it encounters an invalid pattern, it either loops
(in case of starting with "b") or moves to a reject state.
• Looping: For words starting with "b", it keeps the TM in a loop without ever reaching a
halting state.

Reviews from verified buyers

Showing all 2 reviews
1 year ago

1 year ago

1 year ago

Hie, may we know the reason for this review so that we improve in the future

2,0

2 reviews

5
0
4
0
3
1
2
0
1
1
Trustworthy reviews on Stuvia

All reviews are made by real Stuvia users after verified purchases.

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.
CrystalIndigo University of South Africa (Unisa)
View profile
Follow You need to be logged in order to follow users or courses
Sold
486
Member since
5 year
Number of followers
226
Documents
73
Last sold
2 months ago
CrystalIndigo Solutions

providing all solutions to all computer science modules

4,1

51 reviews

5
27
4
13
3
6
2
1
1
4

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