I am challenged by a co-worker to develop an algorithm for the following puzzle.
There is a bridge that can only hold two trucks at a time. One end of the bridge, there are heavy granite blocks that need to be transported to the other end of the bridge. There are 5 trucks total. Each truck can take up to 5 granite blocks. It takes 10 minutes to load and unload a single block. Regardless of the weight, it takes 1 hr for a truck to travel across the bridge. There is only one person at each end of the bridge who loads and unloads the trucks so a truck needs to wait while another one is being loaded or unloaded.
Our goal is to transport as many blocks as possible in 12 hours. What is the total number of blocks we can transport in this time-frame? Would it help to have more than 5 trucks?
How would you approach this problem and develop an algorithm?