Transcript 1
COSC 3340: Introduction to Theory of
Computation
Rakesh Verma
Computer Science Department
University of Houston
URL: www.cs.uh.edu/~rmverma
UofH - COSC 3340 - Dr. Verma
What is this course about?
Course is about models of computation, their
power, and relationships.
Hierarchy of models of increasing power:
DFA < PDA < TM.
For each model, we study:
–
–
What can be computed. (easier)
What cannot be computed. (harder)
UofH - COSC 3340 - Dr. Verma
Basic Definitions
(Reading Assignment: Chapter 0 of text)
1. Alphabet - a finite set of symbols.
–
–
Notation: .
Examples: Binary alphabet {0,1},
English alphabet {a,...,z,!,?,...}
2. String over an alphabet - a finite sequence of
symbols from .
–
–
Notation: (a) Letters u, v, w, x, y, and z denote strings.
(b) Convention: concatenate the symbols. No
parentheses or commas used.
Examples: 0000 is a string over the binary alphabet.
a!? is a string over the English alphabet.
UofH - COSC 3340 - Dr. Verma
Definitions (contd.)
3. Empty string: e or denotes the empty
sequence of symbols.
4. Language over alphabet - a set of strings
over .
–
–
Notation: L.
Examples:
{0, 00, 000, ...} is an "infinite" language over the binary
alphabet.
{a, b, c} is a "finite" language over the English alphabet.
UofH - COSC 3340 - Dr. Verma
Definitions (contd.)
5. Empty language - empty set of strings.
Notation: .
6. Binary operation on strings:
Concatenation of two strings u.v concatenate the symbols of u and v.
–
–
Notation: uv
Examples:
00.11 = 0011.
.u = u. = u for every u. (identity for concatenation)
UofH - COSC 3340 - Dr. Verma
Binary relations on strings
1.
Prefix - u is a prefix of v if there is a w such that
v = uw.
–
Examples:
2.
is a prefix of 0 since 0 = 0
apple is a prefix of appleton since appleton = apple.ton
Suffix - u is a suffix of v if there is a w such that
v = wu.
–
Examples:
0 is a suffix of 0 since 0 = ?
ton is a suffix of appleton since ?
UofH - COSC 3340 - Dr. Verma
Binary relations (contd.)
3.
Substring - u is a substring of v if there are
x and y such that v = xuy.
–
Examples:
let is a substring of appleton since appleton =
app.let.on
0 is a substring of 0 since 0 = epsilon.0.epsilon
Observe that prefix and suffix are special cases
of substring.
UofH - COSC 3340 - Dr. Verma
Relevance of strings and languages for
this course.
Consider decision problems. Decision problems
are problems with Yes/No answers.
Examples: (a) Is an array sorted?
(b) Is x in that array A?
Consider instances, I, of a decision problem D.
Example: For problem (a) an instance is just an
array.
UofH - COSC 3340 - Dr. Verma
Relevance (contd.)
We can encode instances of any problem by
strings.
Associate language with decision problem D
by taking all the strings that encode its yes
instances.
UofH - COSC 3340 - Dr. Verma
Applications of the Concepts
Are vast, and include:
–
–
–
Text processing (editors, etc.)
Compiler design
Verification through model checking
Real world examples are all around you and
not just on the desk!
UofH - COSC 3340 - Dr. Verma
New Developments
DNA Computing
Quantum Turing Machines
New Applications are being discovered as we
speak!
UofH - COSC 3340 - Dr. Verma
History of the Field
Check out:
URL:http://www.cs.aue.
auc.dk/~hicks/courses/c
omputabilityf2003/class-1.pdf
UofH - COSC 3340 - Dr. Verma