Automata Theory Lecture 9 Slides
Automata Theory Lecture 9 Slides
Read/Write Head
Finite Control
State: q1
Source: Introduction to the theory of computation (3rd ed.), Michael, S. Boston, Cengage Learning. ISBN-13: 978-1133187790, (2012). Page 166, 169
Formal Definition of a Turing Machine
A Turing Machine is a 7-tuple (Q, ∑, Γ, δ
, q0, qaccept, qreject), where
i. Q is a finite set of states
ii. ∑ is the input alphabet – blank
symbol (∪) not included
iii. Γ is the tape alphabet - blank
symbol (∪) included
iv. δ: Q X Γ → Q X Γ X {L, R} is the
transition function
Formal Definition of a Turing Machine...
Finite Control
State: qi
Source: Introduction to the theory of computation (3rd ed.), Michael, S. Boston, Cengage Learning. ISBN-13: 978-1133187790, (2012). Page 166, 169
Example 1:
• Given a Turing machine M6, which recognizes the
language consisting of all strings of 0s whose
length is a power of 2.
• This machine decides the language:
A = {02n | n>=0}.
• Examples of strings in this language are:
✓ 20- 0
✓21- 00
✓22- 0000
✓23 -0000000
✓…2n
Formal Definition of the Turing Machine M6
The formal definition of M6 = (Q, ∑, Γ, δ, q1,
qaccept, qreject).
Where;
1) Q is a finite set of states (seven states in
this case)
• Q = {q1, q2, q3, q4, q5, qaccept, qreject};
Source: Introduction to the theory of computation (3rd ed.), Michael, S. Boston, Cengage Learning. ISBN-13: 978-1133187790, (2012). Page 172.
Formal Definition of the Turing Machine M6…
∪ xq3∪∪∪…
∪ q5x∪∪∪…
∪ q5∪x∪∪∪…
∪ q2x∪∪∪…
∪ x q2∪∪∪…
∪ x∪ qaccept
Source: Introduction to the theory of computation (3rd ed.), Michael, S. Boston, Cengage Learning. ISBN-13: 978-1133187790, (2012). Page 172.
• Show that the language 000 is not accepted by machine
M6 q1000∪∪∪…
∪q200∪∪∪…
∪ xq30∪∪∪…
∪x0q4∪∪∪…
Source: Introduction to the theory of computation (3rd ed.), Michael, S. Boston, Cengage Learning. ISBN-13: 978-1133187790, (2012). Page 172.
• Show that the language 0000 is accepted by machine M6
∪x q50x ∪∪∪… ∪ x q5 xx ∪∪∪…
q10000∪∪∪…
∪q2000∪∪∪… ∪ q5 x0x ∪∪∪… ∪ q5 xx x ∪∪∪…
Source: Introduction to the theory of computation (3rd ed.), Michael, S. Boston, Cengage Learning. ISBN-13: 978-1133187790, (2012). Page 172.
Question:
• Show whether the following strings are accepted or
rejected by the Turing Machine
i). 0
uq10uu…
uuq2uu…
uuuqaccept
Source: Introduction to the theory of computation (3rd ed.), Michael, S. Boston, Cengage Learning. ISBN-13: 978-1133187790, (2012). Page 172.
ii). 00000
uq100000uu…
uuq20000uu…
uuxq3000uu…
uux0q400uu…
uuxoxq30uu…
uux0x0q4uu…
uux0x0uqreject
Source: Introduction to the theory of computation (3rd ed.), Michael, S. Boston, Cengage Learning. ISBN-13: 978-1133187790, (2012). Page 172.
uq1000000uu…
uuq200000uu…
iii). 000000 uuxq30000uu…
uux0q4000uu…
uuxoxq300uu…
uux0x0q40uu…
uux0x0xq3uu…
uux0x0q5xuu…
uux0xq50xuu…
uux0q5x0xuu…
uuxq50x0xuu…
uuq5x0x0xuu…
uq5ux0x0xuu…
uuq2x0x0xuu…
uuxq20x0xuu…
uuxxq3x0xuu…
uuxxxq30xuu…
uuxxx0q4xuu…
uuxxx0xq4uu…
uuxxx0xuqreject
Source: Introduction to the theory of computation (3rd ed.), Michael, S. Boston, Cengage Learning. ISBN-13: 978-1133187790, (2012). Page 172.
Variants of Turing Machines: -
1) Multi-tape Turing Machine – Has
several tapes, each with its own head for
reading and writing
2) Enumerator – Has a printer attached to
it.
3) Non-Deterministic Turing Machine –
At any point, the machine may proceed
according to several possibilities
1. Multi-tape Turing Machine
• As the name suggests, a multi-tape Turing machine
has several tapes (k) for reading and writing
information, instead of only one.
δ:Q×Γ→P(Q×Γ×{L,R})
• Similar to the NFA, the computation of a non-
deterministic TM is a tree, where each branch is a
possible action.
• If any branch of the computation results in an accept
state, the machine accepts the input.
• In terms of powr, the Non-deterministic Turing
machines are not powerful than deterministic ones.
Equivalence with Other Models
• Researchers have proposed several models of
computation with time with all of them
exhibiting the characteristic of unrestricted
access to unlimited memory.
• Some of these models are similar to the Turing
machines, while others are different e.g. the
lambda calculus by Alonzo Church.
• This points at the fact that computational
power depends on the computer model in use.
• Whatever can be handled by a powerful super-
computer can also be handled by a basic
Turing machine.
Summary
• At the heart of every machine definition is
the transition Function
• Finite Automata can either be DFA or NFA.
• There are other extensions of Finite
Automata including the Push Down
Automata (PDA) and the Turing Machine
(TM) among others.
• Turing machines decide recursive
languages and recognize the recursively
enumerable languages.
References
• Rowan G. & John T., (2009), Discrete Mathematics:
Proofs, Structures and Applications, CRC Press, ISBN:
9781439812808.
• W. D. Wallis (2003), A Beginners Guide to Discrete
Mathematics, Springer Science & Business Media,
ISBN: 978-0817642693.
• Introduction to the theory of computation (3rd ed.),
Michael, S. Boston, Cengage Learning. ISBN-13: 978-
1133187790, (2012).
• Introduction to languages and the theory of
computation (3rd ed.), Martin, J., New York: McGraw-
Hill. ISBN-13: 978-0072322002, (2002)