View previous topic :: View next topic |
Author |
Message |
bram Guest
|
Posted: Fri Oct 28, 2005 1:01 am Post subject: flash sudoku solver |
|
|
I'm not sure why you would want to use it, but I wrote this for the challenge... was bored... I want to show off:
http://www.jacquesmalchance.com/sudoku
no installation + seems to solve nearly anything
thanks for looking!
bram |
|
Back to top |
|
|
guest Guest
|
Posted: Fri Oct 28, 2005 7:31 am Post subject: |
|
|
What's the point for the person who wants the challenge of stimulating their own brain with the challenge of Solving a Sudoku |
|
Back to top |
|
|
Guest
|
Posted: Fri Oct 28, 2005 8:28 am Post subject: |
|
|
None. It is a completely useless program. And I made it! |
|
Back to top |
|
|
Guest
|
Posted: Fri Oct 28, 2005 7:04 pm Post subject: |
|
|
a slick bit of nothing it is though.....i was thinking about doing one in excel...but your nothing is much more elegant |
|
Back to top |
|
|
Guest
|
Posted: Fri Oct 28, 2005 9:13 pm Post subject: |
|
|
veery slick :up: - got a bit stuck with this one though :s |
|
Back to top |
|
|
Guest
|
Posted: Fri Oct 28, 2005 9:17 pm Post subject: |
|
|
ignore- I entered it wrong |
|
Back to top |
|
|
bram Guest
|
Posted: Sat Oct 29, 2005 7:26 pm Post subject: |
|
|
thanks!!
btw you can copy paste puzzles thru the load/save icons, if they're in a format like this (blank=0, non-numerals are ignored):
350002600
020004080
000500100
700300000
034020890
000009007
003005000
090100030
002900014
(this puzzle is HARD btw!) |
|
Back to top |
|
|
David Bryant
Joined: 29 Jul 2005 Posts: 559 Location: Denver, Colorado
|
Posted: Sat Oct 29, 2005 8:53 pm Post subject: It's not that hard |
|
|
bram Guest wrote: | (this puzzle is HARD btw!) |
If you notice the swordfish in the "5"s that's present in the initial setup it's really pretty straightforward. dcb |
|
Back to top |
|
|
Louise56
Joined: 21 Sep 2005 Posts: 94 Location: El Cajon, California USA
|
Posted: Sun Oct 30, 2005 12:29 am Post subject: Re: It's not that hard |
|
|
[/quote] If you notice the swordfish in the "5"s that's present in the initial setup it's really pretty straightforward. dcb [/quote]
Hi David!
Can you explain what a swordfish is? (Sudoku term that is) |
|
Back to top |
|
|
someone_somewhere
Joined: 07 Aug 2005 Posts: 275 Location: Munich
|
Posted: Sun Oct 30, 2005 8:04 am Post subject: |
|
|
Hi,
David, no need for any fresh fish.
Only vegetarian technique can do it:
9 in r1c9 - Sole Candidate
4 in r1c8 9 in r4c3 3 in r6c7 9 in r7c7 - Unique Horizontal
2 in r6c1 2 in r7c4 4 in r4c7 - Unique Vertical
4 in r6c4 2 in r8c7 - Unique Vertical
8 in r1c4 - Unique Vertical
1 not in r4c5, it is in r4c6 or r5c6 (Column on 3x3 Block interaction)
1 not in r6c5, it is in r4c6 or r5c6 (same reason)
5 not in r4c9, it is in r4c8 or r6c8 (same reason)
5 not in r5c9, it is in r4c8 or r6c8 (same reason)
and now all following numbers are "Unique Horizontal":
5 in r5c1 5 in r9c7
5 in r2c9 5 in r8c3
3 in r2c5 3 in r3c9 3 in r9c6
9 in r2c1 2 in r3c8 9 in r3c5 2 in r4c9
1 in r2c3 1 in r6c2 1 in r7c1
1 in r1c5 6 in r2c4 1 in r4c6 1 in r5c9
7 in r1c3 7 in r2c7 7 in r3c6 6 in r5c6 7 in r5c4 7 in r8c5 7 in r9c2
7 in r7c8 4 in r8c1
4 in r3c2 4 in r7c5 6 in r8c9
6 in r7c2 8 in r8c6 6 in r9c5 8 in r9c1
8 in r3c3 6 in r4c8 6 in r6c3 8 in r6c5 8 in r7c9
6 in r3c1 5 in r4c5 8 in r4c2 5 in r6c8
Final SuDoku Table
3 5 7 8 1 2 6 4 9
9 2 1 6 3 4 7 8 5
6 4 8 5 9 7 1 2 3
7 8 9 3 5 1 4 6 2
5 3 4 7 2 6 8 9 1
2 1 6 4 8 9 3 5 7
1 6 3 2 4 5 9 7 8
4 9 5 1 7 8 2 3 6
8 7 2 9 6 3 5 1 4
P.S. I like fish a lot and I am not a vegetarian.
Cheese and a good red wine - will do it also. A lot.
But they are not so well known in Japan.
see u, |
|
Back to top |
|
|
David Bryant
Joined: 29 Jul 2005 Posts: 559 Location: Denver, Colorado
|
Posted: Sun Oct 30, 2005 1:11 pm Post subject: Swordfish |
|
|
Louise wrote: | Hi David!
Can you explain what a swordfish is? (Sudoku term that is) |
A swordfish is sort of like an "X-Wing", but more complicated. In its most general form, a swordfish involves three columns (or rows) in each of which a certain value can only appear in three places -- and these three places have to line up. It looks sort of like a tic-tac-toe board fitted inside the sudoku grid. Here's a picture.
Code: | . . . . . . . . .
. * . . * . . * .
. . . . . . . . .
. . . . . . . . .
. * . . * . . * .
. . . . . . . . .
. . . . . . . . .
. * . . * . . * .
. . . . . . . . . |
Imagine that the nine cells marked by asterisks are the only places a particular digit can appear in rows 2, 5, & 8. Then it's apparent that these nine cells are also the only places that same digit can appear in columns 2, 5, & 8. So we may be able to eliminate some possibilities when we spot a swordfish.
Of course, the swordfish doesn't have to be as symmetrical as this. And up to three of the "nodes" can be missing -- the essential point is that the network forces one particular digit to line up in a predictable way. Here's a sort of swordfish that is more likely to show up in a real puzzle.
Code: | . . . . . . . . .
. . . . * . . * .
. . . . . . . . .
. . . . . . . . .
. * . . . . . * .
. . . . . . . . .
. . . . . . . . .
. * . . * . . . .
. . . . . . . . . |
For a real example, let's look at the puzzle Bram posted above. In this puzzle there are three "5"s in the initial setup, and 19 spots (marked "x" below) that might apparently contain a "5".
Code: | 3 5 . . . 2 6 . .
. 2 . . . 4 X 8 X
. . . 5 . . 1 . .
7 . x 3 x . x x x
X 3 4 . 2 . 8 9 X
x . x . x 9 x x 7
. . 3 . . 5 . . .
x 9 x 1 . . x 3 x
X . 2 9 . . X 1 4 |
There are only two x's in row 2, row 5, and row 9. And they line up right, so we can be certain that the "5" in column 1 must be either in r5c1 or r9c1; that the "5" in column 7 must be either in r2c7 or in r9c7; and that the "5" in column 9 must be either in r2c9 or in r5c9. So we can eliminate the possibility of a "5" in seven places: in r6c1 & r8c1; in r4c7, r6c7, & r8c7; and in r4c9 & r8c9. After those eliminations the grid looks like this:
Code: | 3 5 . . . 2 6 . .
. 2 . . . 4 x 8 x
. . . 5 . . 1 . .
7 . x 3 x . . x .
x 3 4 . 2 . 8 9 x
. . x . x 9 . x 7
. . 3 . . 5 . . .
. 9 x 1 . . . 3 .
x . 2 9 . . x 1 4 |
Now there are only 12 places where a "5" can appear in this puzzle, and column 7 (in particular) becomes rather easy to fill in.
I hope that's enough on swordfish, Louise. If you want to see more examples, take a look over in the "Other puzzles" section. There's a post here that's a bit intricate, but understandable. dcb |
|
Back to top |
|
|
Louise56
Joined: 21 Sep 2005 Posts: 94 Location: El Cajon, California USA
|
Posted: Sun Oct 30, 2005 10:57 pm Post subject: |
|
|
Thanks David,
I'm going to have to print this puzzle out and see if I can get this. I may end up a vegetarian like Someone Somewhere. I appreciate your explanation. |
|
Back to top |
|
|
Louise56
Joined: 21 Sep 2005 Posts: 94 Location: El Cajon, California USA
|
Posted: Mon Oct 31, 2005 12:51 am Post subject: |
|
|
David,
I printed out a blank grid and figured out the swordfish as you explained it. It's similar to an XWing. How far along were you when you used the swordfish technique? I'm trying to solve the harder puzzles without putting in so many possibilities. I'm getting better at catching various kinds of pairs early on. Thanks again coach! |
|
Back to top |
|
|
someone_somewhere
Joined: 07 Aug 2005 Posts: 275 Location: Munich
|
Posted: Mon Oct 31, 2005 6:34 am Post subject: puzzle - solution with X-wing, XY-wing, Swordfish |
|
|
Hi,
I have an example:
000000000
086000210
300107009
700302001
023000760
600704003
800609005
059000370
000000000
and this one I had to use in this order:
X-Wing on Column, Swordfish on Row, Hidden Pair and XY-Wing.
I did not look for coloring, forcing chains, Nishio that could also lead to a solution.
have fun, |
|
Back to top |
|
|
someone_somewhere
Joined: 07 Aug 2005 Posts: 275 Location: Munich
|
Posted: Mon Oct 31, 2005 6:37 am Post subject: |
|
|
Hi,
and here is a 17 puzzle where I had to use swordfish:
050400000
000030800
000000001
300080700
060000050
000200000
000506040
108000300
000000000
If you could do it with other techniques and NOT using swordfish,
it could be nice to post it here.
see u, |
|
Back to top |
|
|
someone_somewhere
Joined: 07 Aug 2005 Posts: 275 Location: Munich
|
Posted: Mon Oct 31, 2005 6:47 am Post subject: |
|
|
Hi,
And here one where I broke my teeth:
600040003
010000070
005000800
000502000
300090002
000103000
008000900
070000050
200030004
I have found a swordfish and could eliminate six numbers.
But ...
How to continue I am still working on. I know that applying "double implication chains" it can be break it up !!!
There is always someone better than me.
If you find an other way,
just post it here,
you will make my day.
see u, |
|
Back to top |
|
|
David Bryant
Joined: 29 Jul 2005 Posts: 559 Location: Denver, Colorado
|
Posted: Mon Oct 31, 2005 3:29 pm Post subject: Spotting patterns early |
|
|
Louise wrote: | David,
I printed out a blank grid and figured out the swordfish as you explained it. It's similar to an XWing. How far along were you when you used the swordfish technique? |
I actually worked this puzzle out several times, because the swordfish caught my interest.
The first time through I had placed 9 numbers in the starting grid, and had arrived at this position before I spotted the swordfish.
Code: | 3 5 . . . 2 6 4 9
. 2 . . . 4 5/7 8 3/5
. . . 5 . . 1 2/7 2/3
7 . . 3 . . 4 . .
5/6 3 4 6/7 2 . 8 9 .
2 . . 4 . 9 3 . 7
. . 3 2 . 5 9 . .
. 9 . 1 . . 2 3 .
. . 2 9 . . 5/7 1 4 |
I had been concentrating on the right hand side of the puzzle because the numbers there were easy to find. I started concentrating on the "5"s because I saw that if I could resolve the {5, 7} pair in column 7 the whole puzzle would just crumble. Also, you'll notice that I had already identified four corners of the six-cornered swordfish pattern at this point, because they already stuck out, as pairs. It was pretty easy to see that the "5" could only fit in two places in row 5 because of the {5, 7} pair in column 7, and that same pair naturally drew my attention to row 9.
A cute thing about this particular swordfish is that it resolves itself -- after eliminating the possibility of a "5" at r8c9 it's apparent that r9c7 = 5, because that's the only way left for a "5" to fit in the bottom right 3x3 box. I don't remember seeing this situation before. But then, I haven't caught a whole lot of swordfish yet, either!
Anyway, after I'd worked through the puzzle the first time I was curious, so I went back and analyzed it from the start and noticed that the swordfish pattern was apparent in this grid from the very beginning. But I sure didn't notice that the first time around. dcb |
|
Back to top |
|
|
David Bryant
Joined: 29 Jul 2005 Posts: 559 Location: Denver, Colorado
|
Posted: Mon Oct 31, 2005 4:46 pm Post subject: The Big X |
|
|
Someone_Somewhere wrote: | Hi,
And here one where I broke my teeth: |
Well, I spent a little time on it and couldn't even place one additional number. That's a very tough puzzle!
I found a swordfish in the "5"s. I also noticed a hidden pair {2, 3} in the bottom right 3x3 box, and I see that the "4" in row 5 must fall either in r5c4 or r5c6.
I looked for the "jellyfish" and "squirmbag" patterns for a little while, but didn't find any. I haven't ruled them all out, either -- this puzzle presents a plethora of perplexing possibilities! dcb |
|
Back to top |
|
|
someone_somewhere
Joined: 07 Aug 2005 Posts: 275 Location: Munich
|
Posted: Mon Nov 07, 2005 10:13 am Post subject: |
|
|
Hi,
A: Just to find the persons, who are better than me and learn from them.
P.S. My 85 old mother is a great Sudoku solver. She is managing almost every hard and very hard ones by using techniques up to X-Wing.
Getting older, I am looking for the ones, that break my tees, tees that I still have left. The number of Sudoku positions are limited, so my number of tees ;-)
Q: Why not to share them (the positions, not the tees)?
see u, |
|
Back to top |
|
|
alanr555
Joined: 01 Aug 2005 Posts: 198 Location: Bideford Devon EX39
|
Posted: Tue Nov 08, 2005 2:50 am Post subject: |
|
|
Code: |
> btw you can copy paste puzzles thru the load/save icons,
> if they're in a format like this:
350002600
020004080
000500100
700300000
034020890
000009007
003005000
090100030
002900014
Thanks for this tip.
However, WHERE are these icons?
- not in Orthodox churches, I presume!
Seriously though the DRAW facility is excellent. However I have not
used it so often for puzzles quoted in a form like this one as it has
been a pain to have to write out the grid and then to type it into DRAW.
It would not be so bad if there were a way to have open both DRAW and
the forum at the same time (like having Word and Excel together). Does
anyone have the secret on how to have the forum and DRAW both
displayed? Then one could enter the digits into DRAW directly from the
screen display and reduce the chance of transcription errors.
Alan Rayner BS23 2QT
|
|
|
Back to top |
|
|
|