I'm trying to recreate an electronic version of the game shown below:
The game is basically a connected graph, with the number representing the compulsory degrees of each vertex. The player must connect the entire graph while also keeping track of the degrees of each vertex.
My aim is to generate the correct graph, so that there will definitely be a solution. My initial idea is to randomly generate an adjacency matrix and check if the matrix is Eulerian. Does such an algorithm/formula exist?
Another method would be to generate a connected graph, then simply count the degree of every vertex and present that to the user. But I'd prefer the first option of generating an Eulerian graph from the start.
Perhaps I am even overcomplicating it. I'd be happy to hear of any other ideas.