My Photo
Blog powered by Typepad

November 2005

Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30      

« X-Wings | Main | Some blank sudoku grids »

August 18, 2005



The coordinates you use in the example of the swordfish do not seem to make sense. I'm trying to learn how to apply the swordfish technique to a su doku puzzle. You say that column 4 row 5 is (4,5) and if that cell contains a nine then (4,6) can't contain a 9 and cell (4,9) must. However, cell(4,6) and (4,9) both cannot contain 9's not just because there is a 3 located in (4,6) based on your coordinates and a 1 in (4,9) but also because you can't have two 9's in column 4. I'm fairly sure its just a labeling/typing error you made unless there's something i'm overlooking. Anyway, thanks for the help on the x-wings and the grids. Hopefully you can fix this soon to make it easier to understand.


Dan Rice

Thanks, Matt, I have made some changes and hopefully things should be fixed now. -Dan

Patrick Forsberg

The first swordfish starts off after elimination. But it seems to me that the elimination missed that box 7 (lower left) can only hold a 9 in (2,8) and therefor we can elmininate the blue 9's in (4,8) and (9,8) and thus making the whole swordfish moot.



Hi Patrick -

You are quite right -- the 9 can be placed in box 7 using the "eyeball" rule, so the first Swordfish is not necessary. The rules that are used in a given puzzle will always depend on the order in which they are applied. Arguably, a complex rule like Swordfish should be saved until all other options have been exhausted, since it can take a lot of work to find one.

My program missed this because it applied only the rule of elimination to cross out numbers. Strictly speaking, it is the rule of uniqueness that would allow the 9 to be placed, by observing that there is no other place for it in box 7.

Thanks for your comment!


I don't understand in your second example (with the swordfish in columns 1, 4, 9) why column 7 can't be part of the swordfish since it has 3's in the same 3 rows?



I didnt understand your explanation of the vertical and horizontal swordfishes or why they worked. Could you describe them in detail?


To Larry from 9/28/05: If I understand correctly, I believe you have to start with columns that have only (exactly) 2 occurrences of the number.


maybe a good example for the last point

3-1 958 -6-
*-8 *-4 5*1
*-4 2-- 3*8
*4- *-9 8*6
61- 8-5 -39
8-9 6-- -1-
--- --6 9--
296 4-- 1--
-8- -9- 6-7 * = swordfish(7)


Dear Dan, Just out of curiosity, how long did u take to solve the above Sudoku ? Monica


"Alternatively, if the 9 in row 5 appears in cell (6, 5), following things around the loop we see that 9's must also appear in cells (9, 9) and (4, 7). "

Why? (6,5) -> (9,9) But (4,7) and (4,8) are both valid, looking only at the 9s.


Your X Wing and the Swordfish example
both contain candidates that appear more than twice , making these candidates invalid and removable !

Your explanation of X-Wing, SwordFish is very clear, and your examples that include invalid candidates are the best I have seen so far.
On another subject: Now that I can understand sudoko...I am curious:

1. Is the level of diffculty programmed into a puzzle


must huge nymbers of computer programmed puzzles be solved in order to locate
the most difficult puzzles
that require X Wing and Swordish ?

2. Are there computer programs that can solve
sudoko without human intervention ?



Martine, I can answer your second question. There is a very simple computer algorithm that can solve any sudoku. It relies on a technique called "Depth First Search". A implementation of this would print on a single page of paper.

But for humans it is a terrible algorithm to simulate. It's the same thing you do when you're stuck and you make a guess. Then you work the puzzle until it is either solved or a contradiction occurs. When a contradiction occurs you must backup and rechoose your most recent decision.

Even for the hardest puzzles it will solve it in a fraction of a second.


what about this one

4 4 4

4 4

4 4

and this

4 4

4 4 4

4 4



In the first puzzle there is another Swordfish (more difficult to see) so as well as nines there is for one for ones. It took me more than ten minutes to see it. I have a software program than told me there was a Swordfish in ones but I did not use the software to show me the Swordfish as I like to see if I understand how to look for a Swordfish. I'm glad to say that I solved it. The Sword fish is a 2-2-2 Swordfish and the elignment (ones that are eliminated) is horizontal. Now what might confuse people is when they look at the answer you might think the enlignment is virtical.

I've just made a descovery which is suprising and that is there are two swordfish solutions for the ones. The solution I found is correct as the exact same candidtates were eliminated in the other solution. The second solution was the solution showed by my software and the Swordfish config is a 3-2-2 and the elignment for the eliminated candidates is virtical so meaning that they are eliminated virticaly and in the 2-2-2 solution the eliminated candidates are eliminated horizontaly. Once you see the solution for both, any one reading this will then or should understand what was mentioned by enlignment horizontal and vertical, so have a go and see if you can solved both Swordfish solutions for the candidate no one.

diana carr

hi, i tried to subscribe. it kept coming up bookmark instead of subscribe. i want to start coming here.

diana carr

i am a newbie, in love with sudoku. what do players use to write on their sudoku. i have an erasable soduko board, what else could be used over and over again.

Proactol Scam

Well explained . Thanks. I was searching for sudoku swordfish explanation.

Fibretrim Review

I adore sudoku . I'm not best player though :)

christian louboutin

You're a braver woman than I it was weeks before I could even begin to think about looking at the incisions from my lap. Even now I don't like to touch them.



Alternatively, if the 9 in row 5 appears in cell (6, 5), following things around the loop we see that 9's must also appear in cells (9, 9) and (4, 7).
Did you mean (7, 4), instead of (4, 7)?

authentic air jordan shoes

Sounds like some smart technology company should hire the Hammer.

ergo baby carrier sale

nice chris.....cant wait to see you in cali.......o yea i almost forgot........i got 2 of there email

ergo baby carrier

thanks for the help on the x-wings and the grids. Hopefully you can fix this soon to make it easier to understand.

Kaustav Mukherjee

I have a question, suppose there is a 9 in row 5 column 4, which will force 9 not to be there in row 5 column 6. Because column 6 in this case contains no other cell (apart from in row 9) where 9 is a candidate, this will force a 9 into row 9 column 6, right? But if there were another cell in column 6 with a 9 candidate, how could we proceed? In fact there is a similar situation here in the last column. Assuming a 6 in row 5 column 4, there can't be a 9 in row 9 column 9. From there you are telling that there has to be a 9 at row 7 column 9. But why, that 9 can be there in row 8 column 9 too, isn't it?

The comments to this entry are closed.