Download presentation

Presentation is loading. Please wait.

Published byWalter Greer Modified over 2 years ago

1
Recap CS605: The Mathematics and Theory of Computer Science

2
Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth 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

3
Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth 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

4
Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth 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.

5
Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth 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.

6
Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth 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.

7
Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth 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.

8
Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth 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.

9
Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth 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.

10
Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth 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.

11
Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth 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.

12
Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth 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?

13
Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth 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: 1.B is in NP 2.Every A in NP is polynomial time reducible to B.

14
Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth 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.

15
Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth 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.

16
Dr. A. Mooney, Dept. of Computer Science, NUI Maynooth 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.

Similar presentations

OK

CS 345: Chapter 9 Algorithmic Universality and Its Robustness

CS 345: Chapter 9 Algorithmic Universality and Its Robustness

© 2018 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Best ppt on rainwater harvesting Extensive reading ppt on ipad Ppt on writing process Ppt on power grid failure Ppt on 1857 the first war of independence Ppt on methods of gene transfer in plants Ppt on earth hour 2015 Ppt on 1st world war Ppt on the road not taken theme Ppt on zener diode basics