Non-transitive dice: Difference between revisions
→{{header|Phix}}: bugfix: sort() ==> low_rotation()
(→{{header|Phix}}: bugfix: sort() ==> low_rotation()) |
|||
Line 344:
end if
end procedure
function low_rotation(sequence set)
integer k = find(sort(set)[1],set)
return set[k..$]&set[1..k-1]
end function
integer rotations
Line 378 ⟶ 383:
end if
if c=+1 then
res = append(res,
end if
end if
Line 513 ⟶ 518:
D16:{1,1,4,4}
D43:{1,3,3,3}▼
D88:{2,2,2,4}
▲ D43:{1,3,3,3}
(2 rotations omitted)
More verbose comparison of last result:
D16
====
Line 526 ⟶ 531:
D16:{1,1,4,4}
D43:{1,3,3,3}▼
D88:{2,2,2,4}
D91:{2,2,3,3}
▲ D43:{1,3,3,3}
(3 rotations omitted)
More verbose comparison of last result:
D16
====
Line 566 ⟶ 571:
D9945:{1,2,5,6,7,9}
D15705:{1,3,4,5,8,9}▼
D74825:{2,3,4,6,7,8}
▲ D15705:{1,3,4,5,8,9}
(2 rotations omitted)
D9945
====
Line 587 ⟶ 592:
D58:{1,1,1,2,4,4}
D87:{1,1,1,3,3,3}▼
D1556:{1,2,2,2,2,2}▼
D58:{1,1,1,2,4,4}▼
D88:{1,1,1,3,3,4}▼
D262:{1,1,2,2,2,4}
▲ D88:{1,1,1,3,3,4}
D58:{1,1,1,2,4,4}
D88:{1,1,1,3,3,4}▼
D1556:{1,2,2,2,2,2}
▲ D87:{1,1,1,3,3,3}
D58:{1,1,1,2,4,4}
▲ D1556:{1,2,2,2,2,2}
D88:{1,1,1,3,3,4}
▲ D58:{1,1,1,2,4,4}
D1557:{1,2,2,2,2,3}
▲ D88:{1,1,1,3,3,4}
(40662 omitted)
(81332 rotations omitted)
More verbose comparison of last result:
D58
====
|