RAJALAKSHMI ENGINEERING COLLEGE

Slides:



Advertisements
Similar presentations
Theory of Computation CS3102 – Spring 2014 A tale of computers, math, problem solving, life, love and tragic death Nathan Brunelle Department of Computer.
Advertisements

Lecture 24 MAS 714 Hartmut Klauck
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.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
Normal forms for Context-Free Grammars
January 23, 2015CS21 Lecture 81 CS21 Decidability and Tractability Lecture 8 January 23, 2015.
Final Exam Review Cummulative Chapters 0, 1, 2, 3, 4, 5 and 7.
CMPS 3223 Theory of Computation Automata, Computability, & Complexity by Elaine Rich ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Slides provided.
Theory of Computing Lecture 15 MAS 714 Hartmut Klauck.
NP-complete Problem Prof. S M Lee Department of Computer Science.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 11 Midterm Exam 2 -Context-Free Languages Mälardalen University 2005.
Saeid Pashzadeh Jan 2009 Theory of Computation 1.
NP-complete Problems Prof. Sin-Min Lee Department of Computer Science.
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
Donghyun (David) Kim Department of Mathematics and Physics North Carolina Central University 1 Chapter 2 Context-Free Languages Some slides are in courtesy.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen Department of Computer Science University of Texas-Pan American.
 2005 SDU Lecture11 Decidability.  2005 SDU 2 Topics Discuss the power of algorithms to solve problems. Demonstrate that some problems can be solved.
Theory of Computation. Introduction to The Course Lectures: Room ( Sun. & Tue.: 8 am – 9:30 am) Instructor: Dr. Ayman Srour (Ph.D. in Computer Science).
Review : Theory of Computation. Regular Language and Finite Automata Context-free Language and Pushdown Automata Turing Machine and Recursive Enumerable.
The NP class. NP-completeness
Computability Joke. Context-free grammars Parsing. Chomsky
CIS Automata and Formal Languages – Pei Wang
Computational problems, algorithms, runtime, hardness
Context-Free Grammars: an overview
Properties of Context-Free Languages
CSE 105 theory of computation
CSE 105 theory of computation
Deterministic FA/ PDA Sequential Machine Theory Prof. K. J. Hintz
CS 461 – Dec. 2 Major results Automata: 3 models of computation
Review : Theory of Computation
Linear Bounded Automata LBAs
FORMAL LANGUAGES AND AUTOMATA THEORY
Turing Machines.
Natural Language Processing - Formal Language -
CSCE 355 Foundations of Computation
Context Sensitive Languages and Linear Bounded Automata
Pushdown Automata.
Pushdown Automata.
LIMITS OF ALGORITHMIC COMPUTATION
CSE 105 theory of computation
CSE 2001: Introduction to Theory of Computation Fall 2013
Course 2 Introduction to Formal Languages and Automata Theory (part 2)
Intro to Theory of Computation
Intro to Theory of Computation
Summary.
Jaya Krishna, M.Tech, Assistant Professor
CSCE 411 Design and Analysis of Algorithms
Automata and Formal Languages (Final Review)
CHAPTER 2 Context-Free Languages
The Pumping Lemma for CFL’s
CLASSES P AND NP.
Halting Problem.
CS21 Decidability and Tractability
CS21 Decidability and Tractability
CSE 105 theory of computation
Decidability and Tractability
NP-Completeness Reference: Computers and Intractability: A Guide to the Theory of NP-Completeness by Garey and Johnson, W.H. Freeman and Company, 1979.
CSE 105 theory of computation
CSE 105 theory of computation
Automata, Grammars and Languages
Instructor: Aaron Roth
Sub: Theoretical Foundations of Computer Sciences
CSE 105 theory of computation
Theoretical Foundations of Computer Sciences
CIS Automata and Formal Languages – Pei Wang
CSE 105 theory of computation
CSE 105 theory of computation
Presentation transcript:

RAJALAKSHMI ENGINEERING COLLEGE THEORY OF COMPUTATION 11/19/2018

UNIT- I AUTOMATA 11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

Finite Automata 11/19/2018

11/19/2018

States Open Closed Sensors Front – Someone on the Front pad Rear – Someone on the Rear pad Both – Someone on both the pads Neither – No one on either pad 11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

UNIT - II REGULAR EXPRESSIONS AND LANGUAGES 11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

Questions about Regular Languages 11/19/2018

Question contd… 11/19/2018

Singleton Languages are Regular 11/19/2018

Finite Languages are regular 11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

Closure Properties for Regular Languages 11/19/2018

Myhill-Nerode Theorem 11/19/2018

11/19/2018

11/19/2018

11/19/2018

UNIT III CONTEXT-FREE GRAMMAR AND LANGUAGES 11/19/2018

Context Free Grammars 11/19/2018

Cont… 11/19/2018

Cont… 11/19/2018

Defining CFG 11/19/2018

Notational conventions For CFGs 11/19/2018

OTHER CFG EXAMPLES 11/19/2018

Languages of CFG 11/19/2018

Languages of CFG 11/19/2018

Regular Languages and CFL 11/19/2018

Translating FAs into CFG 11/19/2018

Formalizing the Translation 11/19/2018

Closure Properties of CFL 11/19/2018

Proving CFLs closed under Union 11/19/2018

IDEA 11/19/2018

Formal Construction of Gu 11/19/2018

Derivations 11/19/2018

Sentential Form 11/19/2018

Left Most and Right Most Derivation 11/19/2018

Right-Linear Grammars 11/19/2018

Ambiguous Grammars 11/19/2018

Ambiguous Grammars 11/19/2018

Pushdown Automata Recall our study of regular languages. They were defined in terms of regular expressions (syntax). We then showed that FAs provide the computational power needed to process them. We would like to mimic this line of development for CFLs. We have a “syntactic” definition of CFLs in terms of CFGs. What kind of computing power is needed to “process” (i.e. recognize) CFLs? Do FAs suffice? 11/19/2018

Cont… 11/19/2018

Cont… 11/19/2018

Example PDA for{0n1n|n≥0} 11/19/2018

Formal Definition 11/19/2018

Instantaneous Description 11/19/2018

Language accepted by PDA 11/19/2018

Language accepted by PDA 11/19/2018

Language accepted by PDA 11/19/2018

Equivalence of CFGs and PDAs 11/19/2018

Cont… 11/19/2018

Deterministic PDA 11/19/2018

CONTEXT-FREE LANGUAGES UNIT - IV PROPERTIES OF CONTEXT-FREE LANGUAGES 11/19/2018

Chomsky Normal Form 11/19/2018

Defining CNF 11/19/2018

What is the Big Deal about CNF? 11/19/2018

Cont… 11/19/2018

Converting CFGs into CNF 11/19/2018

Eliminating ε-Productions 11/19/2018

Cont… 11/19/2018

Cont… 11/19/2018

Nullability 11/19/2018

Generating an ε-Production-free CFGs 11/19/2018

Converting CFGs into CNF 11/19/2018

Eliminating Unit Productions 11/19/2018

Cont… 11/19/2018

U(G,A) and New Productions 11/19/2018

Example 11/19/2018

Cont… 11/19/2018

Formal Construction 11/19/2018

Eliminating Terminal Productions 11/19/2018

Example 11/19/2018

Formal Construction 11/19/2018

Pumping Lemma For CFLs 11/19/2018

Cont… 11/19/2018

Derivation Trees 11/19/2018

Defining Derivation Tree 11/19/2018

Example 11/19/2018

Derivation Trees and CNF 11/19/2018

11/19/2018

Pumping Lemma for CFL 11/19/2018

Proving Languages Non Context Free using Pumping Lemma 11/19/2018

Prove that L= {aNbNcN|N ≥0} is Not a CFL 11/19/2018

Proof Cont… 11/19/2018

Turing Machines 11/19/2018

A Finite Automaton 11/19/2018

A Pushdown Automaton 11/19/2018

A Turing Machine 11/19/2018

Cont.. 11/19/2018

Differences 11/19/2018

Example 11/19/2018

Cont… 11/19/2018

Cont… 11/19/2018

Cont… 11/19/2018

Formal Definition 11/19/2018

Cont.. 11/19/2018

Cont… 11/19/2018

Cont… 11/19/2018

Configurations 11/19/2018

Cont… 11/19/2018

More Configuration 11/19/2018

Accepting a Language 11/19/2018

Enumerable Languages 11/19/2018

UNIT – V UNDECIDABILITY 11/19/2018

Enumerable Languages 11/19/2018

Enumerable Languages 11/19/2018

Example 11/19/2018

Example 11/19/2018

Example 11/19/2018

Element Distinctness 11/19/2018

Element Distinctness 11/19/2018

Element Distinctness 11/19/2018

Element Distinctness 11/19/2018

Element Distinctness 11/19/2018

Variants 11/19/2018

Multitape Turing Machine 11/19/2018

Equivalence 11/19/2018

Simulation 11/19/2018

Simulation 11/19/2018

Non Deterministic Turing Machine 11/19/2018

Decidability 11/19/2018

Example 11/19/2018

Theorem 11/19/2018

Theorem 11/19/2018

Theorem 11/19/2018

Theorem 11/19/2018

Halting Problem 11/19/2018

Cont.. 11/19/2018

Cont.. 11/19/2018

Turing Machines are countable 11/19/2018

Cont.. 11/19/2018

Post Correspondence Problem 11/19/2018

Cont… 11/19/2018

Cont... 11/19/2018

Cont… 11/19/2018

Cont… 11/19/2018

Cont… 11/19/2018

11/19/2018

NP-complete Problem 11/19/2018

11/19/2018

11/19/2018

To keep things simple, we will mainly concern ourselves with Decision Problems To keep things simple, we will mainly concern ourselves with decision problems. These problems only require a single bit output: ``yes'' and ``no''. How would you solve the following decision problems? Is this directed graph acyclic? Is there a spanning tree of this undirected graph with total weight less than w? Does this bipartite graph have a perfect (all nodes matched) matching? Does the pattern p appear as a substring in text t? 11/19/2018

11/19/2018

P is the set of decision problems that can be solved in worst-case polynomial time: If the input is of size n, the running time must be O(nk). Note that k can depend on the problem class, but not the particular instance. All the decision problems mentioned above are in P. 11/19/2018

The class NP (meaning non-deterministic polynomial time) is the Nice Puzzle The class NP (meaning non-deterministic polynomial time) is the set of problems that might appear in a puzzle magazine: ``Nice puzzle.'' What makes these problems special is that they might be hard to solve, but a short answer can always be printed in the back, and it is easy to see that the answer is correct once you see it. Example... Does matrix A have an LU decomposition? No guarantee if answer is ``no''. 11/19/2018

11/19/2018

Technically speaking: NP Technically speaking: A problem is in NP if it has a short accepting certificate. An accepting certificate is something that we can use to quickly show that the answer is ``yes'' (if it is yes). Quickly means in polynomial time. Short means polynomial size. This means that all problems in P are in NP (since we don't even need a certificate to quickly show the answer is ``yes''). But other problems in NP may not be in P. Given an integer x, is it composite? How do we know this is in NP? 11/19/2018

Another way of thinking of NP is it is the set of problems that can Good Guessing Another way of thinking of NP is it is the set of problems that can solved efficiently by a really good guesser. The guesser essentially picks the accepting certificate out of the air (Non-deterministic Polynomial time). It can then convince itself that it is correct using a polynomial time algorithm. (Like a right-brain, left-brain sort of thing.) Clearly this isn't a practically useful characterization: how could we build such a machine? 11/19/2018

Exponential Upperbound Another useful property of the class NP is that all NP problems can be solved in exponential time (EXP). This is because we can always list out all short certificates in exponential time and check all O(2nk) of them. Thus, P is in NP, and NP is in EXP. Although we know that P is not equal to EXP, it is possible that NP = P, or EXP, or neither. Frustrating! 11/19/2018

As we will see, some problems are at least as hard to solve as any NP-hardness As we will see, some problems are at least as hard to solve as any problem in NP. We call such problems NP-hard. How might we argue that problem X is at least as hard (to within a polynomial factor) as problem Y? If X is at least as hard as Y, how would we expect an algorithm that is able to solve X to behave? 11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

All evidence indicates that these conjectures are true. co-NP NP P One of the central (and widely and intensively studied 30 years) problems of (theoretical) computer science is to prove that (a) PNP (b) NP  co-NP. All evidence indicates that these conjectures are true.  Disproving any of these two conjectures would not only be considered truly spectacular, but would also come as a tremendous surprise (with a variety of far-reaching counterintuitive consequences). NP-complete: Collection Z of problems is NP-complete if (a) it is NP and (b) if polynomial-time algorithm existed for solving problems in Z, then P=NP. 11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

NP-Complete Problems 11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018

11/19/2018