Note that the number of rows in the result list goes up exponentially with the number of positions.
10 positions with 3 possible values in each position yields 59048 rows.
Also note that if the number of values are different for each position, the algorithm will need to be tweaked.
It will still work but more infrastructure will need to be added for the different 'bases'.
Note also that the actually values (in this example: man, dog, cat) can be anything and can be different for each position.
That is just the display part and is independent of the algorithm.
10 positions with 3 possible values in each position yields 59048 rows.
Also note that if the number of values are different for each position, the algorithm will need to be tweaked.
It will still work but more infrastructure will need to be added for the different 'bases'.
Note also that the actually values (in this example: man, dog, cat) can be anything and can be different for each position.
That is just the display part and is independent of the algorithm.