Introduction to the Theory of Computing
[cpsc421/intro]
Introduction to the Theory of Computing [cpsc421/intro]
Overview of the course
[cpsc421/overview]
Overview of the course [cpsc421/overview]
Broad categories of lectures:
Automata theory: How to parse languages?
- Ex. regex, DFAs and NFAs
Computability-theory: Can all software be verified?
- Ex. turing machines, undecidability
- Midterm Exam
Complexity theory: Do all problems have efficient algorithms?
- Ex. prime number factoring, traveling salesman problem
Communication-theory: How many bits must we send?
- Ex. ???
Why study models of computation?
[cpsc421/motivation]
Why study models of computation? [cpsc421/motivation]
- This helps us understand what is/isn’t possible.
- This helps us think about unconventional computing methods (brains, molecules, etc).
Class Logistics
[cpsc421/logistics]
Class Logistics [cpsc421/logistics]
Prerequisites
[cpsc421/prereqs]
Prerequisites [cpsc421/prereqs]
- Proofs, by induction especially
- CPSC 213 and 221 (kind of)
- Sets, graphs, discrete math, a little bit of linear algebra
Assignments
[cpsc421/assignments]
Assignments [cpsc421/assignments]
- Assignments available on Piazza
- Assignment #1 should take an hour
- In total: 10 assignments
- Typically hard, include bonus questions
- Groups of 2 allowed
- LaTeX, Gradescope
Main concepts of the course
[cpsc421/concepts]
Main concepts of the course [cpsc421/concepts]
Computational Problems. We want to understand things like: can I solve this problem? can I solve it fast?
- ex. Given a list, sort it.
- ex. Given an integer, find its prime factors.
- ex. Given a polynomial, find its roots.
Some Notation
[cpsc421/notation]
Some Notation [cpsc421/notation]
Representation: We’ll consider everything to be a string.
To first talk about strings, we need to define an alphabet.
Definition 1. Alphabet
[alphabet]
Definition 1. Alphabet [alphabet]
An alphabet is any finite non-empty set.
It is usually represented as or . Often , or , or .
Definition 3. Empty string
[empty-string]
Definition 3. Empty string [empty-string]
We often will talk about the empty string, so we have a special symbol for it: .
Definition 5. Language
[language]
Definition 5. Language [language]
A language is any set (including infinite sets) such that . Even is okay.
We’re often interested in a specific type of computational problem: decision problems.
Definition 7. decision problem
[decision-problem]
Definition 7. decision problem [decision-problem]
A decision problem is a computational problem with a Boolean / binary / n-ary output.
We can usually tweak computational problems to become decision problems: e.g. given , does have a prime factor that is ?
Important Idea: decision problems are equivalent to languages.
Example.
Let be a decision problem. Let be the set of all strings that maps to “Yes”.
and are complementary sets: no element is in both, and every element (of the overarching language) is in one or the other.
Example.
The decision problem is
Definition 8. Set builder notation
[set-builder]
Definition 8. Set builder notation [set-builder]
- reads as for all in such that is equal to “Yes”
Recap: Learning Goals
[cpsc421/intro-goals]
Recap: Learning Goals [cpsc421/intro-goals]
- Note
- This course and its slides were created for a MWF class, haven’t yet been adapted for TT
- What is the theory of computation about?
- What is a computational problem?
- What is computation?
Our definitions thus far: Alphabet, Computational problem, Decision problem, Finite Automaton (of DFA), Language-accepted-by, Regular Languages
Definitions: alphabet, string, computational problem, decision problem, language, Finite Automaton (of DFA), “Language Accepted By”, Regular Language