# Puzzles/Statistical puzzles/A Bug Running

Puzzles | Statistical puzzles | A bug running

Consider a chess board of dimension ${\displaystyle 8\times 8}$:

 -- -- -- -- -- -- -- --
|  |  |  |  |  |  |  | F|
-- -- -- -- -- -- -- --
|  |  |  |  |  |  |  |  |
-- -- -- -- -- -- -- --
|  |  |  |  |  |  |  |  |
-- -- -- -- -- -- -- --
|  |  |  |  |  |  |  |  |
-- -- -- -- -- -- -- --
|  |  |  |  |  |  |  |  |
-- -- -- -- -- -- -- --
|  |  |  |  |  |  |  |  |
-- -- -- -- -- -- -- --
|  |  |  |  |  |  |  |  |
-- -- -- -- -- -- -- --
|B |  |  |  |  |  |  |  |
-- -- -- -- -- -- -- --


• A bug sits in the lower left corner and intends to reach the upper right corner, where food is present ready to be consumed. Given that the bug can only move either right or up, how many possible unique paths lead to the food?
• Given the board is ${\displaystyle n\times n}$, how many paths do exist?
• Given the board is three dimensional ${\displaystyle n\times n\times n}$, bug and food in opposite corners and movements are steps in positive directions in either dimension, how many paths do exist?
• Given the board is ${\displaystyle k}$ dimensional ${\displaystyle n^{k}}$, bug and food in opposite corners and movements are steps in positive directions in either dimension, how many paths do exist?

Consider again the ${\displaystyle 8\times 8}$ setting.

 -- -- -- -- -- -- -- --
|  |  |  |  |  |  |  | F|
-- -- -- -- -- -- -- --
|  |  |  |  |  |  |  |  |
-- -- -- -- -- -- -- --
|  |  |  |  |  |  |  |  |
-- -- -- -- -- -- -- --
|  |  |  | *| *|  |  |  |
-- -- -- -- -- -- -- --
|  |  |  | *| *|  |  |  |
-- -- -- -- -- -- -- --
|  |  |  |  |  |  |  |  |
-- -- -- -- -- -- -- --
|  |  |  |  |  |  |  |  |
-- -- -- -- -- -- -- --
|B |  |  |  |  |  |  |  |
-- -- -- -- -- -- -- --


• The question again is about the number of paths, but this time 4 squares are blocked in the center (marked by '*'s) that the bug is not allowed to touch (for they are sticky with glue and would trap the bug thus making it starve). What is the number of allowed paths?