首页 > Windows开发 > 详细

X Wing

时间:2020-12-28 14:30:13      阅读:65      评论:0      收藏:0      [点我收藏+]

https://www.learn-sudoku.com/x-wing.html

X Wing

An X Wing is a technique for removing candidates (pencil marks).

It starts with either two parallel rows or two parallel columns. Blocks are not involved here.

If you can find a row that contains the same pencil mark in exactly two spots, as well as another parallel row that mirrors it – containing the same pencil mark in only the same two spots, then you can use this information to eliminate similar pencil marks in the columns passing through those spots.

I know…that’s a mouthful. Let me illustrate. Here we see a row containing exactly two 4s:

技术分享图片

Next, if we zoom out a bit, we can see that another row, two rows down, has the same two 4s, and in the same two spots:

技术分享图片

Now if we think about this, we know that each of these rows has to have a 4, right? And we also know the 4s cannot be on top of each other, because that would put two 4s in the same column.

Because of this, we can safely assume that either the light blue cells or the dark blue cells must be 4s.

Armed with this, let’s zoom out all the way and shift our focus to the columns involved here (indicated with arrows below). Based on what we said above, the 4s in these columns must exist where these two rows cross - that is, where the blue 4s are.

Knowing that, all other 4s in the columns are not possible, and can be erased (erase all the pink 4s).

技术分享图片

Again, this is one of those hard to find methods. In Sudoklue, the same pencil mark highlighting feature that helps me find hidden singles and omissions, can make X Wings easier to spot as well.

Of course, this whole concept can be rotated. If you can find two columns with only two identical positions for a given pencil mark, then the corresponding rows intersecting these positions can have all other candidates safely removed. 

 

配置

技术分享图片

 

下面这个,必须使用X-Wing来处理,点一下Hint,会提示

     Hints are based on candidate values in cells. Since you did not provide any candidates, generated candidates have been used to provide this hint.
Hint Description
The highlighted cells ( B5, D5, B8, D8 ) in the shaded rows are an XWing.
The candidate values (9) can be removed from cells ( B4, B6, D4, D6, D9 ) in the shaded row

技术分享图片

 

可以generate candidates来生成备选的

技术分享图片

 

X Wing

原文:https://www.cnblogs.com/chucklu/p/14201051.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!