Counting minimal puzzles: subsets, supersets, etc.

Everything about Sudoku that doesn't fit in one of the other sections

Re: Re:

Postby Red Ed » Wed Jul 10, 2013 7:17 am

blue wrote:I'm curious to see what your analysis reveals. It's a nasty issue, given the unknowns :(

If m(g) is the true number of minimals (of a particular size) for solution grid g then I'd like to know Var(m(G)) where G is an unbiased source of solution grids. If we had something like 100(?) random input grids and then boiled each down to a 1%(?) rel err estimate for the number of 25-clue minimals, say, then we could use those 100 estimates, m(1) ... m(100), to get a ballpark figure for Var(m(G)). I can calculate epsilon, mentioned in a previous post, directly from that + existing data from the r=1 case.
Red Ed
 
Posts: 633
Joined: 06 June 2005

Subset method

Postby Afmob » Wed Jul 10, 2013 9:39 am

New day, new results! Once again, I've only used 100,000 (unbiased) grids. My goal was to find a (rough) estimate for valid 19 clue minimal puzzles by using the subset method. I've started four 16 hours computations using 28, 27, 26 and 25 clue valid supersets and the 28 clue supersets yielded the best results.

Code: Select all
Computation time: 16 hours

6,685,006,942 samples
   11,544,617 valid 28 hits
  151,950,762 valid minimal puzzles

+----+----------+--------------+------------+
| Cl |    Count |  E(nr/grid)  | E(rel err) |
+----+----------+--------------+------------+
| 19 |       65 |   2.132e+003 |   13.85%   |
| 20 |    14181 |   3.204e+006 |    1.30%   |
| 21 |   745996 |   1.285e+009 |    0.28%   |
| 22 | 10940358 |   1.616e+011 |    0.11%   |
| 23 | 47573919 |   6.908e+012 |    0.06%   |
| 24 | 63197057 |   1.064e+014 |    0.05%   |
| 25 | 26039321 |   6.250e+014 |    0.05%   |
| 26 |  3314681 |   1.485e+015 |    0.09%   |
| 27 |   124083 |   1.529e+015 |    0.34%   |
| 28 |     1101 |   7.325e+014 |    3.01%   |
+----+----------+--------------+------------+

I might give 29 clue supersets a try. Edit: 29 clue supersets give similar results with the relative error for 19 and 20 clue valid minimal puzzles being 13.67% or respectively 1.31% after 16 hours of computation.

Red Ed wrote:Here, it seems you're interested in improving the existing results on the number-of-clues distribution, so bias matters.

My results are not as reliable as blue's results but right now my goal is to find the best parameters to search for estimates for high and low clue minimal puzzles. After we've found them I might start a large parallel computation to get better results without reusing a small number of samples.
Last edited by Afmob on Thu Jul 11, 2013 6:21 am, edited 1 time in total.
Afmob
 
Posts: 132
Joined: 28 June 2011

~TE(1), 19's

Postby blue » Wed Jul 10, 2013 3:53 pm

I realized a while ago, that my subset/30 runs (for ~TE(1) puzzles) that produced these tables, had the minimal puzzle size set at 20 -- don't ask why. After a short run testing something, I realized that it should have been producing 19's too. I ran it again for ~300 hours (3 x 100), and got the results below for minimal puzzles. Note: one 18 was produced !
[ Sorry I hadn't mentioned this before ... way too busy lately :( ]
It seems like the smaller subgrid size is better, for estimating the number of 19's.

Code: Select all
7335970867 samples
74649679 size 30 hits

+----+------------+--------------+------------+
| Cl |      Count |  E(nr/grid)  | E(rel err) |
+----+------------+--------------+------------+
| 18 |          1 |  7.1977e-001 |  100.00%   |
| 19 |        622 |  2.3504e+003 |    5.11%   |
| 20 |     152603 |  3.2502e+006 |    0.47%   |
| 21 |    9943826 |  1.2919e+009 |    0.11%   |
| 22 |  186500487 |  1.6154e+011 |    0.05%   |
| 23 | 1080824448 |  6.9041e+012 |    0.03%   |
| 24 | 2010860003 |  1.0643e+014 |    0.02%   |
| 25 | 1242148117 |  6.2457e+014 |    0.02%   |
| 26 |  263614445 |  1.4845e+015 |    0.02%   |
| 27 |   19695024 |  1.5251e+015 |    0.04%   |
| 28 |     517129 |  7.2077e+014 |    0.19%   |
| 29 |       4383 |  1.6189e+014 |    1.67%   |
| 30 |         10 |  1.9207e+013 |   31.62%   |
+----+------------+--------------+------------+

The ~TE(1) part, gave 71 new puzzles.

Hidden Text: Show
(20)
8......5....7..9.....26......7.....4..6.2....5..9...13..2...5...85.........13.... SER=4.0

(21)
1..2.9.....5........4...8.........1.....67.9...6.2.5.73..4.....6...1..2.9......3. SER=4.0

(22)
..32..8..4..5.9.6..61.....2.5.6.................8321....8..67.............5....98 SER=4.0
.5.9......7..436......1...3..915..4.......12..4.......7.6...3...3....76.........9 SER=4.0
.7.6...9..2..........9..4.31........9.3...25......6...4..5...2....3...6.5.8..17.. SER=4.0
.5..7.4....3.....9.9.6.....2........8..5......6..89.21.7...4..........5...17..39. SER=9.0
...45..7....81......4.....8...7...9..71.3...4.......5.7.3.8....2.........9...326. SER=9.0
..5..72.....2..7...1.....34.6...8...........7453....1...8.5.1......4...89......6. SER=9.2
6.2.....31....6.5.......7.2....7.5..8............61.2..8.79.....3..4...75......3. SER=8.9
9...3.........21.842..5.....73...9.52......3.1.........6.97......8..........8.5.4 SER=7.1
6........1..8..7.52....7.........4.......3......912.6.3..1....2.1.3...9.9.8....3. SER=5.0

(23)
..1...24..2.....719..........6..85..5..6.....8..3..4....2.9.......5.3....9..1.36. SER=9.7
2..8...3...8.6...9..1.5......71...9.3....2.8...47..............4.2..9......4.852. SER=9.0
5..........9.176.5.....4.7.8.1...2....4.5.....2...3..4..8.6.5.1.6......8...3..... SER=9.1
..2..3..5.4....6........42....6...1..5...8..24....75..7.3..........8..6..6..751.. SER=4.0
4.......59....27....8..........4...21....745.....8..1....8.9..1.6.3...7..3...5.2. SER=8.9
4..3..6.....4..32..8..1...7......5.8..9..5.6........4..6.8..9..8.2.......5..62... SER=10.0
..1......9....4...8.....3.26...21.......36...5..48.1....8........5.6.23.3.4.....6 SER=2.5
..1......9....4...8.....3.268..21.......36...5..48.1.............5.6.23.3.4.....6 SER=2.5
.4..2.7.......9...2....4.5..8.2.......9.5..2.4..7..8..1......4..9.8.7...6.5....9. SER=9.0
.4..2.7.......9...2....4.5..8.2.......9....2.4..7..8..1....5.4..9.8.7...6.5....9. SER=9.0
..4..9.7.23.68.....6.........6.4..1.......8......5.4....3.1...29..3.214.........3 SER=9.5
..4..9.7.23.68.....6.........6.4..1.......8......5.4....3.1...29...6214.........3 SER=9.5
31.7........2..4......3..7..8.6.........4.1.6.629.1....7.1.2...4...5......1...5.. SER=8.9
31.7........2..4......3..7..8...........4.1.6.629.1....7.1.2...42..5......1...5.. SER=7.8
8.....32.......4...3...5......4.........3.8.9...751.4.92.6........84.6...6.....93 SER=8.9
..........983..75.75.8...94...1...78....4....2.....9...8.6..1...4.........3.8...9 SER=3.4
............53..2..9...253.73...1.....14....74.....6...6...58......86..2....7...1 SER=6.6
...6..9.57.5....3....2....7.....97..........12.4...65......81..3.9.1...8.4.5..... SER=8.4

(24)
2..7.4....38.2.......86......6..83..72..3.6....3..7.2.......879.......6.4..1..... SER=8.9
......9.368...3.1....1..4..1..2.5.3...2..8...7.........7...26....58...4..6.5..3.. SER=8.4
.........2518...6.....1..8.......79...25....8..69.83..6.3........76..54...52..... SER=8.3
.8....2...5.3....79..2.5..8...9.8.3.5..7....2.3........13...48.2........8....7..5 SER=9.3
.4..2.78......9...2....4.5..8.2.......9.58.2.4..7.....1......4..9.8.7...6.5....9. SER=9.2
.4..2.78......9...2....4.5..8.2.......9..8.2.4..7.....1....5.4..9.8.7...6.5....9. SER=9.2
.4..2.78..........2....4.5..8.2.......9.58.2.4..7.....1..9...4..9.8.7...6.5....9. SER=9.2
.4..2.78..........2....4.5..8.2.......9..8.2.4..7.....1..9.5.4..9.8.7...6.5....9. SER=9.2
.4..2.78..........2....4.5..8.2.......9.5..2.4..7..8..1..9...4..9.8.7...6.5....9. SER=9.0
.4..2.78..........2....4.5..8.2.......9....2.4..7..8..1..9.5.4..9.8.7...6.5....9. SER=9.0
.4..2.7.......9...2....4.5..8.2.......9.58.2.4..7.....1......4..9.8.7...6.5....98 SER=9.0
.4..2.7.......9...2....4.5..8.2.......9..8.2.4..7.....1....5.4..9.8.7...6.5....98 SER=9.0
.....1.9.7...3..6.......7.4.4...9.35..8..2..65..4......8.1..3.9.169...2.......... SER=9.5
5.9.64....2..7.6.........3.4....8.2..3...2..59...1....7.628..1.......7......4...8 SER=9.7
...938..5......6..7...........8..2..2.346.....6...2143.7....3....5.....4..91...5. SER=8.4
....2..1.......6.26..7.1...91...4..887...6.3.......4....21...7..6.3....51.......4 SER=9.2
..968.....6..7.....7.....2.39.7....6..41.....2....6.8.....392....8...7..9.6.....8 SER=9.1
..968........7.....7.....2.39.7....6.841.....2....6.8.....392....8...7..9.6.....8 SER=9.1
1..5...2.3......9...2...5...7..2.4.1...91.3.........6.92...1..4...3.9.....4.5.9.. SER=9.0
1..5...2.3......9...2...5...7..2.4.1...91.3.........6992...1..4...3.9.....4.5.... SER=9.0
....2.9..83...9...2...4..8..1...8.3........98..6...2..32.4......4.583.2.........5 SER=9.1
...82.9..83...9...2...4..8..1.....3........98..6...2..32.4......4.583.2.........5 SER=9.1
......95...54...2..8....3...9.........8.5...77.46.1.......43.....29..8......8.245 SER=10.2

(25)
..93....51.85....4..5.84.9.......2..2.49...8......5...9....36..5..4....2...8..7.. SER=9.0
......7.13...16.5.74...5..38.9..3.......7...6..5..41..53.....7.....5...4....3.6.. SER=9.4
4..7.9...........1..9.6..2.7.12..8.9.....1...258....1.1....5.9..4.81...3..7...... SER=9.6
.82.4.7.......7.....726..5.6..4..5......91.8..4..86..752...........24...8......6. SER=8.5
..5.....8.1...57....6.9.2....3..8..9....6.4.....31..5.8....2.....295..8..3.6....2 SER=9.7
5..7.2.....9.5.7.....98...5.2..9.8....61............43..8..7.6.1...6.2.9.65...... SER=9.1
5..7.2.....9.5.7......8...5.2..9.8....61............43..8..7.6.1...6.2.9.65..9... SER=9.1
.3..5...8....23.9...19..35.91..3.8....82..4..7....6.......4...7...1..6....5....8. SER=9.7
.5.....31.2.....59....98......9.....8....3..2.3.....15..2..1....8......331.4.652. SER=9.4
.........4.....5...17..2.8.....97.41....6.....9.5..7....4.1...65.67.....17..469.. SER=9.0
.3..5...8....23.9...19..35.91..3.8....82..4..7....6.......4...7...1..6....5....8. SER=9.7
.7.68.1..6.1.......2......78...9..7..92......1...2....9....1.5.7.4..9.38.....6.4. SER=9.2
....5...3....1.85..5..437.1..3......9.6...5...1..2...61........6..5...87.3..64... SER=9.6

(26)
.6.....5.531..87..8...4...2...8.63.....45..2.6...32....4.......2...6.8.....38..4. SER=9.0
.6.....58531...7..8...4...2...8.63.....45..2.6...32....4.......2...6.8.....38..4. SER=9.0
6..1.2..9.....5..4.3....7..47.8...3............83..975.8.5.3.477.6..1......4..... SER=9.0
.82.4.7.......7.....726..5....47.5......91.8..4..86..752........6..24...8......6. SER=9.0
..94..6...7..65......2.3.5.46.....82....3.5..3.8.....66....7...........4.923.61.. SER=9.1

(27)
6.84...9.4.......3.32.5.....4..9832...934...8....27.....3...1...27.....9....6...2 SER=9.2
Edit: fixed SE ratings for the 71 puzzles.

Combining the results from that run, with the earlier results, gave this for ~TE(1) estimates -- still not very precise.
One grid gave a cluster of 8 24's (and 2 23's) -- which explains the higher E(rel err) for size 24.

Code: Select all
10388692663 samples
105708023 size 30 hits

+----+------------+--------------+------------+
| Cl |      Count |  E(nr/grid)  | E(rel err) |
+----+------------+--------------+------------+
| 20 |          1 |  1.5040e+001 |  100.00%   |
| 21 |          1 |  9.1744e+001 |  100.00%   |
| 22 |          9 |  5.5047e+003 |   33.33%   |
| 23 |         31 |  1.3983e+005 |   22.12%   |
| 24 |         32 |  1.1960e+006 |   30.62%   |
| 25 |         14 |  4.9709e+006 |   28.57%   |
| 26 |          8 |  3.1814e+007 |   43.30%   |
| 27 |          1 |  5.4680e+007 |  100.00%   |
+----+------------+--------------+------------+

Regards,
Blue.
Last edited by blue on Mon Jul 15, 2013 3:13 pm, edited 2 times in total.
blue
 
Posts: 1037
Joined: 11 March 2013

Re: Re:

Postby blue » Wed Jul 10, 2013 4:03 pm

Hi Red Ed,

Red Ed wrote:If we had something like 100(?) random input grids and then boiled each down to a 1%(?) rel err estimate for the number of 25-clue minimals, say, then we could use those 100 estimates, m(1) ... m(100), to get a ballpark figure for Var(m(G)). I can calculate epsilon, mentioned in a previous post, directly from that + existing data from the r=1 case.

Here are 1% numbers for 110 grids -- grids included.

Hidden Text: Show
7.7781e+014 318246579547983612296715438184597263725638941963421857839154726651872394472369185
6.9722e+014 134867529962351487857429631391645278726198345485273916649782153273516894518934762
8.0987e+014 526134789194728365378965124742516938963847251851392647285671493437289516619453872
6.5512e+014 697128534435697182128345976851234697279586341364971258586419723713852469942763815
5.9701e+014 761489253954723186382156479849571362625398714173642598236817945518934627497265831
2.6456e+014 167328549498567321532149876941635782756284193823791654314872965285916437679453218
7.3241e+014 462953871985167432731428965658319724194672583273845196519286347346791258827534619
4.6294e+014 712389564548672319369145278957831642684527193123496857295763481431958726876214935
4.2250e+014 379514826625897341841623795294186573716345289583279164957432618468751932132968457
9.0762e+014 283764519541329687697518432875196324324857196169432875452983761736241958918675243
8.0664e+013 714568293596231784238794516457819362321476859869352471142687935983125647675943128
7.8794e+014 869732415542186937713495628395648271126957384478321569251869743937214856684573192
5.6992e+014 341865927298374561765219483953182674687453192412697358529731846176948235834526719
2.4151e+014 543769182726185349981324576452897613839416725167532894295671438618943257374258961
1.1363e+015 459123876783469125126857439892735614364218957517694382645382791278941563931576248
5.9250e+014 486973125317452986592681734174568392923714568865239471741326859239845617658197243
3.3848e+014 639518427148273596572946813795832641463197258821654739384729165956481372217365984
6.0931e+014 865329714713548926249761358951876432326914587478253691692137845134685279587492163
8.7572e+014 153649278986572134724831596475263981639418752218957643862395417397124865541786329
7.7002e+014 719463528456287139823519674192854367384672951567931482631798245275146893948325716
6.1883e+014 842567391957213864613489572195742638726138459438956217574621983361894725289375146
3.7228e+014 952716438864923751371548962517694283249381675683257149726135894138479526495862317
7.6167e+014 651378924897124653243659718724516839168932547539847162982461375376285491415793286
1.2712e+015 412673859837295641956841732183462975725938164694157328348729516561384297279516483
1.2564e+014 724865931156392478398741265267489153541273689839156742472518396615937824983624517
3.0918e+014 143768925582914376697532148961475832835129467274386519326851794759243681418697253
7.5078e+014 519273486734869125826415973258947361947631258361528794683794512492156837175382649
7.0922e+014 629514738751283946384697251936745812248169573517328469462871395875936124193452687
8.7001e+014 341562978928437561576891432832674195615329784794158326269715843453986217187243659
6.3127e+014 642938157971625438385471296128543769759816342463297581297364815836152974514789623
6.3186e+014 798534621136279485245168379483625917952741863617983542524897136879316254361452798
8.9950e+014 643582179789134625512679843451896237936247518278351964194765382825413796367928451
8.6526e+014 349182675185967432276534918658341729492876153713259846931728564824615397567493281
8.0020e+014 651348927934725186872169345465982731728631594319457862583274619147896253296513478
3.9112e+014 871639542623754819459821736596183274342576981187942365268315497715498623934267158
5.6526e+014 547369281239178564681254793892435176165827349374691825423716958758943612916582437
2.3831e+014 658139724312547869947268531465891273791623458283475196524986317836712945179354682
1.6727e+014 841359726967412385235687914473195862529864137186723459718246593392578641654931278
1.3665e+015 581469732429783651673152948795326814216874593348915276137298465864537129952641387
8.2326e+014 347281659268795314159346872982153467613974528475628193526839741734512986891467235
4.5740e+014 893714256426835917175962483512647839384259761967183542731598624659421378248376195
5.3297e+014 247869315891534762653217984532978641476152839189346257318725496924681573765493128
7.1671e+014 837516924215749836946328715391852467682497153574631298469285371158973642723164589
5.9394e+014 721839546895164723643725918987341265164572839352986471436298157219657384578413692
7.9855e+014 937164258542837916861295473319578624724316895658942731496753182183429567275681349
1.6959e+014 359286471216374985784159236835961742647823519921547863568712394492638157173495628
6.8643e+014 756319248283465791491827635675948123914236857328751469149683572832574916567192384
6.9221e+014 652794318847631529193582467925348671461927835738156942279465183386219754514873296
6.1459e+014 324891756568347219179265843217934568985176324643528971891652437732419685456783192
4.8982e+014 218743965539162487647859231976215843485376129123498756862931574751684392394527618
1.1930e+015 542769813698132547371845926837954261219687435465321798153498672926573184784216359
1.1456e+015 781254396394678125265319478429863517673195842158742639947536281532981764816427953
2.2161e+014 871923546253641987946758312794265138128379465635184279487512693362497851519836724
6.4857e+014 846172359371859246925643817253487961794261583618395724162738495439526178587914632
1.0030e+015 395816472286743591417925386753289164948561723162437859874192635621358947539674218
4.0536e+014 823951467671483295594672813937145682458269371216837549789526134345718926162394758
6.9881e+014 516872943428369571379145286692538417185427639743916825237654198851293764964781352
4.0543e+014 189743256645219387273865491357926814491578623826431975562194738938657142714382569
4.1685e+014 921745386468239715375186942132658479589471263647923158753894621814362597296517834
7.8839e+014 985463712236871954417952836392146578574238691861795243658317429129584367743629185
5.6672e+014 364958721795132864128647539856324197913576248247819356582461973631795482479283615
8.9045e+014 183952674259647381476318952631285497548179236792463815827534169965821743314796528
2.8643e+014 317859624582164793469273185798346512143582967256917438625731849974628351831495276
1.2115e+015 672415893391867245458293716239748561184652379567931482726589134843126957915374628
9.0433e+014 578463921263197854149582673817359246354276198692841735426738519931625487785914362
6.0931e+014 475628391126397485938451627597863214213974568864215973342186759651739842789542136
4.2988e+014 315796482429318765786425931243867159578941623691253847854139276162574398937682514
2.7709e+014 813952764597146328462378195178564932634829571925713846786491253251637489349285617
2.6305e+014 945367128621458379783912564569184732418723956237596841372849615854671293196235487
6.0635e+014 956382471237461958481975326563124789149738265728596134892647513375819642614253897
5.5813e+014 326745918741896253895312764438671529962584137517923486153467892279138645684259371
1.8098e+014 821934576364571892957286134598627413243158967176349258732895641685413729419762385
2.1874e+014 952683471134579682786214395623891754519427863847365219471936528398752146265148937
3.7727e+014 759186234381452967246397851627934185495718623138265749564879312912643578873521496
5.4511e+014 548631279693257418712489365264815937179346582385972641951763824426198753837524196
4.5803e+014 825479631946318257173562498352187964487936512691245783264851379738694125519723846
3.8166e+014 517348296364259781892761435248593617675812349931476528126935874753184962489627153
3.2775e+014 158349762934726518267815439685197324349268175721534986493672851876951243512483697
3.6493e+014 659824731827315694143796582371958246268471953495263178936542817514687329782139465
7.9087e+014 689372154127945863345168972964237581752819436813654729471526398238791645596483217
1.1112e+015 592146873467382915183975462941528736356714289278639541615897324829463157734251698
4.6636e+014 387456921954712836621983574279641385438527619516398742862175493195834267743269158
1.2808e+015 732458619458961327961372458246537981379816245185294736594683172627145893813729564
3.4318e+014 352941876471862539986735214629153487148679352735284691267318945513496728894527163
6.8247e+014 583964217974125683621738945238457169765291438149683752896512374452376891317849526
5.1501e+014 153289674897641235462573198519836427348725916276914583925368741631497852784152369
3.4434e+014 835169274249875631671243589516387492493612758728594163364728915152936847987451326
1.2822e+015 673952841259418763184736592427893615568271439391645278812367954936584127745129386
5.1194e+014 389457612264831975751269483842195736175623894936748521493572168628914357517386249
5.4243e+014 582941736617382549943675128196538274834729651275416983359264817761853492428197365
9.0468e+014 524368971913745826876192543249871635185623497637459218362514789451987362798236154
2.4422e+014 793516842821934567564278319632857491459163278178429635987645123245391786316782954
1.7596e+014 358619724962374185417528936549831267873256419621947358286793541734165892195482673
8.7034e+014 173985642468271935592463817286719354914356278357824169641592783739148526825637491
2.2982e+014 579486213284931675163527849752193486896754321341862957938215764425679138617348592
6.0087e+014 326547189751398642489261357632984715174653928895172463218736594547819236963425871
8.0906e+014 572841963831796425469235187283469751654187239917523648395614872126378594748952316
5.2620e+014 795814632186532794423697185361425978259781346847963251912348567534176829678259413
2.9006e+014 354176829679382145812594673731645982548219367926738514485921736293867451167453298
5.4457e+014 235198647798346512146275938972813456864952173513764829629431785351687294487529361
1.4202e+015 642915873783462591591837246964281735217593684835674129359726418126348957478159362
6.6899e+014 154823967637519284289647351941362578865791423723458619312985746498276135576134892
4.2988e+014 671528943485793621239146587943875162516239874728461395862357419394612758157984236
5.1501e+014 978256314356841297142379865629715438517438926483692751794563182835124679261987543
3.9509e+014 319276854856134972724589631271648395568391247493752186635917428147823569982465713
3.5872e+014 435728961968541732127693845219356487756489213843172659392865174671934528584217396
3.9018e+014 513948627782536194946217358169423785327185946458769231871394562294651873635872419
1.7172e+015 653481927798325416412796583834659271179832645526147839365278194987514362241963758
2.7017e+014 176329485285764319439185627543971268617238954892546731928617543761453892354892176
1.0383e+015 857126493291843567364957128572381649948675312136294875683719254419532786725468931

Please, would you explain a bit about how you arrived at the formula with the 'r' and 'epsilon' ?

Best Regards,
Blue.
blue
 
Posts: 1037
Joined: 11 March 2013

Re: Counting minimal puzzles: subsets, supersets, etc.

Postby Red Ed » Wed Jul 10, 2013 6:02 pm

Excellent. I should have asked: starting at subgrid size ... what? 30? 28? Whichever it is, the variance of the estimator in the r=1 case is very roughly 1e32, whereas your results have the Var(m(G)) roughly 1e29. So that's epsilon ~= 1/1000; if you have r=1000 samples per grid, your variance is about twice as bad as it would be with r=1 sample per grid.

Details of the "epsilon formula" in the next post.
Red Ed
 
Posts: 633
Joined: 06 June 2005

"epsilon" formula

Postby Red Ed » Wed Jul 10, 2013 7:23 pm

Everything that follows is with respect to some fixed target number of clues, c.

We need to know how much worse Var( M[1](G)+...+M[r](G) ) is than Var( M(G[1])+...+M(G[r]) ) where:
  • M[1,..,r](G) are the mimimals estimates from processing r independent subgrids of the same random solution grid.
  • M(G[1]),...,M(G[r]) are the minimals estimates from processing r independent subgrids of r independent solution grids
OK, it's not great notation. But let's press on.

So, by the standard formula for the variance of sums: Var( M[1](G)+...+M[r](G) ) = r.Var(M(G)) + r(r-1).Cov(M[1](G),M[2](G))
whereas: Var( M(G[1])+...+M(G[r]) ) = r.Var(M(G)) because those terms are fully independent
and so the first is worse than the second by a factor of 1 + (r-1).ε
where ε (epsilon) = Cov(M[1](G),M[2](G)) / Var(M(G)) .

Now the question is: what's that covariance? First some notation: m(g) is the true number of minimals for fixed solution grid g; m(G) is the corresponding random variable when the solution grid is picked uniformly at random; m is the average of m(g) for all g. OK then:
  • Cov( M[1](G), M[2](G) )
  • = Expectation( (M[1](G)-m).(M[2](G)-m) )
  • = Expectation( M[1](G).M[2](G) ) - m^2 because Expectation(M[1](G)) = Expectation(M[2](G)) = m
  • = Sum_{g}( Prob(G=g).Expectation(M[1](g).M[2](g)) ) - m^2
  • = Sum_{g}( Prob(G=g).m(g)^2 ) - m^2 because M[1](g) and M[2](g) are independent given g
  • = Expectation(m(G)^2) - Expectation(m(G))^2
  • = Var(m(G))
So epsilon, ε = Var(m(G)) / Var(M(G)), the ratio of the variance of the actual number of minimals for a random solution grid to the variance of the estimated number of minimals from a single subgrid of a random solution grid. In practice, most of the randomness of the M(G) variable comes from the M part (it makes more difference what subgrid you pick than what solution grid you pick), so ε is much closer to 0 than to 1 and we can get away with non-trivial r before any pain is felt in the variance.
Red Ed
 
Posts: 633
Joined: 06 June 2005

Re: Counting minimal puzzles: subsets, supersets, etc.

Postby blue » Thu Jul 11, 2013 6:53 am

Hi Red Ed,

Red Ed wrote:Details of the "epsilon formula" in the next post.

Well done, thank you.
(I had no trouble following the details :))

The "critical" value for 'r' ... 1/epsilon, or 1+1/epsilon, seems interesting. It seems to be a point representing a crossover between "like r = 1" behavior, and "like averaging perfect by grid numbers, over a random grid sample" behavior.

For both extremes, we can calculate good error estimates using the sampled data.
I wonder if there's a "happy medium" formula, that works well for all 'r' ?
I suppose there must be -- something involving an estimate for the covariance value that appears in your "details".

Best Regards,
Blue.
blue
 
Posts: 1037
Joined: 11 March 2013

Re: Counting minimal puzzles: subsets, supersets, etc.

Postby Red Ed » Thu Jul 11, 2013 3:39 pm

For the balance point, if the time to generate a solution grid is a fraction, δ, of the time it takes to explore one subgrid, then the optimal r is sqrt(δ(1-ε)/ε) ... unless I messed up the calculation while children were causing havoc in the background.

btw, I could've made that Cov calculation a lot shorter if only I'd known the Law of Total Covariance.
Red Ed
 
Posts: 633
Joined: 06 June 2005

Re: ~TE(1), 19's

Postby eleven » Sun Jul 14, 2013 12:19 pm

blue wrote:Combining the results from that run, with the earlier results, gave this for ~TE(1) estimates -- still not very precise.

Thanks again for these results, blue.
So, (very roughly) we can expect a T&E(2) puzzle in about 50 mio random puzzles and it probably would have a SER of 9.
But (again very roughly) only one of about 3000 SER 9+ puzzles will not be in T&E(1).
At the ends there is a very small ratio of puzzles, that can be solved with triples, which are in T&E(2). And there are a few T&E(1) puzzles with SER 11+.
eleven
 
Posts: 3149
Joined: 10 February 2008

Re: ~TE(1), 19's

Postby blue » Mon Jul 15, 2013 3:10 pm

Hi eleven,

blue wrote:The ~TE(1) part, gave 71 new puzzles.

Pat was kind enough to let me know via PM, that I had messed up the ratings listed with those puzzles.
I managed to change almost every "r.x" rating to "r.0" (using regex search & replace).

The ratings have been corrected in the original post.

Regards,
Blue.
blue
 
Posts: 1037
Joined: 11 March 2013

Re: Counting minimal puzzles: subsets, supersets, etc.

Postby eleven » Mon Jul 15, 2013 7:33 pm

Ah yes, i only had noticed it for the low ratings (triple puzzles at least have 2.5). It's now a bit more as i originally had expected.
It does not change much for the estimates i wrote (just take 9+ instead of 9).
eleven
 
Posts: 3149
Joined: 10 February 2008

Subset & Superset method

Postby Afmob » Sat Jul 20, 2013 7:18 am

Yesterday I started a large parallel computation to get better estimates using the subset and superset method. It will run for about 10 days (until 29th of July) with each method having about 15*240 cpu hours. In contrast to my former computations I do not only use one small sample size of 100k grids but using Red Ed's unbiased generator some samples (100k for subset method, 10k for superset method) are produced with each sample being used 10 times. Afterwards, new samples are generated. Therefore the relative errors are slightly underestimated but only by a small margin.

Subset results:
Code: Select all
Computation time: 15x240 hours

601,942,000,000 samples
  1,039,057,869 valid 28 hits
 13,676,903,000 valid minimal puzzles

+----+------------+--------------+----------------+
| Cl |      Count |  E(nr/grid)  | E(rel err)*100 |
+----+------------+--------------+----------------+
| 18 |          8 |    4.625e-01 |      3.536e+01 |
| 19 |       6092 |    2.219e+03 |      1.518e+00 |
| 20 |    1287655 |    3.231e+06 |      1.368e-01 |
| 21 |   67409525 |    1.290e+09 |      2.925e-02 |
| 22 |  984980363 |    1.615e+11 |      1.146e-02 |
| 23 | 4280735451 |    6.903e+12 |      6.447e-03 |
| 24 | 5689364460 |    1.064e+14 |      4.798e-03 |
| 25 | 2343546179 |    6.247e+14 |      5.106e-03 |
| 26 |  298326641 |    1.484e+15 |      9.373e-03 |
| 27 |   11149692 |    1.526e+15 |      3.568e-02 |
| 28 |      96934 |    7.163e+14 |      3.212e-01 |
+----+------------+--------------+----------------+

Superset results:
Code: Select all
Computation time: 15x240 hours

21,310,000,000 samples
 1,199,199,372 minimal 26 hits
    32,151,592 valid minimal puzzles

+----+------------+--------------+----------------+
| Cl |      Count |  E(nr/grid)  | E(rel err)*100 |
+----+------------+--------------+----------------+
| 26 |      28055 |    1.491e+15 |      5.970e-01 |
| 27 |     775928 |    1.527e+15 |      1.540e-01 |
| 28 |    5131589 |    7.213e+14 |      7.545e-02 |
| 29 |   11419771 |    1.660e+14 |      5.831e-02 |
| 30 |   10035639 |    1.946e+13 |      6.439e-02 |
| 31 |    3929868 |    1.229e+12 |      9.756e-02 |
| 32 |     749034 |    4.391e+10 |      2.019e-01 |
| 33 |      77082 |    9.586e+08 |      5.705e-01 |
| 34 |       4476 |    1.310e+07 |      2.192e+00 |
| 35 |        149 |    1.121e+05 |      1.172e+01 |
| 36 |          1 |    2.090e+02 |      1.000e+02 |
+----+------------+--------------+----------------+


I will update the tables from time to time. I expect to find some 36 clue minimal puzzles and get an estimate for the number of 18 clue minimal puzzles with the relative error being smaller than 25 %.
Last edited by Afmob on Wed Jul 31, 2013 7:12 pm, edited 12 times in total.
Afmob
 
Posts: 132
Joined: 28 June 2011

Re: Counting minimal puzzles: subsets, supersets, etc.

Postby eleven » Mon Jul 22, 2013 11:49 am

Very interesting.
If the trend holds, both my 18 and 35 clue estimates were too low (2 bio vs. 4 bio and 3.2e14 vs 7.3e14). Also we had 15% less 19's.
eleven
 
Posts: 3149
Joined: 10 February 2008

Re: ~TE(1), 19's

Postby denis_berthier » Fri Jul 26, 2013 9:18 am

blue wrote:The ~TE(1) part, gave 71 new puzzles.


I've been busy with other things but here is finally the B?B classification for the whole (old + new) collection of 95 puzzles.

Hidden Text: Show
Code: Select all
8......5....7..9.....26......7.....4..6.2....5..9...13..2...5...85.........13.... SER=4.0     in B1B     ----- solvable in SSTS
1..2.9.....5........4...8.........1.....67.9...6.2.5.73..4.....6...1..2.9......3. SER=4.0     in B1B     ----- solvable in SSTS
.62.........4.7....1..8.93.5...7......3..........5..79.....92658...4.3..........8 SER=9.3     in B1B
..32..8..4..5.9.6..61.....2.5.6.................8321....8..67.............5....98 SER=4.0     in B1B     ----- solvable in SSTS
.5.9......7..436......1...3..915..4.......12..4.......7.6...3...3....76.........9 SER=4.0     in B1B     ----- solvable in SSTS
.7.6...9..2..........9..4.31........9.3...25......6...4..5...2....3...6.5.8..17.. SER=4.0     in B1B     ----- solvable in SSTS
.5..7.4....3.....9.9.6.....2........8..5......6..89.21.7...4..........5...17..39. SER=9.0     in B1B
...45..7....81......4.....8...7...9..71.3...4.......5.7.3.8....2.........9...326. SER=9.0     in B1B
..5..72.....2..7...1.....34.6...8...........7453....1...8.5.1......4...89......6. SER=9.2     in B1B
6.2.....31....6.5.......7.2....7.5..8............61.2..8.79.....3..4...75......3. SER=8.9     in B1B
9...3.........21.842..5.....73...9.52......3.1.........6.97......8..........8.5.4 SER=7.1     in B1B
6........1..8..7.52....7.........4.......3......912.6.3..1....2.1.3...9.9.8....3. SER=5.0     in B1B     ----- solvable in SSTS
...4...89............1683......47..38..6....1.9.......3...856...52...1....9.....2 SER=8.3     in B1B
.....3....1.4.....9...6..........6.9.2.7...454...9.18..3...4...8.......4..1...896 SER=9.1      in B2B
....8.6...96..2...2....35...7....3.....84...1.1.7..9.............5...8.7.8.1..49. SER=8.4     in B1B
.2...65........162..4.....97...............13...1.86.5...5.9..738..6.....5.2..... SER=3.6     in B1B     ----- solvable in SSTS
1.32...8..4.7.9.....7.8....7..3.....8.195...6..6...8..........2......9.......3.64 SER=4.0     in B1B     ----- solvable in SSTS
37.....2...2.....71......8..3.45.........8.4..4..6....6....53.....9..75.....86..2 SER=7.3     in B2B
37.....2...2.....71......8..3.45.2.......8.4..4..6....6....53.....9..75.....86... SER=4.0     in B1B     ----- solvable in SSTS
37.........2.....71......8..3.45.2.......8.4..4..6....6....53.....9..75.....86..2 SER=4.0     in B1B     ----- solvable in SSTS
.1..9.8....6.3.......7..4.9..9....2....5....1.6....9.32.59.1.........2..3....6.5. SER=9.0     in B2B
.....2.....3......19....2462..5..8...3..6..7..41..39......4...7..6..1.......9..1. SER=7.1     in B1B
5......84.8.65..3......9...1.6.2......89...6............1..492..4.891...6........ SER=9.0      in B2B
5......84.8.65..3......9...1.6.2......89...6............1..492..4.89....6.......1 SER=9.0      in B2B
..1...24..2.....719..........6..85..5..6.....8..3..4....2.9.......5.3....9..1.36. SER=9.7     in B1B
2..8...3...8.6...9..1.5......71...9.3....2.8...47..............4.2..9......4.852. SER=9.0     in B1B
5..........9.176.5.....4.7.8.1...2....4.5.....2...3..4..8.6.5.1.6......8...3..... SER=9.1     in B1B
..2..3..5.4....6........42....6...1..5...8..24....75..7.3..........8..6..6..751.. SER=4.0     in B1B     ----- solvable in SSTS
4.......59....27....8..........4...21....745.....8..1....8.9..1.6.3...7..3...5.2. SER=8.9     in B1B
4..3..6.....4..32..8..1...7......5.8..9..5.6........4..6.8..9..8.2.......5..62... SER=10.0     in B2B
..1......9....4...8.....3.26...21.......36...5..48.1....8........5.6.23.3.4.....6 SER=2.5     in B1B     ----- solvable in SSTS
..1......9....4...8.....3.268..21.......36...5..48.1.............5.6.23.3.4.....6 SER=2.5     in B1B     ----- solvable in SSTS
.4..2.7.......9...2....4.5..8.2.......9.5..2.4..7..8..1......4..9.8.7...6.5....9. SER=9.0     in B2B
.4..2.7.......9...2....4.5..8.2.......9....2.4..7..8..1....5.4..9.8.7...6.5....9. SER=9.0     in B2B
..4..9.7.23.68.....6.........6.4..1.......8......5.4....3.1...29..3.214.........3 SER=9.5     in B1B
..4..9.7.23.68.....6.........6.4..1.......8......5.4....3.1...29...6214.........3 SER=9.5     in B1B
31.7........2..4......3..7..8.6.........4.1.6.629.1....7.1.2...4...5......1...5.. SER=8.9     in B2B
31.7........2..4......3..7..8...........4.1.6.629.1....7.1.2...42..5......1...5.. SER=7.8     in B2B
8.....32.......4...3...5......4.........3.8.9...751.4.92.6........84.6...6.....93 SER=8.9     in B2B
..........983..75.75.8...94...1...78....4....2.....9...8.6..1...4.........3.8...9 SER=3.4     in B1B     ----- solvable in SSTS
............53..2..9...253.73...1.....14....74.....6...6...58......86..2....7...1 SER=6.6     in B1B
...6..9.57.5....3....2....7.....97..........12.4...65......81..3.9.1...8.4.5..... SER=8.4     in B1B
8...5...9....2.4.......4..16...8.1..5....9.6.3.......8.3.79.....5....93..6.4..5.. SER=9.2     in B2B
8..76......5...8...7..4.1....9.37......1.43.........2.6..5....1..2.....5..1.76.3. SER=9.3     in B1B
....7.21.....1...6...6.5.......8..7...9..6..8.36.....4.95..2..7..37.....7...5.4.. SER=9.4     in B1B
8..2715....3.8.......5...8..5.......9.6.3..1..7.12............3...85.12...2....7. SER=9.3      in B2B
.....2..88.3...1.......6.4.9..2....6..15......8..4..7.1..7....5.4968......2.....4 SER=9.6     in B1B
.....2..8..3...1.....8.6.4.9..2....6..15......8..4..7.1..7....5.4968......2.....4 SER=9.6     in B1B
.1..9.8.2..6.3......37..4.9..9....2....5....1.6....9.32.59.1.........2.......6.5. SER=9.0      in B2B
....4.28...1.5.....5..78..64.5.1.9...7..........7......4......25...2..7..3..9.5.1 SER=7.6      in B1B
2..7.4....38.2.......86......6..83..72..3.6....3..7.2.......879.......6.4..1..... SER=8.9     in B1B
......9.368...3.1....1..4..1..2.5.3...2..8...7.........7...26....58...4..6.5..3.. SER=8.4     in B1B
.........2518...6.....1..8.......79...25....8..69.83..6.3........76..54...52..... SER=8.3     in B1B
.8....2...5.3....79..2.5..8...9.8.3.5..7....2.3........13...48.2........8....7..5 SER=9.3     in B2B
.4..2.78......9...2....4.5..8.2.......9.58.2.4..7.....1......4..9.8.7...6.5....9. SER=9.2     in B2B
.4..2.78......9...2....4.5..8.2.......9..8.2.4..7.....1....5.4..9.8.7...6.5....9. SER=9.2     in B2B
.4..2.78..........2....4.5..8.2.......9.58.2.4..7.....1..9...4..9.8.7...6.5....9. SER=9.2     in B2B
.4..2.78..........2....4.5..8.2.......9..8.2.4..7.....1..9.5.4..9.8.7...6.5....9. SER=9.2     in B2B
.4..2.78..........2....4.5..8.2.......9.5..2.4..7..8..1..9...4..9.8.7...6.5....9. SER=9.0     in B2B
.4..2.78..........2....4.5..8.2.......9....2.4..7..8..1..9.5.4..9.8.7...6.5....9. SER=9.0     in B2B
.4..2.7.......9...2....4.5..8.2.......9.58.2.4..7.....1......4..9.8.7...6.5....98 SER=9.0     in B2B
.4..2.7.......9...2....4.5..8.2.......9..8.2.4..7.....1....5.4..9.8.7...6.5....98 SER=9.0     in B2B
.....1.9.7...3..6.......7.4.4...9.35..8..2..65..4......8.1..3.9.169...2.......... SER=9.5     in B1B
5.9.64....2..7.6.........3.4....8.2..3...2..59...1....7.628..1.......7......4...8 SER=9.7     in B1B
...938..5......6..7...........8..2..2.346.....6...2143.7....3....5.....4..91...5. SER=8.4     in B1B
....2..1.......6.26..7.1...91...4..887...6.3.......4....21...7..6.3....51.......4 SER=9.2     in B1B
..968.....6..7.....7.....2.39.7....6..41.....2....6.8.....392....8...7..9.6.....8 SER=9.1     in B2B
..968........7.....7.....2.39.7....6.841.....2....6.8.....392....8...7..9.6.....8 SER=9.1     in B2B
1..5...2.3......9...2...5...7..2.4.1...91.3.........6.92...1..4...3.9.....4.5.9.. SER=9.0     in B2B
1..5...2.3......9...2...5...7..2.4.1...91.3.........6992...1..4...3.9.....4.5.... SER=9.0     in B2B
....2.9..83...9...2...4..8..1...8.3........98..6...2..32.4......4.583.2.........5 SER=9.1     in B1B
...82.9..83...9...2...4..8..1.....3........98..6...2..32.4......4.583.2.........5 SER=9.1     in B1B
......95...54...2..8....3...9.........8.5...77.46.1.......43.....29..8......8.245 SER=10.2     in B2B
..2..8............539.6.....56....497....9.5....4...63.17.2.4...6.9........147... SER=5.0     in B1B     ----- solvable in SSTS
..93....51.85....4..5.84.9.......2..2.49...8......5...9....36..5..4....2...8..7.. SER=9.0     in B1B
......7.13...16.5.74...5..38.9..3.......7...6..5..41..53.....7.....5...4....3.6.. SER=9.4     in B2B
4..7.9...........1..9.6..2.7.12..8.9.....1...258....1.1....5.9..4.81...3..7...... SER=9.6     in B1B
.82.4.7.......7.....726..5.6..4..5......91.8..4..86..752...........24...8......6. SER=8.5     in B2B
..5.....8.1...57....6.9.2....3..8..9....6.4.....31..5.8....2.....295..8..3.6....2 SER=9.7     in B1B
5..7.2.....9.5.7.....98...5.2..9.8....61............43..8..7.6.1...6.2.9.65...... SER=9.1     in B2B
5..7.2.....9.5.7......8...5.2..9.8....61............43..8..7.6.1...6.2.9.65..9... SER=9.1     in B2B
.3..5...8....23.9...19..35.91..3.8....82..4..7....6.......4...7...1..6....5....8. SER=9.7     in B2B
.5.....31.2.....59....98......9.....8....3..2.3.....15..2..1....8......331.4.652. SER=9.4     in B1B
.........4.....5...17..2.8.....97.41....6.....9.5..7....4.1...65.67.....17..469.. SER=9.0     in B1B
.3..5...8....23.9...19..35.91..3.8....82..4..7....6.......4...7...1..6....5....8. SER=9.7     in B2B
.7.68.1..6.1.......2......78...9..7..92......1...2....9....1.5.7.4..9.38.....6.4. SER=9.2     in B2B
....5...3....1.85..5..437.1..3......9.6...5...1..2...61........6..5...87.3..64... SER=9.6     in B1B
.9...4.8.......7....86..9.1.2.1....96..7..21.75....3.6.1..9...7.4..1..6...7...... SER=9.0      in B2B
.9...4.8.......7....86..9.1.2.1....96..7..2..751...3.6.1..9...7.4..1..6...7...... SER=9.0     in B2B
.6.....5.531..87..8...4...2...8.63.....45..2.6...32....4.......2...6.8.....38..4. SER=9.0     in B2B
.6.....58531...7..8...4...2...8.63.....45..2.6...32....4.......2...6.8.....38..4. SER=9.0     in B2B
6..1.2..9.....5..4.3....7..47.8...3............83..975.8.5.3.477.6..1......4..... SER=9.0     in B2B
.82.4.7.......7.....726..5....47.5......91.8..4..86..752........6..24...8......6. SER=9.0     in B2B
..94..6...7..65......2.3.5.46.....82....3.5..3.8.....66....7...........4.923.61.. SER=9.1     in B2B
6.84...9.4.......3.32.5.....4..9832...934...8....27.....3...1...27.....9....6...2 SER=9.2     in B1B


The B1B ratio is 55.8%, close to the previous estimate (58%).
However, the ratio of puzzles solvable by SSTS is much smaller (15.8 % instead of 41.7%).This is probably due to the high correlation in the first sample.
denis_berthier
2010 Supporter
 
Posts: 4189
Joined: 19 June 2007
Location: Paris

Re: Counting minimal puzzles: subsets, supersets, etc.

Postby coloin » Fri Jul 26, 2013 10:06 am

Afmob wrote:
Code: Select all
+----+------------+--------------+----------------+
| Cl |      Count |  E(nr/grid)  | E(rel err)*100 |
+----+------------+--------------+----------------+
| 18 |          5 |    4.245e-01 |      4.472e+01 |

well thats ~ 2.5 billion 18-puzzles
I believe dobrichev's gridchecker program could check several random grids to confirm this figure.

Another interesting investigation would be a figure for the number of puzzles in some specific grids
eg
Code: Select all
MC grid  - no 19 and 648 isomorphic 20s
PT grid  - no 19 and only 6 isomorphic 20s
SF grid  - 29 x 17-puzzles
SFB grid - 3 x 17-puzzles

Code: Select all
MC      123456789456789123789123456231564897564897231897231564312645978645978312978312645
PT      123456789457189326689327154231645897745891632896732541318264975574918263962573418
SF      639241785284765193517983624123857946796432851458619237342178569861594372975326418
SFB     589732614621854379743916825835129746417568293296347158968471532372695481154283967

C
coloin
 
Posts: 2493
Joined: 05 May 2005
Location: Devon

PreviousNext

Return to General