Presentation is loading. Please wait.

Presentation is loading. Please wait.

1.5 Intractable problems.

Similar presentations


Presentation on theme: "1.5 Intractable problems."— Presentation transcript:

1 1.5 Intractable problems

2 Starter Divide students into groups
Give each group a set of tiles + scissors Arrange tiles into a 3x3 grid so that the colour of each tile edge matches the colour of the tile edge next to it and all the arrows are pointing upwards 10 minutes to find a solution

3 Tile problem Could you find a solution?
If yes, how many solutions did you find? Groups given the first set of tiles will not be able to find a solution Groups given the second set of tiles should be able to find a solution Groups given the third set of tiles will not be able to find a solution Can an algorithm be written that will be able to decide if an area of any size can be tiled by a particular set of tiles? No, this is a non-computable problem

4 Intractable problems Are problems which cannot be solved in a reasonable amount of time Problems with exponential (or worse) complexity The Travelling Salesman Problem is an example of an intractable problem

5 Tractable and intractable problems
Problems that have a reasonable (polynomial) time solutions are called tractable Problems that have no reasonable (polynomial) time solutions are called intractable A guessed solution to an intractable problem can be checked quickly. This is called an NP-type problem e.g. school timetabling.

6 Halting problem When you run a program it will either run for awhile and then stop (halt), or get stuck in an infinite loop and crash the machine If a program runs for a long time, do we conclude the program is stuck in a loop or that we have not allowed enough time for the program to calculate its output The halting problem asks ‘Is it possible to write a program that can tell given any program and its inputs and without executing the program, whether it will halt?’ A method to do this for any program has been proven to not exist. Link to proof presentation

7 Class work and Homework
Complete ‘Intractable problems’ exam style questions Answer questions 1-8 in A2 Computing book Work through the case study: computationally hard problems Read 1.6 Regular expressions, BNF and RPN pg 55-67


Download ppt "1.5 Intractable problems."

Similar presentations


Ads by Google