Presentation is loading. Please wait.

Presentation is loading. Please wait.

One Hull of A Rain Forest Green Computing Computer Science Neil Gordon January 14 2011.

Similar presentations


Presentation on theme: "One Hull of A Rain Forest Green Computing Computer Science Neil Gordon January 14 2011."— Presentation transcript:

1 One Hull of A Rain Forest Green Computing Computer Science Neil Gordon January 14 2011

2 The Travelling Salesman problem

3 What is it? Change the way you think about Hull | 6 January 2011 | 3 Suppose Bob the salesman has been given a list of towns to visit to try selling his new products He knows how far it is from one town to the next But wants to decide what is the best way to travel around them 4 5 7 Hull Beverley Tickton York 48 36 33 ?

4 The Problem Change the way you think about Hull | 4 Given a list of places (cities) with distances between, what is the shortest journey to travel to each location once only It is hard – we will see how hard as we go through It isn’t a new problem – it dates from the 1800s – when it was thought of by the mathematician William Hamilton – look him up on the Internet to find out more Since then, it has been studied by mathematicians, computer scientists and lots of others….

5 Why is Bob’s problem relevant to saving rainforests and your one hull of a Rainforest project? Change the way you think about Hull | 5 There are a number of reasons – try listing them in your groups. Describe the reason, and why it is relevant to rainforests Some of the reasons are: Shorter journeys which saves – Time – for someone's job so that saves money as well – Fuel and resources – less travel means less petrol (or other fuel). That saves money AND helps to reduce the output of fossil fuels

6 Transport and the environment Change the way you think about Hull | 6 January 2011 | 6 Rainforests play a key role in the Earth’s eco-systems – who can explain what these are? They provide habitats They are the lungs of the planet, converting carbon-dioxide to oxygen. However, rainforests face a number of challenges acid rain – caused by pollution climate change – the world seems to be getting hotter. Caused by pollution, especially transport…..

7 How could you attempt to solve it Change the way you think about Hull | 7 Given a simple example, try it in your groups using page 1 of the hand-out First for the maps with 3 towns Then for the map with 4 towns 4 5 7 Hull Beverley Tickton 4 5 7 Hull Beverley Tickton York 48 36 33 4 12 7 Hull Beverley Paull

8 How many possibilities are there? Change the way you think about Hull | | 8 How many possible routes could there be? Suppose you have 2 places to visit Or 3 places Or 4 - In your groups, try to work this one out – do the routes for 5 places that is on the back of the handout The answer is: see the next slide

9 Some example solutions Change the way you think about Hull | 6 January 2011 | 9 As the numbers get big, it quickly becomes hard to solve If N=2 there are 2 possible routes if N=3 there are 6 if N=4 there are 24 What do you think for 5 places to visit? if N=5 there are 120 different routes If N=6 there would be 720 possible routes It then gets much bigger very quickly…. To visit the top 10 cities, there are 3628800 possible solutions. [This is assuming there is only 1 road between each city. If there were more, it gets harder to solve…] To find the shortest route to visit the top 20 visitor attractions you would have to check 2432902008176640000 different routes. Even for a computer that takes a long time.

10 Applications Change the way you think about Hull | | 10 Can you think of anything that needs to solve this type of problem a lot? If your parents/carers/family have a SatNAV in their car, then that does this in the case where you want to travel between two places, sometimes with a third place to travel through. This is still complicated – as there are lots of roads and they measure different things to find the best route What criteria do they use to decide the best route?

11 More applications Change the way you think about Hull | 6 January 2011 | 11 Delivering goods – whether a supermarket is delivering a shopping order to your house, or a lorry is taking goods to a supermarket, reducing the number and length of journeys saves time and fuel If we changed the numbers from miles to the amount of material needed to make the roads, it would also help to design efficient roads. Replacing the towns with components on a circuit board – and this problem is helping to design efficient computer circuits In fact there are lots and lots of applications all around us

12 Solving the Travelling Salesman problem Change the way you think about Hull | 12 The only way to guarantee the best solution is to try all possible routes There are some different approaches to try to make it easier, for example Start by only searching the shortest distances Use tree searches and other approaches – if you do computing later in your studies you will meet these and learn how to go about solving these problems

13 For teachers… Change the way you think about Hull | 6 January 2011 | 13 We say there is no shorter way of doing this (it is called NP- hard in Computer Science – this means Nondeterministic Polynomial) The number of possible routes (assuming exactly one route between EACH pair of locations) is N! where N is the number of places to travel to– this means it quickly gets very big when there are a lot of locations.

14 What can you do to reduce your carbon footprint? Change the way you think about Hull | 6 January 2011 | 14 In your groups, identify 1 thing per person that you can do at school, at home or travelling between them to reduce your carbon footprint Carbon calculator: http://www.cooltheworld.co.uk/kidscarbonquiz.html http://www.cooltheworld.co.uk/kidscarbonquiz.html

15 Summary Change the way you think about Hull | 6 January 2011 | 15 We have explored a few aspects of the Bob’s problem We have seen that this is related to reducing the production of carbon and to helping protect the rain forests We can use computers to help solve this sort of problem Computers can help and assist in dealing with other problems too that can help in understanding and protecting the environment.


Download ppt "One Hull of A Rain Forest Green Computing Computer Science Neil Gordon January 14 2011."

Similar presentations


Ads by Google