coloin wrote:Excellent .... does the computation get any easier for the 5,6,7 [8,9] !!
Yes for the rookery count since R(5) = R(4), R(6) = R(3), R(7) = R(2), R(8) = R(1), and R(9) = R(0).
"5-rooreries minimal clues to compete" is in progress. So far the max is 9 and I expect ~50 5-rookeries to have this max.
coloin wrote:I am confused over the difference between a rookery and a template though !!dukuso wrote:one 9-rookery, contents don't matter.
i would say the rookery was the actual clues and the template was the position of the clue .... i think red ed did query this.
From your recent post it is clear now why there is confusion
- Code: Select all
So, the number of distinct 3-templates is 259272. The first and last of them alphabetically are respectively
......123...123...123............231...231...231............312...312...312......
..1..2..3.2..3..1.3..1..2....2..3..1.3..1..2.1..2..3....3.2.1...1.3....22....1.3.
The number of 3-rookeries having at least one valid 3-template is 92048 (confirming dukuso's count).
......111...111...111............111...111...111............111...111...111......
..1..1..1.1..1..1.1..1..1....1..1.1..1..1.1..1..1....1..1.1..1..1.1..1..1....1..1
I used these definitions
dukuso wrote:a k-rookery is a subset of the 81 cells in a 9*9 square which contains exactly k-cells from each row,column,block
a k-template is a k-rookery whose 9*k cells are filled with numbers from {1,2,..,k}, such that the rookery-cells from each row,column,block contain each digit from {1,..,k} exactly once
In addition, I generated 3-templates by combining disjoint 1-templates, which discards templates like this, where 1-template for digit 1 must share r9c3 with 1-template for digit 2. I didn't check the other example for uncompletable 2-rookery. The only uncompletable template I found is the following 4-template, and its corresponding 4-rookery.
- Code: Select all
....12.34.134..2...423..1...21.34...3..1...424..2...13.34....211...234..2...413..
....11.11.111..1...111..1...11....111...111..1...111...11.11...1..1...111..1...11
Actually, this suggests additional constrains to the definitions:
- a k-rookery must have at least one valid k-template. (Alternative: There are valid and invalid k-rookeries).
- a k-template must be completable to a valid sudoku grid. (Alternative: There are uncompletable k-templates forming uncompletable k-rookeries).
coloin wrote:Anyhow a while back I could only generate 181 distinct 2-rookeries/templates. dukuso would say there were 170 classes [? templates/rookeries].
Have I overcounted ? - using havards program - they are all ED ?
Well the bug in gsfs minlexing has surfaced again - except havards usually is reliable.....
Hmmph, here are the 11 pairs - properly minlexed. I dont know why my usually reliable sofware thinks the pairs are different though....
Here is #4 and #6.
- Code: Select all
#4#.......12....12....12.............21...12....12............12.....2..1..2.1...... #
#6#.......12....12....12.............21...12....2.1...........12.....2..1..12....... #
not sure now if they are different or not !
Will check this soon. I started directly from 3-templates, later generating 3-rookeries by them.
I am still using the gsf's implementation of Michael Deverin's row-minlex algorithm. BTW Michael Deverin says that he can't reproduce the bug with his original code so probably it is a bug in the gsf's implementation. Is Havard's code available?
Cheers,
MD