2. The knights tour. A knight in chess can move either two
squares horizontal and one square vertical or two squares
vertical and one square horizontal. Example below.
Starter
4. Know what abstraction is
Understand that programs can be broken down into
smaller pieces
Be able to understand the terms modelling,
decomposition, generalisation and graphs
Objectives
5. Decomposition
Break a big task into several smaller
tasks
Instead of ‘visit all squares at least
once’,
break it down into a series of specific
steps
“Divide and conquer”
6. See if you can solve the problem
Main 1 – Puzzling Tours
16. Complete the graph of the knights tour to show all moves.
Main 2 – Knight’s Tour Graph
17. Modelling
• Create a representation of a system
• Hide unnecessary data
• Reduce complexity
18. Modelling
• Create a representation of a system
• Hide unnecessary data
(e.g. physical steps between moves)
• Reduce complexity
(e.g. having to jump over squares)
19. Generalisation
• There are many interpretations of
this word
• Replacing many things, with one thing
e.g. functions, mail merge
• Adapting the solution for one problem,
to solve another
• e.g. We turned Knight’s Tour into a
graph - we can use the same idea
elsewhere
27. We are going to use the map of the London Underground to
find the fastest route from one location to another. Remember
the Underground map is a graph and an abstraction.
Main 3 – Zombie Apocalypse
28. Abstraction
• Modelling
e.g. creating a graph
• Decomposition
e.g. listing the steps to find the
solution
• Generalisation
e.g. applying the same technique to
a similar problem
29. Abstraction
• Modelling
Ignore the physical distance between
stations
• Decomposition
Find the steps you need to reach
your goal
• Generalisation
Use this for a different journey in
London