jump to navigation

Problem of the Day #392: Brandon the Bee April 14, 2012

Posted by Saketh in : potd , trackback

Brandon the Bee is keeping watch over his hive, which is laid out in a hexagonal grid. Being a very busy bee, he has some very strict guidelines that he follows whenever he takes a tour of the grid:

  1. Brandon never steps outside the boundaries of the hive.
  2. He can only travel between adjacent cells.
  3. He must visit each cell exactly once.
  4. Cells are grouped in clusters, and he must enter and exit each one exactly once.
  5. Some cell borders are blocked off by dried honey. He cannot cross these.
  6. Brandon must start at the specified starting position.

Consider, for example, the hive shown below. Note that there are no blocked borders in this example.

beehive

Devise an efficient algorithm for finding a valid route for Brandon to take.

Comments»

no comments yet - be the first?