1.31k likes | 1.45k Vues
This course, led by Assoc. Prof. Dr. Brahim Hnich at Izmir University of Economics, delves into the fundamental concepts of the Theory of Computation. It covers critical topics such as Automata Theory, Computability Theory, and Complexity Theory, illustrating what can be computed and the efficiency of algorithms. Students will engage with key textbooks and participate in hands-on learning experiences aimed at enhancing mathematical reasoning and analytical skills necessary for advanced studies in computer science. Office hours are available for personalized support.
E N D
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics
Contact Info • Room 415 • Email: brahim.hnich@ieu.edu.tr • Office hours • Wednesdays: 14—16
Textbooks • The course lecture are based on the following books • Harry R. Lewis and C.H. Papadimitriou. "Elements of the Theory of Computation", ISBN 0-13-272741-2, Prentice Hall. (Available in library) • Michael Sipser. "Introduction to the Theory of Computation", ISBN 053494728X, PWS Publishing Company.
Textbooks • The course lecture are based on the following books • Michael R. Garey and David S. Johnson. “Computer and Intractability", ISBN 0-7167-1045-5, W.H. Freeman and Company. • C.H. Papadimitriou. “Computational Complexity", ISBN 0-201-53082-1, Addison-Wesley Publishing Company, Inc.
Grading and exams • Midterm Exam 40% • Final Exam : 60%
Programme • Part A: Preliminaries • Introduction • Mathematical Notations for Computations
Programme • Part B: Automata Theory • Finite State Automata • Context Free Grammars
Programme • Part C: Computability Theory • Turing Machines • Decidability and Undecidability
Programme • Part D: Complexity Theory • Time Complexity • Intractability
Programme • Part E: Summary and Concluding Remarks
Outline • Introduction to the course • Goal • Organization • Outline • Mathematical Notations for Computations
What is computation? • Definition: Processing of information based on a finite set of operations or rules
What is computation? • Paper and pencil Arithmetic • 99 - 8 = 91 • Calculators • Bar code scanner • Digital camera • Computer programs in C and Java • …
What do we want in a “theory” • Generality • Technology-independent • Abstraction: ignores inessential details • Precision • Mathematical, formal • Can prove theorems about computation • Positive: what can be computed • Negative: what cannot be computed
So you want to be a good computer scientist/ software engineer? • Learn the rules • Algorithms, data structures, … • Learn basic principles • Data abstraction, … • Understand which problems you can solve with computers and which you simply cannot • … and why!
So you want to be a good computer scientist/ software engineer? • Learn the rules • Algorithms, data structures, … • Learn basic principles • Data abstraction, … • Understand which problems you can solve efficiently with computers and which you cannot!
Course Overall Objective • Understand the fundamental capabilities and limitations of computers • Make a theory out of the idea of computation
Why study theory? • Pragmatic Reasons • Apply efficient algorithms to tractable problems • Avoid intractable or impossible problems • Learn to tell the difference
Why study theory? • Mathematical education • Automata Theory • Computability Theory • Complexity Theory
Why study theory? • Philosophy • What is computation? • What is provable?
The Good News • You only have to take this course once • Except those of you who will not pay attention to the lectures • At the end, you can say that you understand what computers are really about • Good for postgraduate and professional life
The Bad News • Theory course • Formal • Requires mathematics • Understanding Proofs • Analytical skills
The Bad News • Theory course • Formal • Requires mathematics • Understanding Proofs • Analytical skills But, we will try to make it fun because it is really interesting!
End of Introduction Next: Topics to be covered
Three major topics • What is a computer? • Automata Theory • What can (cannot) be computed? • Computability Theory • What can (cannot) be computed efficiently? • Complexity Theory
Three major topics • What is a computer? • Automata Theory • What can (cannot) be computed? • Computability Theory • What can (cannot) be computed efficiently? • Complexity Theory
Complexity Theory • Key notion: tractable vs. intractable problems
Complexity Theory • Key notion: tractable vs. intractable problems EASY HARD
Complexity Theory • A problem is a general question: • Description of parameters • Description of solution • E.g. • Input: Given a list of integers • Can you sort the list in ascending order?
Complexity Theory • An algorithm is a step-by-step procedure: • A recipe • A computer program • A mathematical object
Complexity Theory • We want the most efficient algorithm as a function of problem size: • Fastest (mostly) • Most economical with memory (sometimes)
Example: Traveling Salesman Problem • Given • A set of m cities • A set of inter-city distances • Find a permutation of cities which makes a tour of minimum length
Example: TSP instance a 9 10 5 c 6 3 b d 9 (not drawn to scale)
Example: TSP instance a 9 10 5 c 6 3 b d 9 A solution: The tour a,b,d,c,a has length 27
Problem Size • What is an appropriate measure of problem size? • m the number of nodes? • m(m+1)/2 distances?
Problem Encoding • Use an encoding of the problem • Alphabet of symbols • Strings: abcd//10/5/9//6/9//3
Measures • Problem size: length of the encoding • Time complexity: how long an algorithm takes, as a function of problem size
Time Complexity • What is tractable? • A function f(n) is O(g(n)) whenever f(n) ≤ c. g(n) for n > some constant
Time Complexity A polynomial-time algorithm is one whose time complexity is O(p(n)) for some polynomial p(n) e.g. O(n2)
Time Complexity An exponential-time algorithm is one whose time complexity cannot be bounded by a polynomial e.g. O(nlog n)
Tractability • Basic distinction • Polynomial time means tractable • Exponential time means intractable
Tractability Execution time
Effect of Speed-Ups Let us wait for faster hardware!
Back to TSP • Your boss says: • “Get me an efficient traveling-salesman algorithm, or else!” • What are you going to do?
Response • “Yes Ma’am, expect it this afternoon!”
Response • “Yes Ma’am, expect it this afternoon!” • Problem is • All known algorithms (essentially) check all possible paths • Exhaustive checking is exponential! • … so best of luck!