Recap CS 605 The Mathematics and Theory of

  • Slides: 16
Download presentation
Recap CS 605: The Mathematics and Theory of Computer Science

Recap CS 605: The Mathematics and Theory of Computer Science

Course Review • • Mathematical Preliminaries Language Theory Regular Languages Finite State Machines/ Finite

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

Course Review • Context Free Languages • Context Free Grammars • Pushdown Automata –

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

Course Review • David Hilbert: – Is maths complete – Is maths consistent –

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.

Course Review • Turing would design machine which were unable to solve some problems

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.

Course Review • TM’s can both read and write to its tape and can

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.

Course Review • Multitape Turing have multiple tapes which they can read or write

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 more than one next configuration. • Every NTM has an equivalent DTM.

Course Review • A Universal TM is capable of simulating any other TM. •

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.

Course Review • Decidability of languages. • Showing that a language is decidable is

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.

Course Review • Reductions are a way of converting one problem to another in

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.

Course Review • Time Complexity and O-Notation. • Complexity Classes. • PTIME (P) –

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.

Course Review • Tractability – what is feasible with limited resources, and intractability. •

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?

Course Review • • • NP-Complete problems are the hardest in NP. Polynomial-time reductions.

Course Review • • • NP-Complete problems are the hardest in NP. Polynomial-time reductions. Proving Membership of NPCompleteness: – 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.

Course Review • SAT was proven to be NP-Complete by Cook. • As 3

Course Review • SAT was proven to be NP-Complete by Cook. • As 3 SAT is a special case of the SAT problem it is therefore NP-Complete. • We use 3 SAT to prove that other problems are NP-Complete.

Pointers • If you are asked to prove a language is regular: design a

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.

Pointers • Decidability = can it be either accepted or rejected for every possible

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.