Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

CSI3104 – Introduction to Formal Languages

Assignment 4
Q0

Write your name and student number.

Q1 of 2
Construct Turing Machines

Design Turing Machines for the following languages:


The Turing Machines of this question don’t have an accept state or a reject state, instead, they
have a final state. Start your solution by explaining the algorithm and states of the Turing
machine (in English). Draw the transition graph and write the transition instructions for each
TM.

(Q1-a) Let Σ = {a, b}. Build a TM for the language L = {w ∶ ∣w∣ is a multiple of 4}. |w| is the
length of the string w, for example, |abab| = 4 or |bbbbaaaa| = 8

(Q1-b) Let Σ = {a, b}. Build a TM for the language that accepts all words with equal number of
a’s and b’s.

Q2 of 2

Did you answer Question 0?

You might also like