introduction to the theory of computation fall semester, 2011-2012 school of information, renmin...

31
Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

Upload: jasmine-dean

Post on 31-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

Introduction to the Theory of Computation

Fall Semester, 2011-2012School of Information, Renmin University of China

Page 2: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

Contact Information

Instructor: Dr. Chunlai Zhou( 周春来 ) Email: [email protected] Office: 203A, Wing Building of Science Co

mplex, Tel: 62510042 Office hours: 2-5pm Tuesdays Meeting Time: 6-8:30pm Tuesdays

Page 3: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

Textbook Michael Sipser: Introduction to the Theory of Comp

utation, second edition, 2006Supplementary Readings:

J. Hopcroft, R. Motwani and J. Ullman, Introduction to Automata, Languages, and Computation, Third edition, China Machine Press, 2007

C. Baier and J. Katoen, Principles of Model Checking, 2008, MIT Press.

Page 4: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

Grading Biweekly Homework (totally 6, 20%) Take-home Midterm (20%) Final Exam (60%)

Suggestions: Preparation: Spend 30 minutes quickly looking

at what will be taught before class Review: Spend 2 hours reading carefully the

materials in Textbook after class

Page 5: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

Outline of the Course Automata Theory (7 weeks) With its application on Model Checking Computability Theory (3 weeks) Mid-term is in the 9th week Complexity Theory (7 weeks)

Prerequisites: Discrete Mathematics and basic knowledge of algorithms

Page 6: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

If you have taken this course before,

you can expect the following new materials: Application to Model Checking Connections to foundations of Mathematics Relations to Cryptography

Page 7: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

Goettingen and HER Mathematics

Ganseliesel: the landmark of Goettingen David Hilbert and

Men of Mathematics

Page 8: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

A Brief History: Hilbert’s Program Hilbert’s program (from wikipedia)① Axiomatization of all mathematics ② Completeness: all true mathematical statements c

an be proved in the formalism ③ Consistency: no contradiction can be obtained in t

he formalism of mathematics ④ Decidability: there should be an algorithm for deci

ding the truth or falsity of any mathematical statement

“We must know. We will know”.

Page 9: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

History: Godel’s Incomplete Theorems

Godel’s first incomplete Theorem no consistent system of axioms whose theorems ca

n be listed by an "effective procedure" (essentially, a computer program) is capable of proving all facts about the natural numbers.

However, in 1940’s Tarski showed that the first order theory of the real numbers with addition and multiplication is decidable. In this sense, number theory is more difficult than real analysis to computer scientists.

Page 10: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

Goedel’s proof Goedel numbering Primitive recursive function

Self-reference: Liar Paradox

))((# Bew

)),,(,(),1(

)(),0(

yyxhxgyxh

yfyh

Page 11: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

Goedel and Turing (1931-1936)

(1912-1954)Next year is the Turing year!

Page 12: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

History: Turing Machine (1936)

State

. . . . . .A B C A D

Infinite tape withsquares containingtape symbols chosenfrom a finite alphabet

Action: based onthe state and thetape symbol underthe head: changestate, rewrite thesymbol and move thehead one square.

Page 13: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

Other Models of Computation

Lambda Calculus (Church) Programming languages Recursion Theory (Kleene, Rosser) Computable Mathematics Combinatory Logic (Curry) Type Theory in Programming Languages

Page 14: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

Church and Kleene

Page 15: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

History: Church-Turing Thesis

Intuitive notion = Turing machineof algorithm of Algorithm

Page 16: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

History: Automata

Scott & Rabin: Finite Automata and their Decision Problems, 1959

Kleene: Regular languages In a nonderministic machine, several choices may exi

st for the next state at any point.

Page 17: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

A Simple Automata

Automatic Door as an automaton

closed Open

RearBothNeither

Front

Neither

FrontRear Both

closedclosedclosedclosedclosedclosed

Closedopen

Neither Front Rear Both

Closed Open Closed Closed Open Closed Open Open

Page 18: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

History: P and NP

Cook-Levin Theorem: SAT is NP-complete.

Classify into two kinds of problems:① Those that can be solved efficiently by

computers② Those that can be solved in principles, but in

practice take so much time that computers are useless for all but very small instances of the problem.

Page 19: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

Why Study Automata Theory Software for designing and checking the

behavior of digit circuits Software for verifying systems of all types that

have a finite number of distinct states, such as communication protocols or protocols for secure exchange of information.

Page 20: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

Why Study Computability Theory (1)

Halting Problem (Turing):

Given a description of a program, decide whether the program finishes running or will continue to run, and thereby run forever. This is equivalent to the problem of deciding, given a program and an input, whether the program will eventually halt when run with that input, or will run forever.

Page 21: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

Why Study Computability Theory (2)

Post Correspondence Problem

The Post correspondence problem is unsolvable by algorithms.

c

abc

a

ca

ab

a

ca

b,,,

ba

acc

a

ca

ab

abc,,

Page 22: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

Why Study Complexity Theory (P)

Kruskal Algorithm (Minimal spanning tree problem)

Page 23: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

Why Study Complexity Theory (NP)

Clique Problem

Page 24: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

Why Study Complexity Theory (Application)

Primality Testing and Cryptography There are a number of techniques based on RSA code

s that enhance computer security, for which the most common methods in use today rely on the assumption that it is hard to factor numbers, that is, given a composite number, to find its prime factors.

Shor’s algorithm and Quantum Computation

Page 25: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

Classical Theory

Algorithm

Decidability

Efficiency (P vs. NP)

decidable

efficient

inefficient

Page 26: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

Strings and Languages Alphabet: a finite set of symbols, A string over an alphabet is a finite sequence

of symbols from the alphabet Concatenation: Operations on strings A language is a set of strings.

21

11100010010111ss

Page 27: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

Boolean Logic Boolean operations: negation, conjunction (AND),

disjunction (OR)

Equivalent expressions

The distributive laws

110,000

101,111

)()()(

),()()(

RPQPRQP

RPQPRQP

)()(

)()(

QPQP

QPQP

Page 28: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

Proofs Usually a mathematical argument consists of

definitions, axioms, lemmas, theorems and corollaries

Types of proofs Proof by construction Chinese Remainder Theorem Proof by contradiction There exist infinitely many prime numbers. Proof by induction Integer Induction

2

)1(21

nnn

Page 29: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

Deductive Proofs

A deductive proof is a finite sequence of statements

satisfying the following condition:each statement is either ① a hypothesis or

② deducible from several previous statements according to one rule in a finite rule set.

nssss 321

Page 30: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

Structural Induction

Definition: An expression is defined inductively as follows:

1. Any number or letter is an expression2. If E and F are expressions, so are E+F.

E*F and (E).

Theorem: Every expression has an equal number of left and right parentheses.

Page 31: Introduction to the Theory of Computation Fall Semester, 2011-2012 School of Information, Renmin University of China

Welcome to Turing’s World