COMP/MATH 300 Topics for Spring 2017 June 5, Review and Regular Languages

Similar documents
CSCE 551: Chin-Tser Huang. University of South Carolina

CSE 105 THEORY OF COMPUTATION. Spring 2018 review class

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

Theory of Computation (IX) Yijia Chen Fudan University

Acknowledgments 2. Part 0: Overview 17

SYLLABUS. Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 3 : REGULAR EXPRESSIONS AND LANGUAGES

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION

ACS2: Decidability Decidability

CS Lecture 29 P, NP, and NP-Completeness. k ) for all k. Fall The class P. The class NP

Decidability (What, stuff is unsolvable?)

Undecidability COMS Ashley Montanaro 4 April Department of Computer Science, University of Bristol Bristol, UK

CSCE 551 Final Exam, Spring 2004 Answer Key

} Some languages are Turing-decidable A Turing Machine will halt on all inputs (either accepting or rejecting). No infinite loops.

Problems, and How Computer Scientists Solve Them Manas Thakur

V Honors Theory of Computation

Decidability (intro.)

Decidability. Human-aware Robotics. 2017/10/31 Chapter 4.1 in Sipser Ø Announcement:

1 Showing Recognizability

CMSC 441: Algorithms. NP Completeness

Mapping Reducibility. Human-aware Robotics. 2017/11/16 Chapter 5.3 in Sipser Ø Announcement:

CPSC 421: Tutorial #1

Final exam study sheet for CS3719 Turing machines and decidability.

ECS 120: Theory of Computation UC Davis Phillip Rogaway February 16, Midterm Exam

What languages are Turing-decidable? What languages are not Turing-decidable? Is there a language that isn t even Turingrecognizable?

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

4.2 The Halting Problem

CSCI 2200 Foundations of Computer Science Spring 2018 Quiz 3 (May 2, 2018) SOLUTIONS

Exam Computability and Complexity

TURING MAHINES

Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2018, face-to-face day section Prof. Marvin K. Nakayama

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET

Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2016, face-to-face day section Prof. Marvin K. Nakayama

NP-Completeness. Until now we have been designing algorithms for specific problems

1 Computational Problems

Decidability: Church-Turing Thesis

Recap DFA,NFA, DTM. Slides by Prof. Debasis Mitra, FIT.

1. Introduction Recap

CS Lecture 28 P, NP, and NP-Completeness. Fall 2008

FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY

CS 320, Fall Dr. Geri Georg, Instructor 320 NP 1

Notes for Lecture Notes 2

acs-07: Decidability Decidability Andreas Karwath und Malte Helmert Informatik Theorie II (A) WS2009/10

Automata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) October,

CSE 105 THEORY OF COMPUTATION

Part I: Definitions and Properties

UNIT-VIII COMPUTABILITY THEORY

3130CIT Theory of Computation

Advanced topic: Space complexity

Turing Machines A Turing Machine is a 7-tuple, (Q, Σ, Γ, δ, q0, qaccept, qreject), where Q, Σ, Γ are all finite

Chomsky Normal Form and TURING MACHINES. TUESDAY Feb 4

Introduction to Languages and Computation

Introduction to the Theory of Computing

BBM402-Lecture 11: The Class NP

CS5371 Theory of Computation. Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)

SOLUTION: SOLUTION: SOLUTION:

ECS 120 Lesson 18 Decidable Problems, the Halting Problem

Undecidable Problems. Z. Sawa (TU Ostrava) Introd. to Theoretical Computer Science May 12, / 65

Computability and Complexity

Lecture 25: Cook s Theorem (1997) Steven Skiena. skiena

Chapter 3: The Church-Turing Thesis

CSC 1700 Analysis of Algorithms: P and NP Problems

CS 301. Lecture 18 Decidable languages. Stephen Checkoway. April 2, 2018

DM17. Beregnelighed. Jacob Aae Mikkelsen

Theory of Computation p.1/?? Theory of Computation p.2/?? We develop examples of languages that are decidable

Data Structures in Java

Undecidability. Andreas Klappenecker. [based on slides by Prof. Welch]

CP405 Theory of Computation

Intro to Theory of Computation

Easy Problems vs. Hard Problems. CSE 421 Introduction to Algorithms Winter Is P a good definition of efficient? The class P

Reducability. Sipser, pages

Theory of Computation CS3102 Spring 2014 A tale of computers, math, problem solving, life, love and tragic death

CS 311 Sample Final Examination

Computational Models Lecture 8 1

CS21 Decidability and Tractability

Computational Models Lecture 8 1

Artificial Intelligence. 3 Problem Complexity. Prof. Dr. Jana Koehler Fall 2016 HSLU - JK

Theory Bridge Exam Example Questions

CSE355 SUMMER 2018 LECTURES TURING MACHINES AND (UN)DECIDABILITY

The purpose here is to classify computational problems according to their complexity. For that purpose we need first to agree on a computational

CSCC63 Worksheet Turing Machines

Handbook of Logic and Proof Techniques for Computer Science

Undecidable Problems and Reducibility

1 More finite deterministic automata

CSCE 551 Final Exam, April 28, 2016 Answer Key

Computational Models Lecture 8 1

Q = Set of states, IE661: Scheduling Theory (Fall 2003) Primer to Complexity Theory Satyaki Ghosh Dastidar

Final Exam Version A December 16, 2014 Name: NetID: Section: # Total Score

Automata Theory. Lecture on Discussion Course of CS120. Runzhe SJTU ACM CLASS

Midterm II : Formal Languages, Automata, and Computability

CS6901: review of Theory of Computation and Algorithms

Announcements. Problem Set 7 graded; will be returned at end of lecture. Unclaimed problem sets and midterms moved!

CS3719 Theory of Computation and Algorithms

Turing Machines, diagonalization, the halting problem, reducibility

Finite Automata. Mahesh Viswanathan

Turing Machines and Time Complexity

NP-completeness. Chapter 34. Sergey Bereg

CSCI FOUNDATIONS OF COMPUTER SCIENCE

Theory of Computation CS3102 Spring 2014 A tale of computers, math, problem solving, life, love and tragic death

6.045J/18.400J: Automata, Computability and Complexity Final Exam. There are two sheets of scratch paper at the end of this exam.

Transcription:

COMP/MATH 300 Topics for Spring 2017 June 5, 2017 Review and Regular Languages Exam I I. Introductory and review information from Chapter 0 II. Problems and Languages A. Computable problems can be expressed as formal languages 1. Rules of the problem cast as rules of the languages 2. Strings of the language are solutions to the problem B. Much of the study of formal languages pre-dates computers III. Automata A. State machines B. Symbols or characters can be loosely defined 1. single symbols such as a, b, 0, 1 2. Compound symbols (count as one) such as 00, 01, 10, 11 3. The empty character is denoted by λ or ε 4. Our book uses ε for the empty character 5. The empty character is not the same as the empty string C. Can be formally defined by a five-tuple 1. Alphabet of symbols (Σ) 2. A set of allowed states (Q) 3. Transition function or table (δ) 4. Initial state of the machine (q 0 ) 5. A set of final, or accepting, states (F ) D. Machine cycle 1. Machine reads a single input character (see B.) 2. Current state and input symbol are input to the Transition table a. For each state and input character there must be a defined transition b. If there is no defined transition for a state/input pair, machine fails 3. Machine runs until there is no more input E. Determinate Finite Automata (DFA) Page 1

1. One, and only one, transition defined per state/input pair 2. The empty character is not allowed 3. If the DFA is in a final state when the end of the input is reached, the DFA accepts the input 4. If the DFA is not in a final state when the end of input is reached, the DFA rejects the input F. Nondeterminate Finite Automata (NFA) 1. NFAs are a superset of DFAs 2. NFAs allow multiple transition choices per state/input pair 3. NFAs allow the empty character to appear between any two characters (including ε) G. For every NFA there is an equivalent DFA 1. There is an algorithm to construct a DFA from any NFA 2. The DFA constructed will accept the exact same strings as the original NFA H. A DFA can be thought of as an NFA with no ε transitions and only one defined transition per state/input pair IV. Regular Expressions A. Every DFA or NFA has an equivalent regular expression (RE) B. There is an algorithm to convert a DFA or an NFA to an RE C. There is an algorithm to convert a regular expression to a DFA V. Regular Languages A. All finite languages are regular B. All regular languages are recognized or described by: 1. DFAs 2. NFAs 3. RE VI. Pumping lemma for regular languages A. Proof by contradiction that a language is not regular B. Not much use in proving a language is regular C. Most often used to prove by contradiction that a language is not regular D. Pumping can be thought of as a game between two people Exam II VII. Context Free Grammars A. Variables denoted by capital letters B. Terminals denoted by lowercase letters that are members of Σ C. Rules state how variables may be replace to generate strings in the language Page 2

D. Regular languages and CFGs 1. All left-handed productions generate regular language 2. All right-handed productions generate regular language 3. All regular languages can be generated by a CFG E. it is possible to design a grammar to generate the strings of a given language F. Chomsky Normal Form 1. Recognize the allowed rules 2. Convert a grammar to CNF 3. Derivation of a string G. Ambiguous strings/derivations H. Relation to syntax rules for computer languages Page 3

Computability Theory Exam III VIII. Hilbert s tenth problem A. What is it? B. Led directly to the Church-Turing thesis C. Simple problems often lead to interesting mathematics! IX. Computability and Decidability A. Turing s work B. Holes in Mathematics X. Turing Machines A. Formal definition (mechanical parts) 1. Infinite input tape 2. Tape read/write head a. Reads one character each cycle b. Writes one character each cycle c. Moves one character right or left each cycle 3. Internal states 4. Internal transition table B. 7-tuple 1. Q 2. Σ 3. Γ (must include the space character) 4. δ 5. q 0 6. q accept 7. q reject C. HALTS! When the machine halts 1. Missing translations (in δ) force the machine to halt instantly. These are treated as rejects 2. q accept 3. q reject 4. There is no guarantee the machine will ever stop D. Variations of Turing Machines 1. Multiple input tapes 2. Nondeterministic TMs 3. Enumerator 4. All are equivalent to a normal Turning Machine Page 4

E. Turing recognizable language and machine F. Turing co-recognizable language and machine G. Turing decidable language and machine H. Turing unrecognizable languages XI. Decidability 1. Give a definition 2. Give an example(hint: We did one in class.) A. Finite languages B. Regular languages C. DFA D. NFA E. RE F. CFG G. Turning Decidable H. Turning Recognizable I. Turning Co-Recognizable J. Are there any languages that do not fit in this hierarchy? K. Know the relationships between these languages; i.e., which are subsets of which XII. The halting problem A. Why do you care? B. Prove there is no way to build a TM to solve the halting problem. C. Proves there are problems that are not computable XIII. Sets and countability A. Definition of set cardinality B. Definition of mapping functions for sets A and B (f() over A! B) 1. Injective or one-to-one 2. Surjective or onto 3. Bijective or one-to-one and onto C. Definition of countable 1. All finite sets are countable 2. Some infinite sets are countably infinite 3. Know at least one example of countably infinite set and one of uncountable infinite set. D. Cantor s diagonal countable Page 5

Complexity Theory XIV. Classification of problems A. P B. NP 1. Easy problems 2. Known polynomial time algorithms for a deterministic TM 3. Definition of Class P 4. Know some P problems 1. Solvable by a non-deterministic TM in polynomial time 2. Solution can be verified by a deterministic TM in polynomial time 3. Definition of Class NP 4. Know some NP problems a. Class P is a subset (proper or improper) of NP b. Remember: You can convert an NFA to a DFA C. NP-hard 1. Hard problems 2. No known polynomial time algorithms for a deterministic TM 3. Often optimization problems 4. Intractable 5. May have a solution, but the time complexity is extreme. 6. Solution can be verified in polynomial time. 7. Usually and approximate solution can be found in ploynomial time. D. NP-complete or NPC 1. Must be NP-hard. 2. The hardest problems there are. 3. Know the definition. 4. Most often cast as decision problems. 5. Many have only brute force solutions that are typically O(2 n ). 6. If one can be solved in polynomial time, all can be solved in polynomial time. XV. More on P, NP, and NPC A. The question in computer science: Is P = N P? 1. Be able to explain what this means 2. Be able to give/recognize a problem this would create or solve. B. Know some NPC problems C. Karp s list of 21 NPC problems helps D. Proof that a problem, say L is NPC 1. Show it is NP-hard 2. Show that some known NPC problem can be reduced to a special case of L Page 6

a. Given SAT is NPC b. Show SAT P L (SAT can be reduced to L in polynomial time.) 3. Don t forget QED,...as was to be shown., or E. Some NPC problems: 1. 0/1 knapsack (fractional knapsack is P) 2. 0/1 Bin Packing (think of a number of knapsacks all the same capacity...) 3. SAT a. This one can be proved to be NPC without needing a reduction. b. The first problem to be shown to be NPC 4. 3-SAT (2-SAT is P) 5. Set cover 6. Vertex cover 7. Hamiltonian Tour and/or Traveling Salesman Problem (Euler Tour is P) 8. Hilbert s 10th problem a. Given an equation of the form ax 3 + bx 2 y + cxy 2 + dy 3 + e = 0, does this equation have a pair of integer roots? b. The answer is NPC 9. Set packing or partitioning 10. Longest acyclic path between two vertices. Shortest path is P 11. Graph coloring (beyond the scope of this course, but interesting) 12. Integer Linear Programming. a. Generalized version of Hilbert s 10th Problem b. Linear Programming with non-integer solutions is in class P 13. Sudoku and Battleship (just for fun) 14. k-center problem (Where do you locate k distribution centers to minimize the delivery time to x stores.) XVI. Anything else that has come up on a problem, class, or lab since we talked about TM recognizable languages. Page 7