C algorithm to generate a random matrix NxM with binaries values (labyrinth where "true" values are "walkable"), calculate the tree of all the possible paths and print them out