Talk:Non-transitive dice: Difference between revisions

From Rosetta Code
Content added Content deleted
(also...)
Line 5: Line 5:
Should we not just keep the one that starts numerically smallest? --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 23:27, 7 September 2020 (UTC)
Should we not just keep the one that starts numerically smallest? --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 23:27, 7 September 2020 (UTC)
: As an aside, is it always the case that there is only one solution? Or is that just a coincidence? It would be nice to stop searching permutations early. --[[User:Chunes|Chunes]] ([[User talk:Chunes|talk]]) 00:59, 8 September 2020 (UTC)
: As an aside, is it always the case that there is only one solution? Or is that just a coincidence? It would be nice to stop searching permutations early. --[[User:Chunes|Chunes]] ([[User talk:Chunes|talk]]) 00:59, 8 September 2020 (UTC)
:: It is a coincidence of the 1..4 limit. While I didn't search for them, there are at least two triplets of 6 dice with 1..9 faces, as shown at the end of the Phix output. I have also just added two optimisations: First, when checking a set if any k/k+1 fail then I set [k+2..$] to l ensuring k+1 is incremented next, a 3-fold speedup. Second, I cached the cmpd() results, a 10-fold speedup. So it is now 30 times faster than it was before. --[[User:Petelomax|Pete Lomax]] ([[User talk:Petelomax|talk]]) 03:05, 8 September 2020 (UTC)

Revision as of 03:05, 8 September 2020

Exclude rotations?

If we have S < T, T < U and yet S > U then it follows we
also have T < U, U < S and yet T > S
as well as U < S, S < T and yet U > T - and that will be every single time, for every set, without fail.
Should we not just keep the one that starts numerically smallest? --Pete Lomax (talk) 23:27, 7 September 2020 (UTC)

As an aside, is it always the case that there is only one solution? Or is that just a coincidence? It would be nice to stop searching permutations early. --Chunes (talk) 00:59, 8 September 2020 (UTC)
It is a coincidence of the 1..4 limit. While I didn't search for them, there are at least two triplets of 6 dice with 1..9 faces, as shown at the end of the Phix output. I have also just added two optimisations: First, when checking a set if any k/k+1 fail then I set [k+2..$] to l ensuring k+1 is incremented next, a 3-fold speedup. Second, I cached the cmpd() results, a 10-fold speedup. So it is now 30 times faster than it was before. --Pete Lomax (talk) 03:05, 8 September 2020 (UTC)