Pou connect game algorithm

Viewed 1365

Recently I played a simple game on android called Pou, and one of it's inside games was a connect the dots on the field game. Here is a screenshot to better explain the situation.

enter image description here

At the beginning of the game you are given n-pairs of dots and you have to connect the same colored ones. While doing this you need to fill the matrix field.

Generating such a field is not a problem, but how can I be sure that it is solvable?

My question would be how can I generate a field that has a solution? Is this a graph problem? Or some kind of a connectivity problem?

Of course I can always produce a brute force solution, but I am looking for something better

1 Answers
Related