i tried to generate palindromic 16x16 grids from scratch, by treating each grid as an 8x16 half-sudoku where the columns wrap around to the other side, i.e. r1c1...r8c1 and r1c16...r8c16 is a column, and so on.
i coded the following (naive and highly inefficient) algorithm in python from scratch
- Code: Select all
fill top row with 1-16
while top half of sudoku is not filled:
choose empty cell at random
assign a possible candidate value for that cell at random
do all singles
if contradiction:
throw the sudoku away and start again
print solution
of course using a recursion algorithm rather than throwing away an invalid sudoku would be much better, but this works for proof of concept that 16x16 palindromic solution grids are easy to find, and i couldn't quite fix the bugs in my code for the recursion, so i left it out. this found a valid grid on about 3% of iterations and i got about 2 valid grids a minute
here are 52 of them until i stopped the process after about half an hour. i replaced 10-16 by a-g for brevity. each line only represents the top half of the sudoku grid; the bottom half is, of course, the top half in reverse
palindromic 16x16 solution grids: Show 123456789abcdefg697be24ad3fgc815cg5efd9b1687243ad8fa31gc25e49b6795632a87fec1gdb4ed2164cg5b78f9a3f4g8b91e6d3a5c72bca7d5f342g961e8
123456789abcdefg6cdg3f2b785e9a14b85fa94ed3g1267ca97eg1dcf642b835d698f2g315a4cbe72b4768e5gc3d1fa9f5c37d1a29eb6g48eg1a9cb46f7852d3
123456789abcdefg8759ge126f3dacb4ae6fb9cdg5741283cgdbf43a128e7965b5fc7d9e3ga82146794eag6b5d1238cfd1g8324f7ec65ba923a6158c4bf9g7de
123456789abcdefgfd9gb4ce63218a756ac72dg35ef81b498b5e91fa4d7g36c2b81fde6c795a2g3436d97a5g28c4bf1ecg25f841db3e679a7e4a392bf1g6c85d
123456789abcdefgf8d6baecg47352195e9g43f21d867cabcb7ag19d52fe346825aedc143bg98f76791ca53b68df2g4edg8f2e67a5419bc3436b89gfec2715da
123456789abcdefgf96ed4b15g8327cacdg8a9fe24713b657ba52gc3d6ef94182gd69317f8cba54e35c14deba927gf86ba876f5g4d1ec2394e9f8a2c635gb17d
123456789abcdefge7fc4gb23d1859a6d95baecf6g72381486ag391de54f7cb2351fe29g78c6ad4bad2615fcb43ge789ceb87d6452a91g3f7g49b83a1efd26c5
123456789abcdefg756ga3ecf14d289b8db9g2f1e653c47acafe49dbg278513628a6914d3cg7b5ef5b9fec3768d2ag14d4c1f8g5a9eb7263eg736ab245f18dc9
123456789abcdefg5dbe3c1g248f769af89a2ed4167g35cb6g7c9fbad35e82142af9bde35c146g78e68ba2gc7f3d1459c315748fe9g62abd74dg1956b2a8fce3
123456789abcdefgc68fb3g4de2751a9a59efcd1g84362b7dgb7ae92f5168c3468gb192a745dcfe3e75a4gf3c18296db2cd187b6e3f9ga45f943edc5b6ag2718
123456789abcdefgd79eg2baf314c658cab6edf47g5891325g8f391c6de2a4b7367518ebd4af2gc9f8agd423e6c9751b4dc1a79528gb3fe6e92b6fcg15378d4a
123456789abcdefga8b63ge47fd129c59d57bfc234eg81a6egfcd91a6852b47321gfe49cdb8a3657beca72d5g634189f46d5813fe279gabc83796agb15cfe24d
123456789abcdefgce7fa12g38d6b459abd69efc542g713859g834bde17fca6241c9ba37268eg5dfdg2385c619f4eba7b76529efagcd1843e8fa1gd4b53729c6
123456789abcdefgcaf521g37de496b8b89eaf4d263g1c57d7g6ec9bf158a2436c7f195a4b2d38geae1gb43c687f25d959487d2g1ea3cb6f23db68fe5cg97a14
123456789abcdefgbg7cd92ef148563a9a5613fb7dge2c48edf8ga4c352619b72c1g48ed5673ba9f5e4971b2agcf3d8637ba9fc618d2eg54d68fa53g49eb721c
123456789abcdefgfgd839cb46e7125ac97efd1a5g283b64ba654g2e1f3d9c78e8ag6cbd23f971453146258fcd7bage9dc5fga976e41b8327b92e143g58acfd6
123456789abcdefgfb5c9a3edg162847d679g2cb48fe51a38egaf4d13572b69c28ce7d9564ga3f1b5dag4362fb8179ce93b18cfa7e5d62g4674fbe1gc2938d5a
123456789abcdefgec76bd1fg5428a395dfag9347e18c6b2b8g9eac2d63f5147854e7g2a6bfd391cd6b7359ce421f8gafac168db3g7925e4392g4ef158cabd76
123456789abcdefgabf59d1eg632847c7cg6b2f4d85e1a3989deacg3f417256b518b6gd729af3c4edg673feabc4891524a2c19b563edg78f3e9f482c157gabd6
123456789abcdefgd9acg4eb653f281757fb19d2e8g46ca38e6gac3fd1725b49ab58ed6cg927143f4d1ebf273ca89g562g9f384a1b567dcec67391g54feda28b
123456789abcdefgd8c6e9ga453f71b2bgf924d3e178a6c57a5e1fbc62dg8493ad857g91f6cb32e4f69142cb73edga58e37268fdg45acb19c4gb3ae52819fd76
123456789abcdefgbdfeg43a2687951ca76c9f1dg53eb482859g2cbe1fd47a36debf1a957g268c439g2a8e4fcd1367b57c83bg264e5a1d9f4615d7c3b89f2gae
123456789abcdefg7db9ga4e3f26c81586gf39c25d1ea74bcea5fd1b48g726939bfg472c138de5a6ecd7936afg5b148243281f5g6ecab97da5168ebd79423cgf
123456789abcdefgegc59d1b382f7a648a793e4fd5g61bc2fd6bacg21e473859c4de1a965b3gf287619a253ecf78g4bdb7f248dga61ec59353g8bfc7429d61ea
123456789abcdefg9gcab32df6e75148b587ef1g23d49ac6de6fa9c45g812b37a15bdge734c96f8237g864fceba219d546de329b185fg7acf92c815a6d7g34be
123456789abcdefg59d7432ae8fg61bcega8fcb12d469573b6cfed9g3517284af3219egc547ab68d6d7e85f4bcg3a9128a4gb236de91cf579cb5da17f6823ge4
123456789abcdefge56f3dcg7182ab49ca8be9f13dg42567d79ga42b56ef8c132b4eg79ca5163d8f8d791236egfb5ac45g1c8abfd43972e6a3f6d5e428c71g9b
123456789abcdefg98fb1d2c34gea576eca649fg5d1738b25gd7ae3b68f2c194f37864e2dbag591cdeg9b3c14528f6a7b5c1d8gaf679e243a642f597e1c3gbd8
123456789abcdefg59gce4daf617b2386a8eb3f12gd457c9bdf7g92ce853146ae86fa743b5cdg91275c2fe9g61a83b4d3bd918c54eg26a7f4g1a62bd73f985ec
123456789abcdefg97aefgbcd8541236cg56d1ea3f7294b8bd8f39241ge6c75a3cb7g86f294ead15f4981a35bcd72g6eda1gb24e65f83c972e659cd7g13abf84
123456789abcdefgb8d52age467f1c39f67c349d1eg82ba5aeg9bf1c253d68748d1e6cf5b39ag2473g479dbaf25e861c6c9f12437d8ga5be25ab7e8g6c143f9d
123456789abcdefg98a5gc2d3ef6b4176cb7e91fgd42a835degfba341587296c8d769egc2b1f354a35c912fa6874edgb4afg856be9d3c172eb21d3475cga869f
123456789abcdefg96be1f4d52g7a83cfg7c3a9e4d18625bda58bcg2f3e6941787gb42c61fda39e52dc1g8ea36597fb43465f91bg87e2dcae9afd357cb42g186
123456789abcdefgeb971dcg248f56a35gfc3a2e6d17b894a6d89fb453ge17c2f3g24ce1795a6bd8b7cag26fd1e834596819d753bf42gaecd45eb98acg36f217
123456789abcdefg78fcgd91635e2a4be5g9a34b72fd8c16db6afec2g81475392gb63a1e4589fd7c4c7eb2d53fg6189afa15896cdb72g4e38d9374gfaec1b265
123456789abcdefg8c6ef923g51dba47fag51ebd7634829cd7b9agc428fe31654bdg2ce6f3a71589619fg5dac48b273e3eca87f15g2964db2587349be1d6cfga
123456789abcdefgcbg5d21a76ef3984967f3gbe14d8a5c2aed849cfg5327b1654fbe72d6ga9c138e9c2683b5df1g4a7d7a6g19c384be25f3g81a5f42ec796db
123456789abcdefgd5a6bfce34g712898e7g912af5d6cb34b9cf34dg28e176a537gba2154fc89d6efc9e43671g5d28ba6d18f9ecb3a254g7245ag8bd697e3f1c
123456789abcdefg7dbf21cg46e859a389gadfeb2351c47656cea4937fdgb81294f37ab1e5862dgcd5289g46c13f7aebac16e28fdg7b9534eb7g3cd5a294168f
123456789abcdefgfcd639gb7e812a549a7bde2435fgc1865e8ga1cfd6249b37a1g7f496ed325cb8cd6ebg1254a8f97329f8e53c1b76a4gdb4537d8agfc9126e
123456789abcdefgdacgefb16854279378f5a29cde3g641b6eb934dg217f8a5c4g2b68fe3c9175dae7df9c35a6gb18428c9a21gb45d7e63f5613da47f2e8cgb9
123456789abcdefga896fdc271geb453fd5g4e9b6238c1a7c7be31ga5f4d28965e6fa2843d971cgb8b231c6de5ag7f49dcg9b7ef14865a32417a953gcbf28d6e
123456789abcdefg9ebg2ad3f64871c5c765gf412ed38a9bd8fa9ebc5g1724368b93a21g457dfc6e2age68cdb39f175474d6b5fea8c192g3f15c439762geb8da
123456789abcdefgdg86a9bc5ef37214aecfg13d248796b5975bf42e16gdca836df2459ag178eb3cbcg81ef74536ad92e5412d83bca9g76f7a93bcg6fd2e5148
123456789abcdefg89agedb2763f514cfdb7gac45e812936e65c9f31d2g487aba1d9824ec57b6fg325g37cf6a14db8e97b6fa59g38e214cd48ce31dbfg96a275
123456789abcdefg5afb9d1ce28g347689def3bg457621cacg76ae421df38b59f49g258b3ec71a6d318a49c76f2d5gbe2d67ea3f5g1b9c84be5c1g6da948f237
123456789abcdefg85fe1db36g74c9a2c96afg24e85d3b17d7gbec9a2f1368454d1573ebfc9g2a86b379681cd5a2f4geae289fdg764b15c3f6cga24513e87db9
123456789abcdefgag96d13e428f7c5bde852fcbg6731a497bfc94gade5182368a1b42d57fcge6935cdf6a1329ebg78427g3e9bf64d8a51ce6497g8c153a2bdf
123456789abcdefgeg67a24d538fc91b95cb13ef7dg48a62d8fa9cbg21e65743abd68921eg57f43c4e19g7c3a6fb28d5fc2gda564813eb978753e4fbc9d21ga6
123456789abcdefga5d6f39ceg8417b2bg8fe12ad57694c3e79cd4bg23f15a6898cb7g451d23e6af641abd8f7e5g329c7352ae16bfc98gd4defg29c346a87b15
123456789abcdefg5gbfa9c2d87e31646d79fe3b541gca82ac8e4d1g3f26597b71cg3fda4b58269ede56bcg7f2a914389af824561e3d7gbc342b189ec6g7ad5f
123456789abcdefgeb8712gc46fda5939agc3def58172b64d56f4a9b32ge178c8d4g2956abcf31e76325g8fe1479bdcaf1aeb3c7gd568942b7c9a41d23e86fg5
hope you enjoy these mike