CSCI FOUNDATIONS OF COMPUTER SCIENCE
|
|
- Melanie Bryant
- 5 years ago
- Views:
Transcription
1 1 CSCI FOUNDATIONS OF COMPUTER SCIENCE Spring 2015 May 11, 2015
2 2 Announcements The bonus quiz points will be posted on LMS today. You can earn up to 3 bonus points on the final exam. I will have office hours on Thursday 12pm 2pm (usual Ume). The TAs will hold usual office hours this week. Please check LMS to make sure your grades are correct. me if you see any issues. Homeworks 5-7 will be in front of my office door M- W 12pm 4pm this week.
3 FINAL EXAM INFO 3
4 4 Final Exam LogisUcs Final Exam is Wednesday, May 20, 2015 from 11:30am 2:30pm in West Hall Auditorium. You can bring two 8.5 x11 double- sided crib sheets Calculators are not allowed (you won t need one) Logical equivalences, set idenuues, rules of inference, and useful summauon formulae will be provided. See FOCS final exam tables link on web site Usual disclaimer: anyone caught cheaung on the final will receive an immediate F in the course.
5 5 Final Exam Info The final will last 3 hours. There will be about 10 problems. The quesuon formats will be like the homework problems and the good problems to review listed on the slides. There are review problems posted on the course web site. I will not post soluuons. The TAs will go over some of the problems in recitauon. You can also ask about review problems in office hours.
6 6 Final Exam Topics Disclaimer: This is a high level overview of what will be on the final. Unless I specifically say something will not be on the final, it may be on the final. The exam will be cumulauve. There will be more emphasis (at least 50%) on the material from aeer Exam 2.
7 7 Final Exam Topics (Pre- Exam 2) Pre- Exam 2 material Informal proofs Direct proof, proof by contraposiuon, proof by contraposiuon, existence proofs, etc. Proofs by inducuon Concepts from logic, number theory sets, funcuons, sequences, and series may appear in quesuons (and answers), but the focus will be proofs. Combinatorics PermutaUons and CombinaUons, the pigeonhole principle, etc.
8 8 Final Exam Topics (Post- Exam 2) Discrete Probability Laplace s Theory of Probability Probability DistribuUons CondiUonal Probability Bayes Theorem Independence
9 9 Final Exam Topics (Post- Exam 2) Models of ComputaUon Regular Languages Finite Automata Context- Free Languages and Grammars Turing machines Complete descripuons, high level descripuons, TM variants LimitaUons of computauonal models Decision problems P and NP
10 10 Review: Languages A string is a sequence of lehers defined over an alphabet, Example alphabet: = {a, b} is the set of all possible strings made from the alphabet Example: = {,a,b,aa,ab,ba,bb,aaa,...} A language is a set of strings. It is a subset of
11 The Chomsky Hierarchy 11 Turing-Recognizable Languages Turing-Decidable Languages Context-Free Languages Regular Languages
12 12 Regular Languages The class of languages accepted by the weakest computauonal model that we have studied finite automata. Small computauonal power, e.g. vending machine, elevator, etc. Theorem: A language is regular if and only if it is accepted by a determinisuc finite automaton. Theorem: A language is regular if and only if it is accepted by a nondeterminisuc finite automaton. Theorem: A language is regular if and only if it there is a regular expression that describes it.
13 13 Regular Languages Examples of languages that are not regular: {ww R w Σ*} {0 k 1 k k 1} {w w {0,1}* and w contains and equal number of 0 s and 1 s}
14 The Chomsky Hierarchy 14 Turing-Recognizable Languages Turing-Decidable Languages Context-Free Languages Regular Languages
15 15 Context- Free Languages A context free language is a language that can be recognized by another type of computauonal model a pushdown automata stack Input string Output automaton accept or reject A context free language can be described by a context- free grammar (CFG). Important for compilers and NLP.
16 16 Context- Free Grammars You will not have to write a context- free grammar on the final exam. You may have to derive strings using the rules of a CFG. You may also be asked to idenufy the language defined by a CFG.
17 The Chomsky Hierarchy 17 Turing-Recognizable Languages Turing-Decidable Languages Context-Free Languages Regular Languages
18 A Turing Machine Tape Control Unit Read-Write head - The Read- Write head may move both lee and right over the input tape. - A TM may both read from and write to its input tape. - A TM halts immediately when it reaches an accept or reject state.
19 19 Turing Machines A complete descripuon of a Turing Machine is the state machine diagram. A high- level descripuon of a Turing Machine is a paragraph. If a TM accepts a language L, then The TM halts in the accept state for all strings in L For strings not in L, the TM may halt in the reject state or loop forever If a TM decides a language L, then The TM halts in the accept state for all strings in L The TM halts in the reject state for all strings not in L
20 20 Turing Machines The standard Turing Machine is determinisuc, with a single tape that is infinite in one direcuon. Variants: doubly infinite tape, muluple tape, nondeterminisuc Each variauon has the same power as the standard model Running Ume may be different. A Turing machine can be encoded as a bit string. Given a TM as input, a universal Turing machine can simulate that TM.
21 21 Turing Machines and Languages There are infinitely many Turing machines and infinitely many languages. Theorem: there are some languages that are not recognized by any Turing machine. Proof outline: The set of Turing machines is countable (the smaller infinity). The set of languages is uncountable (the bigger infinity). Therefore, there are more languages than Turing machines. Theorem: If S is an infinite countable set, then P (S) is an uncountable set.
22 L = {a i : a i 2 L(M i )} Turing-Recognizable Languages i i 22 L = { a : a L( Mi )} Turing-Decidable Languages Context-Free Languages Regular Languages
23 23 Decision Problems Decision problems are problems with a yes or no answer A problem is decidable if some Turing machine solves it. Outputs YES (accept) when the answer is yes and outputs NO (reject) when the answer is no. The machine must halt. This is same as saying the language for the problem is Turing- decidable.
24 24 The HalUng Problem Input: Turing Machine M and string w QuesUon: Does M halt on input w? Theorem: The halung problem is undecidable. There is no TM that can determine whether M halts on input w for all M and w. Key Idea of Proof: If the halung problem is decidable, this implies: For all languages L, If L is Turing- recognizable, then L is also Turing- decidable This is not true, so the halung problem is undecidable.
25 REDUCIBILITY 25
26 26 Reducibility A reduc@on is a way of converung (reducing) one problem to another problem, so that the soluuon to the second problem can be used to solve the first problem. Finding the area of a rectangle reduces to measuring its width and height. Solving a set of linear equauons reduces to inverung a matrix. If problem A can be reduced to problem B then, if we can solve B, we can solve A. If B is decidable, then A is decidable. If A is undecidable, then B is undecidable. (contraposiuve)
27 27 The Blank- Tape HalUng Problem The blank- tape halung problem: Input: Turing machine M QuesUon: Does M halt when started with a blank tape? Theorem: The blank- tape halung problem is undecidable. Proof: We will reduce the halung problem to the blank tape halung problem. This means that, if there is a TM that solves the blank tape halung problem, there is a TM that solves the halung problem. But, this is impossible since the halung problem is undecidable.
28 Suppose we have a decider for the blank-tape halting problem: 28 M ' blank-tape halting problem decider YES NO M ' halts on blank tape M ' doesn t halt on blank tape
29 We want to build a decider for the halting problem: 29 M halting problem YES M halts on w decider w NO M doesn t halt on w
30 We want to reduce the halting problem to the blank-tape halting problem: 30 M M ' Blank-tape halting problem decider YES NO YES NO w Halting problem decider
31 We need to convert one problem instance to the other problem instance 31 Halting problem decider M w Convert Inputs? M ' Blank-tape halting problem decider YES NO YES NO
32 Construct a new Turing machine M ' 32 When started on blank tape, writes w Then continues execution like M M ' step 1 if blank tape then write w step2 execute M with input w
33 33 M halts on input string w if and only if M ' halts when started with blank tape
34 34 M w Generate M ' M ' blank-tape halting problem decider YES NO YES NO Halting problem decider
35 35 We reduced the halting problem to the blank-tape halting problem Since the halting problem is undecidable, the blank-tape halting problem is undecidable QED
36 36 Summary of Undecidable Problems The membership problem Does machine M accept a string w? The halung problem Does machine M halt on input w? The blank tape halung problem Does machine M halt when starung with a blank tape?
37 RICE S THEOREM 37
38 38 Non- Trivial ProperUes of Languages A property Q defines a subset of all Turing- recognizable languages S. A property is trivial if Q = S or Q = Otherwise it is non- trivial. A non- trivial property of a Turing- recognizable language is a property such that Some Turing- recognizable language has this property Some Turing- recognizable language does not have this property.
39 39 Rice s Theorem Theorem: Any non- trivial property of a Turing- recognizable language is undecidable. Examples of non- trivial properues The language is empty The language is finite The language contains two different strings of the same length
40 P AND NP 40
41 41 Complexity Theory For pracucal purposes, it is not enough for a problem to be decidable. What if it takes an inordinate amount of Ume and memory to solve? We also care about the Ume, memory, and other resources needed to solve the problem. This is the focus of computauonal complexity theory. We will consider complexity of problems.
42 42 Time Complexity Consider the language A = {0 k 1 k k 0}. A is decidable. What is complexity needed to decide this language? How many steps does a Turing machine need to take to decide an input string of length n? What is its A step is a move of the read- write head over a single slot on the tape. We measure the worst- complexity. The longest running Ume needed for any input of length n. We use big- O notauon.
43 43 Time Complexity (cont.) Consider the language A = {0 k 1 k k 0}. A is decidable. What is the Ume complexity of the TM that decides this language? We described two Turing machines that decide A. Single- tape machine Zig- zag back and forth crossing off a 0 and then a corresponding O(n 2 ) 1. MulU- tape machine (2 tapes) Leave all 0s on tape 1 Copy all 1s to tape 2 Compare tape 1 and tape 2 Running Time: Running Time: O(n)
44 44 Time Complexity (cont.) The Ume complexity depends on the computauonal model. We will use the mulu- tape Turing machine model. We define a class of languages DTIME(n). This is the set of languages that can be decided by a determinisuc mulutape Turing Machine with Ume complexity O(n). Languages in this class include: A = {0 k 1 k k 0} B = {ww w {a,b}*}
45 45 More Time Complexity Classes We can define other classes in a similar way to DTIME(n) E.g, DTIME(n 2 ), DTIME(n 3 ), etc. DTIME(n 2 ) is the set of languages that can be decided by a mulu- tape Turing machine in O(n 2 ). Theorem: DTIME(n k ) DTIME(n k+1 ) Polynomial Ume algorithms are those in DTIME(n k ) for some integer k. These are tractable algorithms. For small k, they can be computed quickly.
46 46 The class P P is the class of languages that are decidable on a determinis@c Turing machine in polynomial Ume. P = [ k DTIME(n k ) All determinisuc computauonal models are polynomially equivalent. The class P does not depend on the choice of determinisuc computauonal model.
47 47 ExponenUal Time Algorithms ExponenUal Ume algorithms are the class DTIME(2 n ) This class contains intractable problems. Some problem instances may take centuries to solve. Example: The SaUsfiability Problem Input: a boolean expression (a logical proposiuon) in conjuncuve normal form (CNF) QuesUon: Is this expression sausfiable?
48 48 The SaUsfiability Problem Is this sausfiable? ( x 1 _ x 2 ) ^ (x 1 _ x 3 ) Yes. x 1 = F, x 2 = T,x 3 = T Is this sausfiable? (x 1 _ x 2 ) ^ x 1 ^ x 2 No. We can define the language L = { w w is a proposiuon in CNF and w is sausfiable} L DTIME(2 n ) Need brute force search of all possibiliues
49 49 Non- Determinism So far, we have analyzed the running Ume on determinisuc Turing machines. We can also consider running Ume on a non- determinisuc Turning machine. Example: Non- determinisuc algorithm for the sausfiability problem. Guess an assignment for the variables. Check if it makes the expression true. In a determinisuc algorithm, we try each assignment one at a Ume. In a nondeterminisuc algorithm, we try all assignments at the same Ume, in parallel.
50 50 The SaUsfiability Problem Revisited L = { w w is a proposiuon in CNF and w is sausfiable} Algorithm: Guess an assignment of variables O(n) Check if this is a sausfying assignment O(n) Total running Ume on a non- determinisuc TM is O(n). L NTIME(n). NTIME(n) is the set of languages that can be decided by a non- determinis@c Turing machine in O(n).
51 51 The class NP We can define other classes (similarly to NTIME(n)) NTIME(n 2 ), NTIME(n 3 ), etc. The class NTIME(n 2 ) is the set of languages that can be decided by a non- determinisuc Turing machine in O(n 2 ). The class NP is the set of languages that can be decided by a non- determinisuc Turing machine in NTIME(n k ), for all k. NP = [ k NTIME(n k ) The sausfiability problem is an NP problem.
52 52 P vs NP ObservaUon: P NP Every language that can be decided by a determinisuc TM in polynomial Ume can be decided by a nondeterminisuc TM in polynomial Ume. Every determinisuc TM is a nondeterminisuc TM.
53 53 P vs NP Is P = NP? We don t know. Does the sausfiability problem have a polynomial Ume determinisuc algorithm? We don t know the answer.
54 54 NP Completeness Informally, NP complete problems are the hardest problems in the class NP. If we prove that an NP complete problem has a determinisuc polynomial Ume algorithm, then we will know that P = NP. If we prove that an NP complete problem does not have a determinisuc polynomial Ume algorithm, then we will know that P NP.
55 55 Cook s Theorem Theorem: The sausfiability problem is NP- complete.
56 56 The Traveling Salesman Problem Suppose a salesman must visit all 6 ciues. The distances between the ciues are given. What is the shortest tour she can take that visits every city exactly once and then returns to the starung city?
57 57 The Traveling Salesman Problem Theorem: The traveling salesman problem is NP complete.
CSE 105 Theory of Computation
CSE 105 Theory of Computation http://www.jflap.org/jflaptmp/ Professor Jeanne Ferrante 1 Today s Agenda P and NP (7.2, 7.3) Next class: Review Reminders and announcements: CAPE & TA evals are open: Please
More informationCOMP/MATH 300 Topics for Spring 2017 June 5, Review and Regular Languages
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
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION Fall 2016 http://cseweb.ucsd.edu/classes/fa16/cse105-abc/ Logistics HW7 due tonight Thursday's class: REVIEW Final exam on Thursday Dec 8, 8am-11am, LEDDN AUD Note card allowed
More informationCS5371 Theory of Computation. Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG)
CS5371 Theory of Computation Lecture 12: Computability III (Decidable Languages relating to DFA, NFA, and CFG) Objectives Recall that decidable languages are languages that can be decided by TM (that means,
More informationCS5371 Theory of Computation. Lecture 14: Computability V (Prove by Reduction)
CS5371 Theory of Computation Lecture 14: Computability V (Prove by Reduction) Objectives This lecture shows more undecidable languages Our proof is not based on diagonalization Instead, we reduce the problem
More informationCS 301. Lecture 18 Decidable languages. Stephen Checkoway. April 2, 2018
CS 301 Lecture 18 Decidable languages Stephen Checkoway April 2, 2018 1 / 26 Decidable language Recall, a language A is decidable if there is some TM M that 1 recognizes A (i.e., L(M) = A), and 2 halts
More informationCS Lecture 28 P, NP, and NP-Completeness. Fall 2008
CS 301 - Lecture 28 P, NP, and NP-Completeness Fall 2008 Review Languages and Grammars Alphabets, strings, languages Regular Languages Deterministic Finite and Nondeterministic Automata Equivalence of
More information1 Showing Recognizability
CSCC63 Worksheet Recognizability and Decidability 1 1 Showing Recognizability 1.1 An Example - take 1 Let Σ be an alphabet. L = { M M is a T M and L(M) }, i.e., that M accepts some string from Σ. Prove
More informationMidterm Exam 2 CS 341: Foundations of Computer Science II Fall 2018, face-to-face day section Prof. Marvin K. Nakayama
Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2018, face-to-face day section Prof. Marvin K. Nakayama Print family (or last) name: Print given (or first) name: I have read and understand
More informationFORMAL LANGUAGES, AUTOMATA AND COMPUTATION
FORMAL LANGUAGES, AUTOMATA AND COMPUTATION DECIDABILITY ( LECTURE 15) SLIDES FOR 15-453 SPRING 2011 1 / 34 TURING MACHINES-SYNOPSIS The most general model of computation Computations of a TM are described
More informationCS Lecture 29 P, NP, and NP-Completeness. k ) for all k. Fall The class P. The class NP
CS 301 - Lecture 29 P, NP, and NP-Completeness Fall 2008 Review Languages and Grammars Alphabets, strings, languages Regular Languages Deterministic Finite and Nondeterministic Automata Equivalence of
More informationCSCE 551: Chin-Tser Huang. University of South Carolina
CSCE 551: Theory of Computation Chin-Tser Huang huangct@cse.sc.edu University of South Carolina Church-Turing Thesis The definition of the algorithm came in the 1936 papers of Alonzo Church h and Alan
More informationComputability and Complexity
Computability and Complexity Lecture 5 Reductions Undecidable problems from language theory Linear bounded automata given by Jiri Srba Lecture 5 Computability and Complexity 1/14 Reduction Informal Definition
More informationMidterm Exam 2 CS 341: Foundations of Computer Science II Fall 2016, face-to-face day section Prof. Marvin K. Nakayama
Midterm Exam 2 CS 341: Foundations of Computer Science II Fall 2016, face-to-face day section Prof. Marvin K. Nakayama Print family (or last) name: Print given (or first) name: I have read and understand
More informationTheory of Computation CS3102 Spring 2015 A tale of computers, math, problem solving, life, love and tragic death
Theory of Computation CS3102 Spring 2015 A tale of computers, math, problem solving, life, love and tragic death Robbie Hott www.cs.virginia.edu/~jh2jf Department of Computer Science University of Virginia
More informationDecidability. Human-aware Robotics. 2017/10/31 Chapter 4.1 in Sipser Ø Announcement:
Decidability 2017/10/31 Chapter 4.1 in Sipser Ø Announcement: q q q Slides for this lecture are here: http://www.public.asu.edu/~yzhan442/teaching/cse355/lectures/decidability.pdf Happy Hollaween! Delayed
More informationCSCI3390-Lecture 6: An Undecidable Problem
CSCI3390-Lecture 6: An Undecidable Problem September 21, 2018 1 Summary The language L T M recognized by the universal Turing machine is not decidable. Thus there is no algorithm that determines, yes or
More informationUndecidability COMS Ashley Montanaro 4 April Department of Computer Science, University of Bristol Bristol, UK
COMS11700 Undecidability Department of Computer Science, University of Bristol Bristol, UK 4 April 2014 COMS11700: Undecidability Slide 1/29 Decidability We are particularly interested in Turing machines
More informationFinal Exam Comments. UVa - cs302: Theory of Computation Spring < Total
UVa - cs302: Theory of Computation Spring 2008 Final Exam Comments < 50 50 59 60 69 70 79 80 89 90 94 95-102 Total 2 6 8 22 16 16 12 Problem 1: Short Answers. (20) For each question, provide a correct,
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION Spring 2016 http://cseweb.ucsd.edu/classes/sp16/cse105-ab/ Today's learning goals Sipser Ch 7.2, 7.3 Distinguish between polynomial and exponential DTIME Define nondeterministic
More informationUNIT-VIII COMPUTABILITY THEORY
CONTEXT SENSITIVE LANGUAGE UNIT-VIII COMPUTABILITY THEORY A Context Sensitive Grammar is a 4-tuple, G = (N, Σ P, S) where: N Set of non terminal symbols Σ Set of terminal symbols S Start symbol of the
More informationComputer Sciences Department
Computer Sciences Department 1 Reference Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Computer Sciences Department 3 ADVANCED TOPICS IN C O M P U T A B I L I T Y
More informationAutomata & languages. A primer on the Theory of Computation. Laurent Vanbever. ETH Zürich (D-ITET) October,
Automata & languages A primer on the Theory of Computation Laurent Vanbever www.vanbever.eu ETH Zürich (D-ITET) October, 19 2017 Part 5 out of 5 Last week was all about Context-Free Languages Context-Free
More informationHomework. Turing Machines. Announcements. Plan for today. Now our picture looks like. Languages
Homework s TM Variants and the Universal TM Homework #6 returned Homework #7 due today Homework #8 (the LAST homework!) Page 262 -- Exercise 10 (build with JFLAP) Page 270 -- Exercise 2 Page 282 -- Exercise
More information6.045J/18.400J: Automata, Computability and Complexity. Quiz 2. March 30, Please write your name in the upper corner of each page.
6.045J/18.400J: Automata, Computability and Complexity March 30, 2005 Quiz 2 Prof. Nancy Lynch Please write your name in the upper corner of each page. Problem Score 1 2 3 4 5 6 Total Q2-1 Problem 1: True
More informationTuring Machines and Time Complexity
Turing Machines and Time Complexity Turing Machines Turing Machines (Infinitely long) Tape of 1 s and 0 s Turing Machines (Infinitely long) Tape of 1 s and 0 s Able to read and write the tape, and move
More informationCS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)
CS537 Theory of Computation Lecture : Computability Theory I (Turing Machine) Objectives Introduce the Turing Machine (TM)? Proposed by Alan Turing in 936 finite-state control + infinitely long tape A
More informationWeek 3: Reductions and Completeness
Computational Complexity Theory Summer HSSP 2018 Week 3: Reductions and Completeness Dylan Hendrickson MIT Educational Studies Program 3.1 Reductions Suppose I know how to solve some problem quickly. How
More informationCP405 Theory of Computation
CP405 Theory of Computation BB(3) q 0 q 1 q 2 0 q 1 1R q 2 0R q 2 1L 1 H1R q 1 1R q 0 1L Growing Fast BB(3) = 6 BB(4) = 13 BB(5) = 4098 BB(6) = 3.515 x 10 18267 (known) (known) (possible) (possible) Language:
More informationCSCI3390-Assignment 2 Solutions
CSCI3390-Assignment 2 Solutions due February 3, 2016 1 TMs for Deciding Languages Write the specification of a Turing machine recognizing one of the following three languages. Do one of these problems.
More informationMapping Reducibility. Human-aware Robotics. 2017/11/16 Chapter 5.3 in Sipser Ø Announcement:
Mapping Reducibility 2017/11/16 Chapter 5.3 in Sipser Ø Announcement: q Slides for this lecture are here: http://www.public.asu.edu/~yzhan442/teaching/cse355/lectures/mapping.pdf 1 Last time Reducibility
More informationUndecidable Problems and Reducibility
University of Georgia Fall 2014 Reducibility We show a problem decidable/undecidable by reducing it to another problem. One type of reduction: mapping reduction. Definition Let A, B be languages over Σ.
More informationThe Power of One-State Turing Machines
The Power of One-State Turing Machines Marzio De Biasi Jan 15, 2018 Abstract At first glance, one state Turing machines are very weak: the Halting problem for them is decidable, and, without memory, they
More information6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, Class 8 Nancy Lynch
6.045: Automata, Computability, and Complexity Or, Great Ideas in Theoretical Computer Science Spring, 2010 Class 8 Nancy Lynch Today More undecidable problems: About Turing machines: Emptiness, etc. About
More informationCS5371 Theory of Computation. Lecture 10: Computability Theory I (Turing Machine)
CS537 Theory of Computation Lecture : Computability Theory I (Turing Machine) Objectives Introduce the Turing Machine (TM) Proposed by Alan Turing in 936 finite-state control + infinitely long tape A stronger
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION Spring 2017 http://cseweb.ucsd.edu/classes/sp17/cse105-ab/ Today's learning goals Summarize key concepts, ideas, themes from CSE 105. Approach your final exam studying with
More informationLecture 23: Rice Theorem and Turing machine behavior properties 21 April 2009
CS 373: Theory of Computation Sariel Har-Peled and Madhusudan Parthasarathy Lecture 23: Rice Theorem and Turing machine behavior properties 21 April 2009 This lecture covers Rice s theorem, as well as
More informationIntroduction to Languages and Computation
Introduction to Languages and Computation George Voutsadakis 1 1 Mathematics and Computer Science Lake Superior State University LSSU Math 400 George Voutsadakis (LSSU) Languages and Computation July 2014
More informationCSE 105 Theory of Computation
CSE 105 Theory of Computation http://www.jflap.org/jflaptmp/ Professor Jeanne Ferrante 1 Undecidability Today s Agenda Review: The TM Acceptance problem, A TM The Halting Problem for TM s Other problems
More informationExam Computability and Complexity
Total number of points:... Number of extra sheets of paper:... Exam Computability and Complexity by Jiri Srba, January 2009 Student s full name CPR number Study number Before you start, fill in the three
More informationCSE 105 Theory of Computation
CSE 105 Theory of Computation http://www.jflap.org/jflaptmp/ Professor Jeanne Ferrante 1 Today s Agenda Quick Review of CFG s and PDA s Introduction to Turing Machines and their Languages Reminders and
More informationSYLLABUS. Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 3 : REGULAR EXPRESSIONS AND LANGUAGES
Contents i SYLLABUS UNIT - I CHAPTER - 1 : AUT UTOMA OMATA Introduction to Finite Automata, Central Concepts of Automata Theory. CHAPTER - 2 : FINITE AUT UTOMA OMATA An Informal Picture of Finite Automata,
More informationCSCE 551: Chin-Tser Huang. University of South Carolina
CSCE 551: Theory of Computation Chin-Tser Huang huangct@cse.sc.edu University of South Carolina Computation History A computation history of a TM M is a sequence of its configurations C 1, C 2,, C l such
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION Spring 2016 http://cseweb.ucsd.edu/classes/sp16/cse105-ab/ Today's learning goals Sipser Ch 3.3, 4.1 State and use the Church-Turing thesis. Give examples of decidable problems.
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION Fall 2016 http://cseweb.ucsd.edu/classes/fa16/cse105-abc/ Today's learning goals Sipser Ch 3 Trace the computation of a Turing machine using its transition function and configurations.
More informationFinal exam study sheet for CS3719 Turing machines and decidability.
Final exam study sheet for CS3719 Turing machines and decidability. A Turing machine is a finite automaton with an infinite memory (tape). Formally, a Turing machine is a 6-tuple M = (Q, Σ, Γ, δ, q 0,
More informationTuring Machine Recap
Turing Machine Recap DFA with (infinite) tape. One move: read, write, move, change state. High-level Points Church-Turing thesis: TMs are the most general computing devices. So far no counter example Every
More informationA Note on Turing Machine Design
CS103 Handout 17 Fall 2013 November 11, 2013 Problem Set 7 This problem explores Turing machines, nondeterministic computation, properties of the RE and R languages, and the limits of RE and R languages.
More informationRegular Languages and Finite Automata
Regular Languages and Finite Automata Theorem: Every regular language is accepted by some finite automaton. Proof: We proceed by induction on the (length of/structure of) the description of the regular
More informationCSE 105 THEORY OF COMPUTATION. Spring 2018 review class
CSE 105 THEORY OF COMPUTATION Spring 2018 review class Today's learning goals Summarize key concepts, ideas, themes from CSE 105. Approach your final exam studying with confidence. Identify areas to focus
More informationTime Complexity (1) CSCI Spring Original Slides were written by Dr. Frederick W Maier. CSCI 2670 Time Complexity (1)
Time Complexity (1) CSCI 2670 Original Slides were written by Dr. Frederick W Maier Spring 2014 Time Complexity So far we ve dealt with determining whether or not a problem is decidable. But even if it
More informationComputability and Complexity
Computability and Complexity Decidability, Undecidability and Reducibility; Codes, Algorithms and Languages CAS 705 Ryszard Janicki Department of Computing and Software McMaster University Hamilton, Ontario,
More informationComplexity Theory Part I
Complexity Theory Part I Outline for Today Recap from Last Time Reviewing Verifiers Nondeterministic Turing Machines What does nondeterminism mean in the context of TMs? And just how powerful are NTMs?
More informationCSE 105 THEORY OF COMPUTATION
CSE 105 THEORY OF COMPUTATION "Winter" 2018 http://cseweb.ucsd.edu/classes/wi18/cse105-ab/ Today's learning goals Sipser Ch 4.2 Trace high-level descriptions of algorithms for computational problems. Use
More informationACS2: Decidability Decidability
Decidability Bernhard Nebel and Christian Becker-Asano 1 Overview An investigation into the solvable/decidable Decidable languages The halting problem (undecidable) 2 Decidable problems? Acceptance problem
More informationV Honors Theory of Computation
V22.0453-001 Honors Theory of Computation Problem Set 3 Solutions Problem 1 Solution: The class of languages recognized by these machines is the exactly the class of regular languages, thus this TM variant
More informationFinish K-Complexity, Start Time Complexity
6.045 Finish K-Complexity, Start Time Complexity 1 Kolmogorov Complexity Definition: The shortest description of x, denoted as d(x), is the lexicographically shortest string such that M(w) halts
More informationCSCI 2200 Foundations of Computer Science Spring 2018 Quiz 3 (May 2, 2018) SOLUTIONS
CSCI 2200 Foundations of Computer Science Spring 2018 Quiz 3 (May 2, 2018) SOLUTIONS 1. [6 POINTS] For language L 1 = {0 n 1 m n, m 1, m n}, which string is in L 1? ANSWER: 0001111 is in L 1 (with n =
More informationDecidability and Undecidability
Decidability and Undecidability Major Ideas from Last Time Every TM can be converted into a string representation of itself. The encoding of M is denoted M. The universal Turing machine U TM accepts an
More informationCS21 Decidability and Tractability
CS21 Decidability and Tractability Lecture 8 January 24, 2018 Outline Turing Machines and variants multitape TMs nondeterministic TMs Church-Turing Thesis So far several models of computation finite automata
More informationAdvanced topic: Space complexity
Advanced topic: Space complexity CSCI 3130 Formal Languages and Automata Theory Siu On CHAN Chinese University of Hong Kong Fall 2016 1/28 Review: time complexity We have looked at how long it takes to
More informationNP-Complete and Non-Computable Problems. COMP385 Dr. Ken Williams
NP-Complete and Non-Computable Problems COMP385 Dr. Ken Williams Start by doing what s necessary; then do what s possible; and suddenly you are doing the impossible. Francis of Assisi Our Goal Define classes
More informationComputation Histories
208 Computation Histories The computation history for a Turing machine on an input is simply the sequence of configurations that the machine goes through as it processes the input. An accepting computation
More informationNon-emptiness Testing for TMs
180 5. Reducibility The proof of unsolvability of the halting problem is an example of a reduction: a way of converting problem A to problem B in such a way that a solution to problem B can be used to
More informationTuring Machines Part III
Turing Machines Part III Announcements Problem Set 6 due now. Problem Set 7 out, due Monday, March 4. Play around with Turing machines, their powers, and their limits. Some problems require Wednesday's
More informationFORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
15-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY THURSDAY APRIL 3 REVIEW for Midterm TUESDAY April 8 Definition: A Turing Machine is a 7-tuple T = (Q, Σ, Γ, δ, q, q accept, q reject ), where: Q is a
More informationMore Turing Machines. CS154 Chris Pollett Mar 15, 2006.
More Turing Machines CS154 Chris Pollett Mar 15, 2006. Outline Multitape Turing Machines Nondeterministic Turing Machines Enumerators Introduction There have been many different proposals for what it means
More informationTheory of Computation
Theory of Computation Lecture #10 Sarmad Abbasi Virtual University Sarmad Abbasi (Virtual University) Theory of Computation 1 / 43 Lecture 10: Overview Linear Bounded Automata Acceptance Problem for LBAs
More informationCS6901: review of Theory of Computation and Algorithms
CS6901: review of Theory of Computation and Algorithms Any mechanically (automatically) discretely computation of problem solving contains at least three components: - problem description - computational
More informationChapter 3: The Church-Turing Thesis
Chapter 3: The Church-Turing Thesis 1 Turing Machine (TM) Control... Bi-direction Read/Write Turing machine is a much more powerful model, proposed by Alan Turing in 1936. 2 Church/Turing Thesis Anything
More informationDecision Problems with TM s. Lecture 31: Halting Problem. Universe of discourse. Semi-decidable. Look at following sets: CSCI 81 Spring, 2012
Decision Problems with TM s Look at following sets: Lecture 31: Halting Problem CSCI 81 Spring, 2012 Kim Bruce A TM = { M,w M is a TM and w L(M)} H TM = { M,w M is a TM which halts on input w} TOTAL TM
More informationIntroduction to Turing Machines. Reading: Chapters 8 & 9
Introduction to Turing Machines Reading: Chapters 8 & 9 1 Turing Machines (TM) Generalize the class of CFLs: Recursively Enumerable Languages Recursive Languages Context-Free Languages Regular Languages
More informationApproximation Algorithms
Approximation Algorithms Announcements Problem Set 9 due right now. Final exam this Monday, Hewlett 200 from 12:15PM- 3:15PM Please let us know immediately after lecture if you want to take the final at
More informationDecidability (intro.)
CHAPTER 4 Decidability Contents Decidable Languages decidable problems concerning regular languages decidable problems concerning context-free languages The Halting Problem The diagonalization method The
More informationTURING MAHINES
15-453 TURING MAHINES TURING MACHINE FINITE STATE q 10 CONTROL AI N P U T INFINITE TAPE read write move 0 0, R, R q accept, R q reject 0 0, R 0 0, R, L read write move 0 0, R, R q accept, R 0 0, R 0 0,
More informationFORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
5-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY 5-453 FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY YOU NEED TO PICK UP THE SYLLABUS, THE COURSE SCHEDULE, THE PROJECT INFO SHEET, TODAY S CLASS NOTES
More informationCSE 105 Theory of Computation
CSE 105 Theory of Computation http://www.jflap.org/jflaptmp/ Professor Jeanne Ferrante 1 Undecidability Today s Agenda Review and More Problems A Non-TR Language Reminders and announcements: HW 7 (Last!!)
More informationPrinciples of Computing, Carnegie Mellon University. The Limits of Computing
The Limits of Computing Intractability Limits of Computing Announcement Final Exam is on Friday 9:00am 10:20am Part 1 4:30pm 6:10pm Part 2 If you did not fill in the course evaluations please do it today.
More informationLecture Notes: The Halting Problem; Reductions
Lecture Notes: The Halting Problem; Reductions COMS W3261 Columbia University 20 Mar 2012 1 Review Key point. Turing machines can be encoded as strings, and other Turing machines can read those strings
More informationThe Turing Machine. Computability. The Church-Turing Thesis (1936) Theory Hall of Fame. Theory Hall of Fame. Undecidability
The Turing Machine Computability Motivating idea Build a theoretical a human computer Likened to a human with a paper and pencil that can solve problems in an algorithmic way The theoretical provides a
More informationTheory of Computation (IX) Yijia Chen Fudan University
Theory of Computation (IX) Yijia Chen Fudan University Review The Definition of Algorithm Polynomials and their roots A polynomial is a sum of terms, where each term is a product of certain variables and
More informationDM17. Beregnelighed. Jacob Aae Mikkelsen
DM17 Beregnelighed Jacob Aae Mikkelsen January 12, 2007 CONTENTS Contents 1 Introduction 2 1.1 Operations with languages...................... 2 2 Finite Automata 3 2.1 Regular expressions/languages....................
More informationLecture 12: Mapping Reductions
Lecture 12: Mapping Reductions October 18, 2016 CS 1010 Theory of Computation Topics Covered 1. The Language EQ T M 2. Mapping Reducibility 3. The Post Correspondence Problem 1 The Language EQ T M The
More informationDRAFT. Diagonalization. Chapter 4
Chapter 4 Diagonalization..the relativized P =?NP question has a positive answer for some oracles and a negative answer for other oracles. We feel that this is further evidence of the difficulty of the
More informationComputability Crib Sheet
Computer Science and Engineering, UCSD Winter 10 CSE 200: Computability and Complexity Instructor: Mihir Bellare Computability Crib Sheet January 3, 2010 Computability Crib Sheet This is a quick reference
More informationHomework Assignment 6 Answers
Homework Assignment 6 Answers CSCI 2670 Introduction to Theory of Computing, Fall 2016 December 2, 2016 This homework assignment is about Turing machines, decidable languages, Turing recognizable languages,
More informationComputational Models Lecture 9, Spring 2009
Slides modified by Benny Chor, based on original slides by Maurice Herlihy, Brown University. p. 1 Computational Models Lecture 9, Spring 2009 Reducibility among languages Mapping reductions More undecidable
More informationPart I: Definitions and Properties
Turing Machines Part I: Definitions and Properties Finite State Automata Deterministic Automata (DFSA) M = {Q, Σ, δ, q 0, F} -- Σ = Symbols -- Q = States -- q 0 = Initial State -- F = Accepting States
More informationCS3719 Theory of Computation and Algorithms
CS3719 Theory of Computation and Algorithms Any mechanically (automatically) discretely computation of problem solving contains at least three components: - problem description - computational tool - analysis
More informationUndecidability. We are not so much concerned if you are slow as when you come to a halt. (Chinese Proverb)
We are not so much concerned if you are slow as when you come to a halt. (Chinese Proverb) CS /55 Theory of Computation The is A TM = { M,w M is a TM and w L(M)} A TM is Turing-recognizable. Proof Sketch:
More informationArtificial Intelligence. 3 Problem Complexity. Prof. Dr. Jana Koehler Fall 2016 HSLU - JK
Artificial Intelligence 3 Problem Complexity Prof. Dr. Jana Koehler Fall 2016 Agenda Computability and Turing Machines Tractable and Intractable Problems P vs. NP Decision Problems Optimization problems
More informationCS154, Lecture 17: conp, Oracles again, Space Complexity
CS154, Lecture 17: conp, Oracles again, Space Complexity Definition: conp = { L L NP } What does a conp computation look like? In NP algorithms, we can use a guess instruction in pseudocode: Guess string
More informationProblems, and How Computer Scientists Solve Them Manas Thakur
Problems, and How Computer Scientists Solve Them PACE Lab, IIT Madras Content Credits Introduction to Automata Theory, Languages, and Computation, 3rd edition. Hopcroft et al. Introduction to the Theory
More informationLecture 16: Time Complexity and P vs NP
6.045 Lecture 16: Time Complexity and P vs NP 1 Time-Bounded Complexity Classes Definition: TIME(t(n)) = { L there is a Turing machine M with time complexity O(t(n)) so that L = L(M) } = { L L is a language
More information3130CIT Theory of Computation
GRIFFITH UNIVERSITY School of Computing and Information Technology 3130CIT Theory of Computation Final Examination, Semester 2, 2006 Details Total marks: 120 (40% of the total marks for this subject) Perusal:
More informationCS 154 Introduction to Automata and Complexity Theory
CS 154 Introduction to Automata and Complexity Theory cs154.stanford.edu 1 INSTRUCTORS & TAs Ryan Williams Cody Murray Lera Nikolaenko Sunny Rajan 2 Textbook 3 Homework / Problem Sets Homework will be
More informationWhat languages are Turing-decidable? What languages are not Turing-decidable? Is there a language that isn t even Turingrecognizable?
} We ll now take a look at Turing Machines at a high level and consider what types of problems can be solved algorithmically and what types can t: What languages are Turing-decidable? What languages are
More informationTHEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET
THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET Regular Languages and FA A language is a set of strings over a finite alphabet Σ. All languages are finite or countably infinite. The set of all languages
More informationNP, polynomial-time mapping reductions, and NP-completeness
NP, polynomial-time mapping reductions, and NP-completeness In the previous lecture we discussed deterministic time complexity, along with the time-hierarchy theorem, and introduced two complexity classes:
More informationCS154, Lecture 10: Rice s Theorem, Oracle Machines
CS154, Lecture 10: Rice s Theorem, Oracle Machines Moral: Analyzing Programs is Really, Really Hard But can we more easily tell when some program analysis problem is undecidable? Problem 1 Undecidable
More information