Presentation is loading. Please wait.

Presentation is loading. Please wait.

??? Computing Science Inside… Graph Colouring ???.

Similar presentations


Presentation on theme: "??? Computing Science Inside… Graph Colouring ???."— Presentation transcript:

1 ??? Computing Science Inside… Graph Colouring ???

2 Constraint? Can you think of constraints in your life? –Time to be at school? –How much pocket money you get? –1 shower – 4 people to get ready for 8.30am? to constrain –to keep within closed bounds, to confine –to limit an action/activity, in response to limited resources

3 ??? Constraints Constraints lie at the heart of everyday problems –School timetable –Sudoku puzzle We'd like the computer to solve these –We first work out a strategy to solve these problems… –…then we can tell the computer what to do always remember, they're dumb/stupid things Key theme –By comparing problems together, we often find that a solution to one problem can be used to solve another

4 ??? Activity 1 – Map colouring Look at the map on Worksheet 1 –It has six countries, numbered 1-6 Colour this map using the FEWEST colours –BUT any countries that share a border cannot be the same colour –No coloured pens? – use letters A, B, C… to represent colours How many colours did you need?

5 ??? Map Colouring How did you go about solving the problem? Which country did you start with? How did you decide which colour to choose? Is 3 the minimum? What are the constraints in this problem? Borders –Number of neighbours? Use as few colours as possible

6 ??? Activity 1 Was the task easy? –Imagine there were 4000 countries? Can we represent the map another way… –to make the problem easier to solve? How about this? This is abstraction –we've removed information The structure is known as a graph 1 2 4 5 3 6

7 ??? Using a Graph to represent a map How does the graph represent the map? Vertices: Countries Edge: Borders Why would this be better? Clearer structure Borders are easier to see Easy to represent in a computer 1 2 4 5 3 6

8 ??? Graph Representation representation using lists of numbers –1 – 2,3 –2 – 1,3,4,5 –3 – 1,2,4,6 –4 – 2,3,5,6 –5 – 2,4,6 –6 – 3,4,5 To colour the graph –Repeatedly Remove vertex with lowest connectivity Add this vertex to a record of those removed, held in order –Repeatedly Replace nodes in reverse order of removal, noting a legal colour each time

9 ??? Wireless Communications Do you know about Wireless Communication? Communications using radio waves- no wires! Radio, mobile phone, TV, GPRS, Bluetooth… Why don't they interfere with each other? Each uses a different frequency to communicate Do you ever hear interference? Car radio and mobile phone

10 ??? Activity 2 In mobile systems, –each mobile mast has a short range –reuse of frequencies is necessary –but problematic How to ensure reuse doesn't cause interference? Use your knowledge for Activity 1 to solve the problem on Worksheet 2 Freq 1 Freq 2 Freq 1

11 ??? Activity 2 Read the problem description on Worksheet 2 –Work out the minimum number of frequencies the company must buy –Consider the constraints… How could you represent the information from the table to make it easier to understand? –Clues: A graph? What are the constraints? What would be the vertices and edges?

12 ??? Activity 2 Have a go at solving the problem… Frequencies = colours –How many frequencies needed to colour the graph? Did using a graph make it easier than using the table? Would it be possible to do this manually for 4000+ base stations? Transform/abstract the computer to the graph colouring problem, and then get a computer to do it- much quicker!

13 ??? Activity 3 8 kinds of fish Some fish eat each other fish How would I work out a safe set of fishtank allocations so no fish was another's dinner? Other problems like this?

14 ??? Discussion and Conclusion Method for solving a problem –an algorithm – series of steps… computer can do this kind of rote work Graph colouring as a problem –and a way of solving the graph colouring problem Problem Abstraction Removed details from the problem Represented it in a way that we know how to solve – here, as a graph Key Computing Science techniques –find a common representation of a problem –an algorithm to solve problems so represented –learn to transform other problems into this representation Did you notice? This was brain work – no computer could do this


Download ppt "??? Computing Science Inside… Graph Colouring ???."

Similar presentations


Ads by Google