Mine Shaft

Deep underground, several diamonds are buried. Dig a mine shaft to reach all of them. Of course, to avoid collapses, no two shafts can be dug too close together.

A mine shaft connects all diamonds in the diagram. The system splits off to reach the diamonds, and ends at every diamond. Otherwise the shafts have no dead ends, and has no loops. The shafts do not touch, not even diagonally. The numbers above and next to the diagram indicate how many pieces of shaft occupy each row and column.


In this example we have to connect four diamonds. To start, note that in the top row there are three pieces of shaft, one of which is occupied by a diamond. This means that the shaft has to go two cells to the left from the diamond, and then down. Now it is immediately connected with the second diamond, and the second row is also full, so the shaft continues down. Now the third row is also full, and the shaft has to continue down once more. But the second column only has four pieces of shaft, so this is now also full. To reach the remaining two diamonds, the shaft has to split here. The left part immediately reaches the diamond, and the right part reaches the last diamond after making a detour through the bottom row to fill the four shaft pieces there.

Puzzles in this genre.