The Knight’s Tour.

Slides:



Advertisements
Similar presentations
Traveling Salesperson Problem
Advertisements

Breakfast Bytes: Pigeons, Holes, Bridges and Computers Alan Kaylor Cline November 24, 2009.
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Great Theoretical Ideas in Computer Science for Some.
CS 206 Introduction to Computer Science II 11 / 07 / 2008 Instructor: Michael Eckmann.
A Knight’s Tour A decision problem. A Legal Move Can only move 1 x 2...Or 2 x 1.
Koenigsberg bridge problem It is the Pregel River divided Koenigsberg into four distinct sections. Seven bridges connected the four portions of Koenigsberg.
CS 206 Introduction to Computer Science II 11 / 10 / 2008 Instructor: Michael Eckmann.
IEOR266 © Classification of MCNF problems.
CS 206 Introduction to Computer Science II 11 / 05 / 2008 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 03 / 30 / 2009 Instructor: Michael Eckmann.
A Trip to England Nicholas Grice Angela Miranda A2 Computer Science 1.
In this investigation you will look at the moves a Knight from a chess set might make on a 100 square.
Graph an equation in standard form
Scott Perryman Jordan Williams.  NP-completeness is a class of unsolved decision problems in Computer Science.  A decision problem is a YES or NO answer.
Excursions in Modern Mathematics, 7e: Copyright © 2010 Pearson Education, Inc. 6 The Mathematics of Touring 6.1Hamilton Paths and Hamilton Circuits.
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett.
Connected Components Fun with graphs, searching, and queues.
Hexahexaflexagon Automata Paul Curzon Queen Mary University of London With support from Google,
Hard problems in computer science Prof. Noah Snavely CS1114
Explorers need maps: Abstraction, representations and graphs Paul Curzon Queen Mary University of London
Graphs A ‘Graph’ is a diagram that shows how things are connected together. It makes no attempt to draw actual paths or routes and scale is generally inconsequential.
The Travelling Salesperson Problem A salesperson needs to visit London, Nottingham, Manchester and Leeds, he lives in Birmingham. Find the shortest route.
Quadratic Equations An Introduction
Consultant Presentation Group B5. Presentation Outline Introduction How to design by Group A5 Future Data Structure Interface Future Conclusion.
Euler Paths and Circuits. The original problem A resident of Konigsberg wrote to Leonard Euler saying that a popular pastime for couples was to try.
Chapter 6: Graphs 6.1 Euler Circuits
M Clements Formal Network Theory. Introduction Practical problem – The Seven Bridges of Königsberg Network graphs Nodes & edges Degrees Rules/ axioms.
Example 3 In parts of New York City, the blocks between streets are called short blocks. There are 20 short blocks per mile. Blocks between avenues are.
Materials Reminders. Get out your agenda if you see your name below. I would like to have you in my FLEX Wednesday. Period 2Period 7.
Hamilton Paths and Circuits 1 Click to Start 2 3 Start End.
Management Science 461 Lecture 7 – Routing (TSP) October 28, 2008.
The Problem A gallant and brave knight must traverse the lands to rescue the princess and claim his rightful place in the kingdom A Knight on a board.
Quadratic Equations An Introduction SPI Solve quadratic equations and systems, and determine roots of a higher order polynomial.
ELIMINATION AND GRAPHING Systems of Nonlinear Equations.
Quadratic Equations An Introduction.
Functions and relations
3.1 Fundamentals of algorithms
Quadratic Equations An Introduction
EECS 203 Lecture 19 Graphs.
2.00_Study of Biology_Characteristics of Life
The Knight’s Tour Graphs, Algorithms, Abstraction and Decomposition
Day 20: Completing the Square! Oh, baby!
Great Theoretical Ideas in Computer Science
Computational Thinking
Introduction to Data Structure
CSE 20: Discrete Mathematics for Computer Science Prof. Shachar Lovett
Functions and relations
Quadratic Equations An Introduction
Functions.
Lesson Objectives Aims Understand the following:
Approximation algorithms
Graphs Chapter 13.
Solving 2 Step Equations EQ: How do I solve two-step equations?
Chapter 2: Business Efficiency Business Efficiency
USING GRAPHS TO SOLVE EQUATIONS
Review Day M2 Unit 1C: Day 8.
4. Computational Problem Solving
GET READY SETTLER ACTIVITY
Konigsberg- in days past.
Decision Maths Graphs.
Route Inspection Which of these can be drawn without taking your pencil off the paper and without going over the same line twice? If we introduce a vertex.
Networks Kruskal’s Algorithm
Abstraction and Hierarchy
Methodical Counting 01-LCR-02.
Backtracking and Branch-and-Bound
POWER CHALLENGES Several Ways To Solve 7 CHALLENGES.
Computational Thinking
Quiz: Computational Thinking
Computational Thinking (How to think like a computer scientist)
Presentation transcript:

The Knight’s Tour

The Problem A gallant and brave knight must traverse the lands to rescue the princess and claim his rightful place in the kingdom A Knight on a board has to visit every square without passing through the same square more than once. Then returns to the starting square

Give students a knight and see if they can solve it

The tourists get upset if they visit the same place twice A similar Problem? You are a tour guide and must come up with a tour that gets a tourist from their London hotel to all the city sights and back to their hotel at the end of the day. The tourists get upset if they visit the same place twice How might we solve this?

Consider another way Computer Scientist create a diagram This is called a Graph It is easier to plan and find the solution

Abstraction Using abstraction to make a model Hides all the detail apart from what is needed Abstraction is one of the four cornerstones of Computer Science. It involves filtering out – essentially, ignoring the characteristics that we don't need in order to concentrate on those that we do.

1. Use Abstraction to solve the Knight’s Tour 1 , 7 1, 9 1, 6

Use Abstraction to solve the Knight’s Tour 1 Add the nodes which the Knight can go to from a particular square. 6 9 7

Use Abstraction to solve the Knight’s Tour 1 Continue until all the Boxes have numbers in them. This will create a ‘messy’ diagram of the possible paths that the Knight can go to 2 3 6 8 9 10 7

Another way to Use Abstraction to solve the Knight’s Tour Start at a square and move to the next square that you can Number it and draw a line between the points Then jump to the next free square Repeat until you cannot move any further Select a new square, repeat steps 1, 2, 3, 4 1 2 6 7 8 12

RESULT

RESULT

RESULT

RESULT

Solution Now you have the diagram of the route You need to tidy it up into a graph form so that it is easy to view Ensuring that all the correct nodes touch each other pull the route apart and make it easier to view Create a nice diagram

What is the final solution?

What have you learnt?