Minimum Pac-Man Distance

Geometry Level 5

Note: the given solution is incorrect, sorry for the inconvenience! Hopefully the solution will be corrected soon.


If the ghosts weren’t in the way, what would be the minimum distance required for Pac-Man to eat all the Pac-dots (and Power Pellets) in the maze?

Assume that each consecutive Pac-dot is one unit apart and that Pac-Man travels one unit to reach the first Pac-dot.


The answer is 294.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

David Vreken
Sep 5, 2018

Here is one route with a distance of 294 294 :

(Thanks to @Jon Haussmann for providing a better path for the top section.)


Ideally, Pac-man would eat one pellet per one unit move, but given the layout of the board, this is not possible. One strategy is to minimize the amount of "wasted" unit moves in which Pac-man does not eat any pellets. Each intersection point with an odd number of paths coming out of it will have some wasted unit moves, and to minimize the waste we want to overlap the smallest path out of it. For example, in the diagram below, the red point has three paths out of it, each going to the three different green intersection points. Two paths are 3 3 units long, and one is 9 9 units long. We would want to avoid overlapping the 9 9 unit path because it is the biggest, and choose to overlap one of the other two 3 3 unit paths to minimize wasted unit moves.

There are still a lot of possibilities to consider, but this strategy helps. I would imagine a computer would be necessary to prove a minimum path, but it's still a fun exercise to think about.

How can you prove that there is/are no route/routes with length 301 \leq 301 ?

Aryaman Maithani - 2 years, 9 months ago

No this arrangement is totally wrong .

D K - 2 years, 8 months ago

You're on the right track. Convert this to a graph theory question:

(For simplicity, I'm going to assume that we want a closed path.)

  • Any walk that covers all points can be converted to a Hamiltonian path, where we allow for multiple edges between vertices.
  • A Hamiltonian path exists if and only if all vertices have even degree.
  • So, starting from the original Pac Man graph, where each vertex is a (non-trivial) intersection, and edges between 2 vertices have a weight equal to the distance between them, we're interested in "What is the minimum number sum of weights of the edges we have to add so that the vertices all have even degree?"

Note: I believe that this is NP hard in general. But in this case, it's much easier to "look".
There are different ways to get the minimum. One of them is Jon's image above.

Calvin Lin Staff - 2 years, 2 months ago

1 pending report

Vote up reports you agree with

×

Problem Loading...

Note Loading...

Set Loading...