1 / 16

Recap

Recap. CS605: The Mathematics and Theory of Computer Science. Course Review. Mathematical Preliminaries Language Theory Regular Languages Finite State Machines/ Finite Automata – only one path of execution Nondeterministic FSM – multiple paths of execution Regular Expressions

Download Presentation

Recap

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Recap CS605: The Mathematics and Theory of Computer Science

  2. Course Review • Mathematical Preliminaries • Language Theory • Regular Languages • Finite State Machines/ Finite Automata – only one path of execution • Nondeterministic FSM – multiple paths of execution • Regular Expressions • Nonregular Languages and the Pumping Lemma – can only be used non regularity Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth

  3. Course Review • Context Free Languages • Context Free Grammars • Pushdown Automata – extra stack element over the FSM • Regular Languages subset of context free languages • Non-context free languages and the pumping lemma Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth

  4. Course Review • David Hilbert: • Is maths complete • Is maths consistent • Is maths decidable • Godel answered the first two – every sufficiently powerful formal system is either inconsistent or incomplete. • Third question remained open and brought about the concept of Turing machines. Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth

  5. Course Review • Turing would design machine which were unable to solve some problems – proving computation (and maths) was undecidable. • Turing Machines were models of human computation, and can do anything a real computer can do. • TM’s are only models and can never be built. Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth

  6. Course Review • TM’s can both read and write to its tape and can also move left or right. • There are three possible outcomes of a TM – accept, reject or loop. • A language is Turing-recognisable if some Turing machines recognises it. • A language is known as Turing-decidable if some Turing machine decides it. • TM’s have the ability to inspect another machines table of behaviour and emulate it. Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth

  7. Course Review • Multitape Turing have multiple tapes which they can read or write to. • Every multitape TM has an equivalent single tape TM. • Nondeterministic TM’s is a generalisation of the standard TM for which every configuration may yield none, or one, or more than one next configuration. • Every NTM has an equivalent DTM. Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth

  8. Course Review • A Universal TM is capable of simulating any other TM. • An abstract machine or programming language is Turing-complete if it has the same computational power as a UTM. • Church-Turing thesis states that if any mathematical construction can solve a problem then there is a TM that can solve the problem. Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth

  9. Course Review • Decidability of languages. • Showing that a language is decidable is the same as showing that the computational problem is decidable. • The Halting Problem: Will a TM accept a given input – in other words, will it always halt? • Use Diagonalisation Technique to show the Halting Problem is undecidable. Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth

  10. Course Review • Reductions are a way of converting one problem to another in such a way that a solution to the second one can be used to solve the first problem. • Undecidable Problems. • Completeness: The concept that a solution to a problem in a set can be applied to all others in the set. Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth

  11. Course Review • Time Complexity and O-Notation. • Complexity Classes. • PTIME (P) – class of decision problems solvable (or languages recognised) by DTM’s obeying a polynomial bound on its running time. • Some problems in P: Path, hcf, … • Problems for which a proof can be found in polynomial time. Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth

  12. Course Review • Tractability – what is feasible with limited resources, and intractability. • To place the intractable problems in a class a new class was designed – NP. • NP are the class of problems for which a solution can be verified in polynomial time. • Travelling salesman, Clique, Vertex-Cover, Subset-Sum… • Is NP = P? Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth

  13. Course Review • NP-Complete problems are the hardest in NP. • Polynomial-time reductions. • Proving Membership of NP-Completeness: • A language B is NP-Complete if it satisfies two conditions: • B is in NP • Every A in NP is polynomial time reducible to B. Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth

  14. Course Review • SAT was proven to be NP-Complete by Cook. • As 3SAT is a special case of the SAT problem it is therefore NP-Complete. • We use 3SAT to prove that other problems are NP-Complete. Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth

  15. Pointers • If you are asked to prove a language is regular: design a FSM to recognise it. • If you are asked to prove a language is irregular: use the Pumping Lemma. • If you are asked to prove a language is context free: design a PDA to recognise it. • If you are asked to prove a language is not context-free: use the Pumping Lemma. Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth

  16. Pointers • Decidability = can it be either accepted or rejected for every possible input on a machine? • Verifiability = can we verify that a solution to the problem is correct? • If you are asked to show that a problem is NP-Complete then show that a problem already shown to be in NP-Complete can be reduced to it. Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth

More Related