[math-fun] Constructing a constrained sudoku grid
I want to construct an ordinary 9x9 sudoku grid [I'm not worrying [yet] about clueing it to be unique, solvable, proper difficulty, etc, I'm just working on "making the constrained Latin square" part now]. What I want is the main diagonal to be 1, 2, 3, 3, 4, 5, 6, 4, 5. I've been dinking around with generating sudoku squares and then relabeling and rotating rows and columns (within the six "3-wide" row and column blocks, of course) and trying to get that pattern on the diagonal. So far, I haven't been able to manage it, which has left me with three questions: 1) can *any*sudoku square be shifted/relabeled to get that pattern [that is, is it just lack of smarts/tenacity on my part that the few grids I've tried brute-forcing into that pattern don't work? [I'd guess not. I'm guessing that among the equivalence classes of sudoku grids some will admit my desired diagonal pattern and some won't. 2) Is it possible that there is *NO* sudoku square with the desired pattern on the diagonal [that is, is there some constraint I don't understand in setting up a Latin square?]. Again, I'm guessing [hoping actually..:o)] not: Just as I'm guessing that some equiv classes will for-sure not allow my diagonal pattern, I'm also guessing that for ANY diagonal pattern [and the one I want in particular], there'll always be at least ONE equivalence class that'll allow it. 3) and the middle ground: if it IS possible, but just not for any particular sudoku grid I'm left with a quandry: There are a zillion equivalence classes of 9x9 Latin squares (fewer, I guess of legal sudoku grids but probably still "zillions")... and so how might I go about *finding* one that has the desired main-diagonal constraint? /Bernie\ -- Bernie Cosell Fantasy Farm Fibers mailto:bernie@fantasyfarm.com Pearisburg, VA --> Too many people, too few sheep <--
try {1,4,5,2,3,6,7,8,0} {8,2,7,1,0,0,0,0,0} {0,6,3,4,7,0,0,0,0} {4,0,0,3,1,2,0,0,0} {0,0,0,0,4,0,0,0,0} {0,0,0,8,6,5,0,0,0} {0,0,0,5,2,1,6,0,0} {2,0,0,6,8,0,1,4,0} {0,0,0,0,0,0,2,0,5} it solves. W. ----- Original Message ----- From: "Bernie Cosell" <bernie@fantasyfarm.com> To: "math-fun" <math-fun@mailman.xmission.com> Sent: Sunday, September 02, 2007 1:02 AM Subject: [math-fun] Constructing a constrained sudoku grid
I want to construct an ordinary 9x9 sudoku grid [I'm not worrying [yet] about clueing it to be unique, solvable, proper difficulty, etc, I'm just working on "making the constrained Latin square" part now]. What I want is the main diagonal to be 1, 2, 3, 3, 4, 5, 6, 4, 5.
I've been dinking around with generating sudoku squares and then relabeling and rotating rows and columns (within the six "3-wide" row and column blocks, of course) and trying to get that pattern on the diagonal.
So far, I haven't been able to manage it, which has left me with three questions:
1) can *any*sudoku square be shifted/relabeled to get that pattern [that is, is it just lack of smarts/tenacity on my part that the few grids I've tried brute-forcing into that pattern don't work? [I'd guess not. I'm guessing that among the equivalence classes of sudoku grids some will admit my desired diagonal pattern and some won't.
2) Is it possible that there is *NO* sudoku square with the desired pattern on the diagonal [that is, is there some constraint I don't understand in setting up a Latin square?]. Again, I'm guessing [hoping actually..:o)] not: Just as I'm guessing that some equiv classes will for-sure not allow my diagonal pattern, I'm also guessing that for ANY diagonal pattern [and the one I want in particular], there'll always be at least ONE equivalence class that'll allow it.
3) and the middle ground: if it IS possible, but just not for any particular sudoku grid I'm left with a quandry: There are a zillion equivalence classes of 9x9 Latin squares (fewer, I guess of legal sudoku grids but probably still "zillions")... and so how might I go about *finding* one that has the desired main-diagonal constraint?
/Bernie\
-- Bernie Cosell Fantasy Farm Fibers mailto:bernie@fantasyfarm.com Pearisburg, VA --> Too many people, too few sheep <--
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
__________ NOD32 2497 (20070901) Informatie __________
Dit bericht is gecontroleerd door het NOD32 Antivirus Systeem. http://www.nod32.nl
participants (2)
-
Bernie Cosell -
wouter meeussen