Hi,
Given that the digits 1 through to 9 can be re-arranged 362,880 different ways ( permutations ) or 9P9 how could you mutually exclude all the sub-sets of these where the 1st 3 digits are the same ( but in any order ), the 4th to 6th digits are the same ( but in any order ) such that the last three digits are different anyway by default.
What i am basically after doing ( programatically ) is checking the possible total solutions for Sudoku so the 1st line could be>>
123456789
but the 2nd line can't have 1, 2 or 3 in the 1st 3 characters,
can't also have 4, 5 or 6 in characters 4 to 6 and for the last 3 can't have
7, 8 or 9
Repeat as per Sudoku rules down to the last or 9th line.
As a side tought i've wondered if nought could be used in a 9 by 9 grid, how many solutions there now are?
I've thought of bit-wise masking so i'm posting this in the programmers forum too.
In case you are curious 10P9 yields 3,628,880 ( ten times as many variations for the 1st line alone ).
I would be curious how to do this for any size of grid using say
0 to 9, A to Z and a to z as characters.
Regards,
Dr M.