Theory of Computational Complexity TA : Junichi Teruyama Iwama lab. D3

Slides:



Advertisements
Similar presentations
Measuring Time Complexity
Advertisements

Turing Machines Memory = an infinitely long tape Persistent storage A read/write tape head that can move around the tape Initially, the tape contains only.
Variants of Turing machines
1 Nondeterministic Space is Closed Under Complement Presented by Jing Zhang and Yingbo Wang Theory of Computation II Professor: Geoffrey Smith.
THE CHURCH-TURING T H E S I S “ TURING MACHINES” Pages COMPUTABILITY THEORY.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
The Big Picture Chapter 3. We want to examine a given computational problem and see how difficult it is. Then we need to compare problems Problems appear.
The class NP Section 7.3 Giorgi Japaridze Theory of Computability.
Foundations of (Theoretical) Computer Science Chapter 3 Lecture Notes (Section 3.2: Variants of Turing Machines) David Martin With.
The diagonalization method The halting problem is undecidable Decidability.
Applied Computer Science II Chapter 3 : Turing Machines Prof. Dr. Luc De Raedt Institut für Informatik Albert-Ludwigs Universität Freiburg Germany.
Measuring Time Complexity Sipser 7.1 (pages )
P and NP Sipser (pages ). CS 311 Fall Polynomial time P = ∪ k TIME(n k ) … P = ∪ k TIME(n k ) … TIME(n 3 ) TIME(n 2 ) TIME(n)
More Turing Machines Sipser 3.2 (pages ). CS 311 Fall Multitape Turing Machines Formally, we need only change the transition function to.
More Turing Machines Sipser 3.2 (pages ).
P, NP, PS, and NPS By Muhannad Harrim. Class P P is the complexity class containing decision problems which can be solved by a Deterministic Turing machine.
Complexity ©D.Moshkovitz 1 Turing Machines. Complexity ©D.Moshkovitz 2 Motivation Our main goal in this course is to analyze problems and categorize them.
CS5371 Theory of Computation Lecture 11: Computability Theory II (TM Variants, Church-Turing Thesis)
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY Read sections 7.1 – 7.3 of the book for next time.
Lecture 5 Turing Machines
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture 8+9 Time complexity 1 Jan Maluszynski, IDA, 2007
CS 310 – Fall 2006 Pacific University CS310 P vs NP the steel cage death match Section 7.2 November 29, 2006.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture NP-Completeness Jan Maluszynski, IDA, 2007
Theory of Computing Lecture 20 MAS 714 Hartmut Klauck.
CS 310 – Fall 2006 Pacific University CS310 Complexity Section 7.1 November 27, 2006.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
CS 461 – Nov. 21 Sections 7.1 – 7.2 Measuring complexity Dividing decidable languages into complexity classes. Algorithm complexity depends on what kind.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
חישוביות וסיבוכיות Computability and Complexity Lecture 7 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A AAAA.
Approximation Algorithms Pages ADVANCED TOPICS IN COMPLEXITY THEORY.
Computer Language Theory
CSCI 2670 Introduction to Theory of Computing November 23, 2004.
The class P Section 7.2 CSC 4170 Theory of Computation.
Measuring complexity Section 7.1 Giorgi Japaridze Theory of Computability.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
Computability Heap exercise. The class P. The class NP. Verifiers. Homework: Review RELPRIME proof. Find examples of problems in NP.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Turing Machines.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 7 Time complexity Contents Measuring Complexity Big-O and small-o notation.
Turing -Recognizable vs. -Decidable
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 7 Time Complexity Some slides are in courtesy.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 3 The Church-Turing Thesis Contents Turing Machines definitions, examples,
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
Theory of Computation Automata Theory Dr. Ayman Srour.
CSCI 2670 Introduction to Theory of Computing November 15, 2005.
 2005 SDU Lecture14 Mapping Reducibility, Complexity.
Modeling Arithmetic, Computation, and Languages Mathematical Structures for Computer Science Chapter 8 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesTuring.
CSE 105 theory of computation
CSCI 2670 Introduction to Theory of Computing
CSC 4170 Theory of Computation The class P Section 7.2.
Time complexity Here we will consider elements of computational complexity theory – an investigation of the time (or other resources) required for solving.
CSC 4170 Theory of Computation The class P Section 7.2.
CSE 105 theory of computation
CSCI 2670 Introduction to Theory of Computing
CSE 105 theory of computation
فصل سوم The Church-Turing Thesis
Intractable Problems Time-Bounded Turing Machines Classes P and NP
Intro to Theory of Computation
CS21 Decidability and Tractability
CS21 Decidability and Tractability
CS154, Lecture 13: P vs NP.
CS154, Lecture 12: Time Complexity
CSC 4170 Theory of Computation Time complexity Section 7.1.
Time Complexity Classes
CSE 105 theory of computation
CSE 105 theory of computation
CSC 4170 Theory of Computation Time complexity Section 7.1.
Theory of Computability
CSE 105 theory of computation
Presentation transcript:

Theory of Computational Complexity TA : Junichi Teruyama Iwama lab. D3

Notification This course is a reading seminar. You should give a presentation and submit resume on your presentation. After your presentation, send me the datafile of your presentation and resume. I will upload the web page of this course.

Notification Michael Sipser: Introduction to the Theory of Computation. Course Technology. Part 1 : Automata and Language Part 2 : Computability Theory Part 3 : Complexity Theory Please use examples and figures.

Today's Outline Chapter 3 : Definition of Turing Machines Definition of Variants of Turing Machines Chapter 7 : Time Complexity Big-O, small-o notation Class P Class NP

Today's Outline Chapter 3 : Definition of Turing Machines Definition of Variants of Turing Machines Chapter 7 : Time Complexity Big-O, small-o notation Class P Class NP

3.1 Turing Machines Turing Machine (TM) : computation model Infinite tape (unlimited memory), tape head, state Initially the tape contains the input string and is blank everywhere else Tape head : read, write and move Next state and a behavior of tape head is depending on the current state and the character which read by head Outputs accept and reject are obtained by entering their states It may go on forever, never halting TM M Infinitely long blank Input String Output Accept

3.1 Turing Machines Turing Machine (TM): TM M Outputs Accept Outputs Reject Never Halting Input

Formal definition of a Turing machine Definition 3.3 A Turing machine is a 7-taples :, where are all finite set and

Formal definition of a Turing machine Example TM M =, TM M Input : 00

Formal definition of a Turing machine Example TM M =, TM M Input : 00

Formal definition of a Turing machine Example TM M =, TM M Input : 00

Formal definition of a Turing machine Example TM M =, TM M Output Accept Input : 00

Formal definition of a Turing machine Example TM M =, TM M Input : 01

Formal definition of a Turing machine Example TM M =, TM M Input : 01

Formal definition of a Turing machine Example TM M =, TM M Input : 01

Formal definition of a Turing machine Example TM M =, TM M Input : 01 Never Halting

Language of Turing machine For a Turing machine M, the collection of strings that M accepts is the language of M, or the language recognized by M, denoted L(M) TM M Outputs Accept Outputs Reject Never Halting Input

Language of Turing machine For each TM M, we can consider the set of strings which M accepts. We call this set the language of M, or the language recognized by M, denoted by L(M). If TM M halts for all input strings, we call M decides the language L(M). Definition 3.5 Call a language Turing-recognized if some Turing machine recognizes it. Definition 3.6 Call a language Turing-decidable if some Turing machine decides it.

3.2 Variants of Turing Machines Multitape Turing machines : Theorem 3.13 Every multitape Turing machine has an equivalent single-tape Turing machine. The languages which each machine recognizes are same Idea of Proof. Simulate a multitape TM D by a single-tape TM M. Proof is omitted. TM D

3.2 Variants of Turing Machines Nondeterministic Turing machine : Branching computation A string is accepted by a nondeterministic TM M iff there is a path to accept state in the computation of TM M accept reject deterministicnondeterministic

3.2 Variants of Turing Machines Nondeterministic Turing machine : accept reject deterministicnondeterministic Theorem 3.13 Every nondeterministic Turing machine has an equivalent deterministic Turing machine. Idea of Proof. Simulate a nondeterministic TM N by three-tape TM M

Language and Problem Problem : Consider only [yes/no] problem. ex1) PRIME : input -> integer N question -> N is prime? ex2) CON : input -> undirected graph G question -> G is connected?

Language and Problem Problem Language [yes/no] [element /not element] Prime Number TM M Outputs Accept Solving a Problem -> Constructing TM that decides a Language Composite Number Outputs Reject

Language and Problem ex1) PRIME : input -> integer N question -> N is prime? Binary code of Prime Number Binary code of Composite Number Need to encode input Number Prime Number TM M Outputs Accept Composite Number Outputs Reject

Language and Problem ex2) CON : input -> undirected graph G question -> G is connected? TM M Outputs Accept Outputs Reject the encoding of G

Today's Outline Chapter 3 : Definition of Turing Machines Definition of Variants of Turing Machines Chapter 7 : Time Complexity Big-O, small-O notation Class P Class NP

Chapter 7 : Time Complexity TM M : a deterministic TM that halts on all inputs Time complexity of TM M : the function f : N->N f(n) is the maximum number of steps that M uses on any input of length n If time complexity of TM M is f(n), we say that M is an f(n) time Turing machine

Big-O, small-o notation The exact time complexity of an algorithm is often a complex expression Asymptotic Analysis : To understand the time complexity when the algorithm is run for large inputs. Considering the highest order term of the expression ex) f(n) = 6n^3 + 2n^2 + 20n > asymptotically at most n^3 -> Big-O notation : f(n) = O(n^3) Estimation

Big-O, small-o notation Big-O notation f ( n ) = O ( g ( n )) : g ( n ) is an upper bound for f ( n ) ex1) n 2 = O(n 3 ) ex2) n 3 + 4n 2 = O(n 3 ) ex3) n 2 logn + n 2 = O(n 2 logn) Definition 7.2 Let f and g be function Say that f ( n ) = O ( g ( n ) ) if c and n 0 exist s.t. for every n > n 0, f ( n ) ≦ cg ( n )

Big-O, small-o notation Small-o notation ex1) n 2 = o(n 3 ) ex2) n = o(nlogn) ex3) √n = o(n) Definition 7.5 Let f and g be function Say that f ( n ) = o ( g ( n ) ), if In other words, for any c, n 0 exists f ( n ) n 0

Time Complexity Class Using Big-O notation, let us set up for classifying languages according to their time requirement. Definition 7.7 Let be function. Define the time complexity class TIME(t(n)), to be the collection of all languages that are decided by O(t(n)) time Turing machine

Time Complexity Class Definition 7.7 Let be function. Define the time complexity class TIME(t(n)), to be the collection of all languages that are decided by O(t(n)) time Turing machine Classifing the language

7.2 The Class P Definition 7.11 Class P is the class of languages that are decidable in polynomial time on a deterministic single-tape Turing machine P

Problems in P ex1) PATH = { | a directed graph G that has a path from s to t} ex2) RELPRIME = { | x and y are relatively prime} s t

7.3 Class NP Hamilton path for directed graph : a directed path that goes through each node once HAMPATH = { | G is a directed graph that has a Hamilton path from s to t} There is no Hamilton path from v 4 to v 1

Class NP HAMPATH = { | G is a directed graph that has a Hamilton path from s to t} HAMPATH is difficult problem : No one knows whether HAMPATH is solvable in polynomial time Polynomial verifiability : If G has a Hamilton path and we are given this path, we can checking its existence in polynomial time

Class NP Definition 7.18 A verifier for a language A is an algorithm V, where A = {w | V accept for some string c} V Outputs Accept V Outputs Reject certificate proof

Class NP Definition 7.18 A verifier for a language A is an algorithm V, where A = {w | V accept for some string c} Measure the time of a verifier only on the length string w polynomial time verifier runs in polynomial time in the length of w A language A is polynomial time verifiable, if it has a polynomial time verifier Definition 7.19 Class NP is the class of languages that have polynomial time verifiers

Running Time of Nondeterministic TM accept reject f(n) Running time of an nondeterministic TM is the function f(n), where f(n) is the maximum number of steps for all branching of computation for any string of length n

Class NP Theorem 7.20 A language in NP iff it is decided by some nondeterministic polynomial time Turing machine VNTM

Class NP Definition 7.21 NTIME(t(n)) = { L | L is a language that are decided by O(t(n)) time nondeterministic Turing machine} Corollary 7.22 Theorem 7.20 A language in NP iff it is decided by some nondeterministic polynomial time Turing machine

Next day : Oct 15. I will send about the schedule of presentation.