Welcome to ECE 250 Algorithms and Data Structures

Download Report

Transcript Welcome to ECE 250 Algorithms and Data Structures

ECE 250 Algorithms and Data Structures
Theory of computation
Douglas Wilhelm Harder, M.Math. LEL
Department of Electrical and Computer Engineering
University of Waterloo
Waterloo, Ontario, Canada
ece.uwaterloo.ca
[email protected]
© 2006-2013 by Douglas Wilhelm Harder. Some rights reserved.
Theory of computation
2
Outline
This topic outlines the theory of computation
– Purpose
– Formal languages
– Classification of problems
• Computability theory
• Computational complexity theory
• Automata theory
Subsequent topics will look at individual problems
Theory of computation
3
Description
Given a problem, we solve it by using various operations combined
to create an algorithm
– What is our model of computation?
– How can we solve these problems?
– Which problems can we solve efficiently?
Theory of computation
4
Model of computation
A model of computation is a set of allowable operations together
with costs with respect to both time and space (memory)
The main model of computation throughout this course has been:
–
–
–
–
Arithmetic and logic instructions running in Q(1) time
variables (local, member and global) of built-in types use Q(1) memory
Arrays storing n entities occupy Q(n) memory
Control structures include:
• Looping statements
• Conditional statements
• Functions
Theory of computation
5
Model of computation
At a lower level, we have two more primitive machines:
– Register machines
• Instructions name registers for both the operands and results
– Stack machines
• A stack is used for evaluation
• Uses reverse-Polish instructions
Theory of computation
6
Formal languages
To be completed…
Theory of computation
7
Questions on computation
Questions we may have include:
– What is computable?
– Can computable problems be solved efficiently?
– How do computers behave?
Theory of computation
8
Computability theory
What problems are computable?
– Are there questions we can ask for which we cannot find answers?
We will look at:
– Turing machines
– The Turing-Church hypothesis
– The halting problem
Theory of computation
9
Computational complexity theory
The next question is what types of problems can be solved efficient?
– Deterministic and nondeterministic machines
– Time and space complexity
– The question of P = NP
Theory of computation
10
Automata theory
Finally, automata theory is the study of abstract machines
– Formal language theory
Applications include:
–
–
–
–
Parsing
Compiler design
Formal verification
Artificial intelligence
Theory of computation
11
Summary
The next few topics look at aspects of the theory of computation
– What is computable?
– What can be solved efficiently?
– How do we model machines?
Theory of computation
12
References
Wikipedia, http://en.wikipedia.org/wiki/Tree_(graph_theory)#forest
These slides are provided for the ECE 250 Algorithms and Data Structures course. The
material in it reflects Douglas W. Harder’s best judgment in light of the information available to
him at the time of preparation. Any reliance on these course slides by any party for any other
purpose are the responsibility of such parties. Douglas W. Harder accepts no responsibility for
damages, if any, suffered by any party as a result of decisions made or actions based on these
course slides for any other purpose than that for which it was intended.