# XV Sawtooth Sudoku

Please find below a variant Sudoku puzzle, based on a combinatorics problem I was having a look at. The timing is right, as I recently saw @BeastlyGerbil back in chat, and I know that user is a big variant Sudoku fan. Welcome back!

In addition to normal Sudoku rules, XV rules apply: a pair of cells sharing an "x" must sum to 10, while a pair of cells sharing a "v" must sum to 5. All such pairs are shown, i.e., there IS a negative constraint, and no pair of adjacent cells not sharing an "x" or "v" can sum to 10 or 5, respectively.

Finally, there is a "sawtooth" rule: in each row, there is exactly one run of increasing cells; all transitions outside this run must be decreasing. For example, 267985431 (2679), 841236897 (123689) and 987651234 (1234) are legal rows, but 128973456 (1289 & 3456), 129876534 (129 and 34) and 987654321 (no increasing run) are not legal rows.

Here's the puzzle...I hope you enjoy!

An online version of this puzzle is available at F-Puzzles. Note that the online solver does not enforce the "sawtooth" rule, though it does enforce the XV rules.

• Oooh, a combination I've never seen, perfect! :P Jul 14 at 20:50
• Huh. Either I am stupid(an incredibly likely possibility) or this one is very hard. I thought I had made some logical deduction but I keep running into contradictions.
– Sid
Jul 14 at 20:51
• @Sid It's not trivial, and the sawtooth condition is not intuitive. Even on my third test solve, I had to think carefully about my deductions...hope you're able to get it! Jul 14 at 21:02
• The timer went green so I'm hoping that means the solution is correct :) That was a useful website, haven't seen it before Jul 14 at 22:33
• You forgot to mention that all the cell pairs that sum to 1 are marked with an "i".
– Qami
Jul 15 at 15:22

## Solution:

Took 1 hour and 35 minutes according to the timer!

(For all images, click/open in new tab for a larger, clearer version)

Let's start off by ignoring the sawtooth rule for now, and focusing on the XV conditions:

Green cells are 1, 2, 3 or 4
Red cells are 6, 7, 8 or 9
Blue cells cannot contain 5

Note that no coloured cell can contain 5. A couple of rows and boxes have 4 green cells, meaning all other cells must be 5 or more. A couple of Xs and Vs connect, leaving a green and red cell pairing.

One last key image before we start filling in numbers:

The middle row is interesting as there is an increase on the right hand side of the green cells, meaning there must be a decrease before. Furthermore, there cannot be an increase in the left 'V' pair, or there will be two sets of increases, meaning we have a couple of pairs. This allows us to remove a few candidates elsewhere.

Now we can start adding some numbers:

There HAS to be an increase in row 6 in the second V pair. This means that all numbers before must be decreasing, and as a result we get a 98765 streak. A lot of these are involved in Xs and Vs allowing us to fill in other numbers.

A few more numbers:

A lot of numbers can be filled in by looking at the pairs. Most of the middle rows are now filled out, and the remaining cells in rows 4, 5 and 6 for now have not yet be deduced.

Now let's look at the exclusivity element:

As all Xs and Vs are shown, some candidates can now be ruled out, allowing more numbers to be placed. The middle row can be completed and the left boxes can have more numbers placed and pairs created.

Looking at the top row now:

As there is a 1 and a 9 in the first 3 cells, it must be all decreasing after the 9. Furthermore this makes the top of the X a 7, and fills out the row. This leads to some more cells being placed.

The top 6 rows can now be solved by looking at exclusivity/sawtooth:

Quite straightforward for the top rows, simply eliminating candidates via the surrounding cells.

From here, the solution can be found trivially using the same techniques:

• That's it...great job! I liked how you played the sawtooth and XV rules back and forth...I hope you enjoyed! Jul 14 at 23:29
• @JeremyDover very enjoyable! It was quite tricky to get started, and had a good combo of the two constraints used, certainly not solvable without the rules given Jul 14 at 23:36
• One of the more powerful tools must be "the row that has the 9 in column 2". In any sawtooth sudoku, that row has at most 1 degree of freedom in all of the columns 3-9. At the "Now let's look at the exclusivity element" phase already, you know one of the bottom two rows must be exactly "398765421", because column 4 cannot have another 6 in it.
– Bass
Jul 17 at 18:22

The sawtooth rule gives us some super powerful tools. The other answer uses them, but doesn't outright abuse them, so here's another approach that does.

## Analyzing the constraints

By sudoku, we know there will be a row in the grid that has a nine in the second column. That row is severely restricted, it's basically just all the digits in descending order, with the exception that one of the digits is picked off the sequence and placed into column 1. Let's call this the 9@c2 row.

Looking at the grid, then, we notice that row 6 cannot be that row (too many Vs) and no other row has a V that could sit between the 3 and 2 of the descending sequence. From this, we can already deduce that the 9@c2 row is either 298765431 or 398765421.

Using a very similar deduction, we can also figure out most of row "9@c3", the row with the nine in column 3. Here I've placed those rows on another sudoku grid, because we have no idea where those rows will go in our puzzle here.

Continuing in the same manner, we can figure out the next row too. Note that a 3 in c8 would place either a 2 (impossible, no V) or a 1 (already on row 9@c2) to the last column, so we get a bit further than expected:

Continuing (but not pencilmarking) in the same manner, we find that the options for the next couple of rows are seriously limited by the rows above, so we get this far:

Since we must have all of these rows in the puzzle, we find that any high digit in the middle columns instantly gives us a good many of its neighbours.

## Using the analysis to cheat our way through the puzzle

Once we know that all those rows must exist somewhere, the sudoku is suddenly quite a lot easier. To get started, the final four digits of row 6 must be 1234, in an order that contains the upwards bit, which gives us

Here, we were able to place the last two digits in row 6, because we know the 1 in column 9 is on row 9@c2.

More importantly, we already know line 4! Box 5 has digits 789 on line 4, and we know from above that in the middle columns, 8 always follows a 9, and a 7 always follows an 8. So row 4 has the 9 in column 4, and we can just copy-paste in the rest of the row:

Completing boxes 4-6, we find that column 1's one must be on the top two rows.

This lets us start hunting the nines. The row with the one in column 1 has the nine in column 3. Also, row three has an 8 in column 1, so its nine must be in the last two columns, out of which one is ruled out by the X causing a clash of ones.

The nines in boxes 7 and 9 form an X-wing, so the nine in column 5 can be placed, along with the digits we know must follow it:

The six we got in r7c8 disambiguates the top 2 rows: the row that starts with a 1 has a 4 in column 8, and we can't place a 4 on the X in column 8.

Now, filling up the top is easy:

And the X in column 4 is also resolved, it must be a 3+7, with the 3 on top. This means we have found the 9@c2 row:

and the rest follows trivially.

• This is a really great analysis...thanks! Jul 18 at 13:08
• Just realised the ones can be placed on all of the analysed rows, so we could have cheated on row 5 too. Oh well :-)
– Bass
Jul 18 at 13:50
• Oooh this is very interesting and also explains a lot of patterns in the rows with number sequences, +1! Jul 19 at 18:14