Game 1:
Let's assume our maze is 5x5 grids, and the starting point A is at (0,0), and the ending point B is at (4,4). Here are two possible paths:
Path 1 (marked in blue): A (0,0) - P (4,0) - Q (4,2) - R (2,2) - B (4,4)
Coordinates: (0,0) - (4,0) - (4,2) - (2,2) - (4,4)
Path 2 (marked in red): A (0,0) - X (2,0) - Y (2,4) - B (4,4)
Coordinates: (0,0) - (2,0) - (2,4) - (4,4)
To calculate the total distance, we can use the Manhattan distance formula which is simply the sum of horizontal and vertical distances between two points.
For Path 1:
The distance from A to P = 4; P to Q = 2; Q to R = 2; R to B = 4.
Total distance for Path 1 = 4 + 2 + 2 + 4 = 12 units
For Path 2:
The distance from A to X = 2; X to Y = 4; Y to B = 2.
Total distance for Path 2 = 2 + 4 + 2 = 8 units
Is either path the shortest possible path?
Path 2 is the shorter of the two paths, but to determine if Path 2 is the shortest possible, let's check the minimum required distance without the maze. The Manhattan distance from A to B without any obstacles is |4-0|+|4-0|=8. Since our Path 2 is equal to the minimum required distance from A to B, we can conclude that Path 2 is the shortest possible path.
Play
• For players of your maze game, the goal is to move from the starting point to
the ending point using the shortest possible path—the path that requires
traveling the least total distance.
• Players can only move through the maze in horizontal or vertical directions.
They cannot move diagonally or through polygons.
• Show and code two trial games. Use colored pencils or markers to draw two
different paths through the maze. Use coordinates to describe each path.
• The device will use the coordinates for each path to mathematically calculate
the total distance. Show how the device will calculate the total distance for
each trial path that you drew.
• Is either trial path the shortest possible path? Explain.
1 answer