This document provides an introduction to foundational concepts in computer science including Turing machines. It defines key terms like alphabet, string, formal language, deterministic finite automata, nondeterministic finite automata, regular expressions, and Turing machines. It also presents examples of each concept and shows how a Turing machine can recognize strings of a given length.
8. Formal Definition
● an alphabet
● a set of states
○ one denoted as a "starting state"
○ one or more denoted as "accepting states"
● a transition function
○ takes a symbol and a state and returns a new state
11. Formal Definition
● an alphabet
● a set of states
○ one denoted as a "starting state"
○ one or more denoted as "accepting states"
● a transition function
○ takes a symbol and a state and returns
zero or more states
18. Formal Definition (slightly simplified)
● two alphabets
○ one for reading, the input alphabet
○ one for writing, the output (or tape) alphabet
● a set of states
○ one starting state
○ one accepting state
○ one rejecting state
● a transition function
takes a symbol and a state and returns
a new state, a symbol to write, and Left or Right
19. Example TM
Let's call it M
It accepts strings whose length is a power of 2
Accepted strings: "0", "00", "0000"
Rejected strings: "", "000", "000000"
24. References
Deterministic finite automaton. (2012, March 11). Retrieved from http://en.wikipedia.
org/wiki/Deterministic_finite_automaton
Nondeterministic finite automaton. (2012, April 20). Retrieved from http://en.
wikipedia.org/wiki/Nondeterministic_finite_automaton
Petzold, C. (2008). The annotated turing. Indianapolis: Wiley Publishing, Inc.
Sipser, M. (2006). Introduction to the theory of computation. (2nd ed.). Boston:
Thompson Course Technology.
Turing machine. (2012, April 17). Retrieved from http://en.wikipedia.
org/wiki/Turing_machine