Can someone solve my first thermo-sudoku?

For fans of Killer Sudoku, Samurai Sudoku and other variants

Can someone solve my first thermo-sudoku?

Postby gifmenger » Tue Aug 10, 2021 7:10 pm

Hello everyone,

I had an idea for a sudoku. I don't know if it's solvable (I think it is). My own solving-skills are not good enough to know for sure. Can someone solve it to be sure?

The rules:
Normal Sudoku rules apply. The thermometers increase from the bulb end. All horizontal and vertical thermometers with 3 or more squares are given. The blue thermometers are the same as the grey ones, but they start within another thermometer. So they are separate from the thermometer they are in.


I'm new to this forum. Tips and tricks for sudoku making (and solving) are welcome.
Last edited by gifmenger on Mon Aug 30, 2021 8:53 pm, edited 1 time in total.
gifmenger
 
Posts: 4
Joined: 09 August 2021

Re: Can someone solve my first thermo-sudoku?

Postby denis_berthier » Wed Aug 11, 2021 4:07 am

.
Hi gifmenger
welcome on this forum.


Thermometers are a very bad visual representation of inequality constraints.
A much simpler way to see a thermometer is merely as a set of inequalities between adjacent cells [unless you mean they increase by 1 only?????).
As a result, the game is Futoshiki + block constraints (and this thread should better be in the "other logic games" section.

My Futoshiki solver (a part of my general CSP solver CSP-Rules) doesn't have a variant with block constraints (which could be called Sudoshiki), but I tried it on this puzzle.
asc-chains correspond to the thermometers (except that they can bend)
hills and valleys correspond to taking into account two thermometers meeting at some point.
Both are build automatically (and trivially) from the inequalities.

(solve 9
"................................................................................."
"------<<-->>>>----->><<<<<---->>---->><<-----<<->>--->>---->>->>>>--<<--"
"->>------->><<>>----->>--->>><<->>->>>-->>->>---------<<->>>----->>-----"
)
***********************************************************************************************
*** FutoRules 2.1.s based on CSP-Rules 2.1.s, config = W+S
*** Using CLIPS 6.32-r813
*** Running on MacBookPro Retina Mid-2012 i7 2.7GHz, 16GB 1600MHz DDR3, MacOS 10.15.7
*** Download from: https://github.com/denis-berthier/CSP-Rules-V2.1
***********************************************************************************************
asc[2]: r4c9<r3c9<r2c9 ==> r4c9≠9, r4c9≠8, r3c9≠9, r3c9≠1, r2c9≠2, r2c9≠1
asc[2]: r6c6<r5c6<r4c6 ==> r6c6≠9, r6c6≠8, r5c6≠9, r5c6≠1, r4c6≠2, r4c6≠1
asc[3]: r6c6<r5c6<r5c5<r4c5 ==> r6c6≠7, r5c6≠8, r5c5≠9, r5c5≠2, r5c5≠1, r4c5≠3, r4c5≠2, r4c5≠1
asc[2]: r3c6<r2c6<r1c6 ==> r3c6≠9, r3c6≠8, r2c6≠9, r2c6≠1, r1c6≠2, r1c6≠1
asc[3]: r3c6<r2c6<r2c5<r1c5 ==> r3c6≠7, r2c6≠8, r2c5≠9, r2c5≠2, r2c5≠1, r1c5≠3, r1c5≠2, r1c5≠1
asc[4]: r3c6<r2c6<r2c5<r2c4<r2c3 ==> r3c6≠6, r2c6≠7, r2c5≠8, r2c4≠9, r2c4≠3, r2c4≠2, r2c4≠1, r2c3≠4, r2c3≠3, r2c3≠2, r2c3≠1
asc[3]: r7c5<r6c5<r5c5<r4c5 ==> r7c5≠9, r7c5≠8, r7c5≠7, r6c5≠9, r6c5≠8, r6c5≠1
asc[2]: r6c4<r7c4<r8c4 ==> r8c4≠2, r8c4≠1, r7c4≠9, r7c4≠1, r6c4≠9, r6c4≠8
asc[3]: r6c4<r5c4<r4c4<r3c4 ==> r6c4≠7, r5c4≠9, r5c4≠8, r5c4≠1, r4c4≠9, r4c4≠2, r4c4≠1, r3c4≠3, r3c4≠2, r3c4≠1
asc[2]: r8c3<r7c3<r6c3 ==> r8c3≠9, r8c3≠8, r7c3≠9, r7c3≠1, r6c3≠2, r6c3≠1
asc[3]: r8c3<r7c3<r7c2<r7c1 ==> r8c3≠7, r7c3≠8, r7c2≠9, r7c2≠2, r7c2≠1, r7c1≠3, r7c1≠2, r7c1≠1
asc[3]: r5c2<r6c2<r7c2<r7c1 ==> r6c2≠9, r6c2≠8, r6c2≠1, r5c2≠9, r5c2≠8, r5c2≠7
asc[2]: r5c2<r4c2<r3c2 ==> r4c2≠9, r4c2≠1, r3c2≠2, r3c2≠1
asc[2]: r5c2<r4c2<r4c3 ==> r4c3≠2, r4c3≠1
asc[2]: r4c1<r3c1<r2c1 ==> r4c1≠9, r4c1≠8, r3c1≠9, r3c1≠1, r2c1≠2, r2c1≠1
asc[2]: r9c5<r9c6<r9c7 ==> r9c7≠2, r9c7≠1, r9c6≠9, r9c6≠1, r9c5≠9, r9c5≠8
asc[4]: r9c3<r9c2<r8c2<r7c2<r7c1 ==> r9c3≠9, r9c3≠8, r9c3≠7, r9c3≠6, r9c2≠9, r9c2≠8, r9c2≠7, r9c2≠1, r8c2≠9, r8c2≠8, r8c2≠2, r8c2≠1, r7c2≠3, r7c1≠4
asc[2]: r9c3<r9c2<r9c1 ==> r9c1≠2, r9c1≠1
asc[3]: r8c9<r8c8<r8c7<r9c7 ==> r9c7≠3, r8c9≠9, r8c9≠8, r8c9≠7, r8c8≠9, r8c8≠8, r8c8≠1, r8c7≠9, r8c7≠2, r8c7≠1
asc[2]: r8c6<r8c5<r8c4 ==> r8c6≠9, r8c6≠8, r8c5≠9, r8c5≠1
asc[3]: r7c8<r7c7<r8c7<r9c7 ==> r7c8≠9, r7c8≠8, r7c8≠7, r7c7≠9, r7c7≠8, r7c7≠1
asc[2]: r7c8<r7c7<r7c6 ==> r7c6≠2, r7c6≠1
asc[2]: r6c6<r6c7<r6c8 ==> r6c8≠2, r6c8≠1, r6c7≠9, r6c7≠1
asc[4]: r5c7<r5c8<r4c8<r3c8<r2c8 ==> r5c8≠9, r5c8≠8, r5c8≠7, r5c8≠1, r5c7≠9, r5c7≠8, r5c7≠7, r5c7≠6, r4c8≠9, r4c8≠8, r4c8≠2, r4c8≠1, r3c8≠9, r3c8≠3, r3c8≠2, r3c8≠1, r2c8≠4, r2c8≠3, r2c8≠2, r2c8≠1
asc[5]: r5c7<r5c8<r4c8<r3c8<r3c9<r2c9 ==> r5c8≠6, r5c7≠5, r4c8≠7, r3c9≠4, r3c9≠3, r3c9≠2, r3c8≠8, r2c9≠5, r2c9≠4, r2c9≠3
asc[3]: r5c7<r5c8<r4c8<r4c7 ==> r4c7≠3, r4c7≠2, r4c7≠1
asc[2]: r5c7<r5c8<r5c9 ==> r5c9≠2, r5c9≠1
asc[3]: r4c9<r4c8<r3c8<r2c8 ==> r4c9≠7
asc[4]: r4c9<r4c8<r3c8<r3c9<r2c9 ==> r4c9≠6
asc[3]: r3c6<r3c7<r3c8<r2c8 ==> r3c7≠9, r3c7≠8, r3c7≠1
asc[4]: r3c6<r3c7<r3c8<r3c9<r2c9 ==> r3c7≠7
asc[3]: r3c6<r3c5<r2c5<r1c5 ==> r3c5≠9, r3c5≠8, r3c5≠1
asc[4]: r3c6<r3c5<r2c5<r2c4<r2c3 ==> r3c5≠7
asc[2]: r2c7<r2c6<r1c6 ==> r2c7≠9, r2c7≠8
asc[3]: r2c7<r2c6<r2c5<r1c5 ==> r2c7≠7
asc[4]: r2c7<r2c6<r2c5<r2c4<r2c3 ==> r2c7≠6
asc[2]: r1c7<r1c8<r1c9 ==> r1c9≠2, r1c9≠1, r1c8≠9, r1c8≠1, r1c7≠9, r1c7≠8
valley[5]: r3c4>r4c4>r5c4>r6c4<r7c4<r8c4 ==> r6c4≠6, r6c4≠5
hill[4]: r5c2<r6c2<r7c2>r8c2>r9c2 ==> r7c2≠4
str-asc[1]: r7c2<r7c1 ==> r7c1≠5
valley[4]: r3c2>r4c2>r5c2<r6c2<r7c2 ==> r5c2≠6
valley[5]: r3c4>r3c5>r3c6<r3c7<r3c8<r3c9 ==> r3c6≠5
Code: Select all
Resolution state after Singles and whips[1]:
   123456789 123456789 123456789 123456789 456789    3456789   1234567   2345678   3456789
   3456789   123456789 56789     45678     34567     23456     12345     56789     6789
   2345678   3456789   123456789 456789    23456     1234      23456     4567      5678
   1234567   2345678   3456789   345678    456789    3456789   456789    3456      12345
   123456789 12345     123456789 234567    345678    234567    1234      2345      3456789
   123456789 234567    3456789   1234      234567    123456    2345678   3456789   123456789
   6789      5678      234567    2345678   123456    3456789   234567    123456    123456789
   123456789 34567     123456    3456789   2345678   1234567   345678    234567    123456
   3456789   23456     12345     123456789 1234567   2345678   456789    123456789 123456789
521 candidates, 4695 csp-links and 7494 links. Density = 5.53%


x-wing-in-columns: n1{c5 c8}{r7 r9} ==> r9c9≠1, r9c4≠1, r9c3≠1, r7c9≠1
str-asc[1]: r9c3<r9c2 ==> r9c2≠2
str-asc[1]: r9c2<r9c1 ==> r9c1≠3
str-asc[1]: r9c2<r8c2 ==> r8c2≠3
whip[2]: r2n1{c7 c2} - r2n2{c2 .} ==> r2c7≠3, r2c7≠4, r2c7≠5
whip[2]: r4n1{c1 c9} - r4n2{c9 .} ==> r4c1≠3, r4c1≠4, r4c1≠5, r4c1≠6, r4c1≠7
whip[4]: r8c7{n8 n3} - r7c7{n7 n2} - r5c7{n2 n1} - r2c7{n1 .} ==> r9c7≠4
whip[4]: r2c5{n6 n7} - r2c4{n7 n8} - r2c9{n8 n9} - r2c3{n9 .} ==> r2c6≠6
g-whip[5]: c4n1{r6 r1} - c4n2{r1 r9} - r7c4{n2 n4+} - c4n3{r7 r4} - r5c4{n3 .} ==> r6c4≠4
whip[3]: r6c7{n8 n2} - r6c6{n6 n1} - r6c4{n1 .} ==> r6c8≠3
whip[7]: r3n1{c6 c3} - r3n2{c3 c1} - r3n3{c1 c2} - r4c2{n8 n2} - r5c2{n5 n1} - r2n1{c2 c7} - r2n2{c7 .} ==> r3c6≠4
whip[3]: r5c6{n7 n2} - r6c6{n6 n1} - r3c6{n1 .} ==> r4c6≠3
g-whip[7]: c7n9{r9 r4} - c7n8{r4 r6} - r8c7{n8 n6-} - c7n7{r8 r1} - r1c8{n6 n8} - r1c9{n7 n9} - c5n9{r1 .} ==> r9c7≠6
g-whip[7]: c7n9{r9 r4} - c7n8{r4 r6} - r8c7{n8 n5-} - c7n7{r8 r1} - r1c8{n6 n8} - r1c9{n7 n9} - c5n9{r1 .} ==> r9c7≠5
g-whip[11]: r7c7{n7 n2} - r2c7{n2 n1} - r5c7{n1 n4} - r5c8{n3 n5} - r4c8{n5 n6} - r3c8{n6 n7} - r3c9{n6 n8} - r2c9{n8 n9} - r2c8{n9 n8} - r1c8{n8 n5-} - r1c7{n7 .} ==> r8c7≠3
Code: Select all
Final resolution state:
   123456789 123456789 123456789 123456789 456789    3456789   1234567   2345678   3456789
   3456789   123456789 56789     45678     34567     2345      12        56789     6789
   2345678   3456789   123456789 456789    23456     123       23456     4567      5678
   12        2345678   3456789   345678    456789    456789    456789    3456      12345
   123456789 12345     123456789 234567    345678    234567    1234      2345      3456789
   123456789 234567    3456789   123       234567    123456    2345678   456789    123456789
   6789      5678      234567    2345678   123456    3456789   234567    123456    23456789
   123456789 4567      123456    3456789   2345678   1234567   45678     234567    123456
   456789    3456      2345      23456789  1234567   2345678   789       123456789 23456789


Without the block constraints, it doesn't give much; the eliminations done by asc-chains are trivial; I've proven in [PBCS] that they are equivalent to whips[1] (I keep them here for illustration).
But this can give you an idea of the kind of rules used.

I tried to inject the final resolution state into SudoRules (the representations are compatible) in order to take advantage of the block constraints; it allows more eliminations, but it's not enough for a solution. In this puzzle, mixing the two kinds of constraints is necessary.
denis_berthier
2010 Supporter
 
Posts: 2666
Joined: 19 June 2007
Location: Paris

Re: Can someone solve my first thermo-sudoku?

Postby denis_berthier » Wed Aug 11, 2021 6:54 am

gifmenger wrote:All horizontal and vertical thermometers with 3 or more squares are given.

On second thoughts, I realise I didn't use this.

A particular consequence should be that any given thermometer can't be extended and it is therefore ended on both sides by a length-one thermometer in the opposite direction. This is easy to represent as additional inequalities.

The given horizontal and vertical inequalities were:
Code: Select all
------<<
-->>>>--
--->><<<
<<---->>
---->><<
-----<<-
>>--->>-
--->>->>
>>--<<--

->>-----
-->><<>>
----->>-
-->>><<-
>>->>>--
>>->>---
------<<
->>>----
->>-----


If I apply the above additional constraints, I get an extended set of inequalities:

Code: Select all
-----><<
-<>>>><-
--<>><<<
<<>--<>>
---<>><<
----><<>
>><-<>><
--<>><>>
>><><<>-

<>><----
-<>><<>>
----<>><
-<>>><<>
>><>>><-
>><>><--
-----><<
<>>><---
<>><----

I'm aware this doesn't take into account all the non-allowed combinations of linear inequalities, but let's see if it's useful.
Now, FutoRules allows more eliminations and I can again inject the partial result into SudoRules and go farther than before into the resolution, but that's still not enough to solve the puzzle:
- for the same reasons as before (I don't use block and inequality constraints together);
- and for the additional reason that some non-allowed thermometer inequalities are not taken into account, because the negative constraint on thermometers of length three is not taken into account.

Regarding the first problem, I could iterate from FutoRules to SudoRules and vice-versa, with no guarantee that it would lead to a solution, because block and inequality constraints would still not be taken into together. I could also code a Sudoshiki variant in FutoRules.
Regarding the second problem, negative constraints are never easy to take into account. In the present case, I could easily add specific rules to take them into account.
However, I lack motivation to do any of this. Futoshiki with block constraints is already a not very popular variant of Futoshiki. Adding negative constraints will not make it more popularl.
denis_berthier
2010 Supporter
 
Posts: 2666
Joined: 19 June 2007
Location: Paris

Re: Can someone solve my first thermo-sudoku?

Postby creint » Wed Aug 11, 2021 5:53 pm

Code: Select all
.................................................................................
------<<-->>>>----->><<<<<---->>---->><<-----<<->>--->>---->>->>>>--<<--
->>------->><<>>----->>--->>><<->>->>>-->>->>---------<<->>>----->>-----

Results in
Code: Select all
145  48   1458 67   679  679  2    3    45
67   2    67   5    4    3    1    89   89
34   9    345  8    2    1    45   6    7
2    34   478  36   89   679  67   5    1
678  1    6789 2    78   5    3    4    89
35   357  89   1    367  4    67   89   2
9    78   2345 46   135  78   45   12   3456
14   6    134  9    35   2    8    7    345
78   35   23   3467 1356 678  9    12   46


Additional constraints:
Code: Select all
.................................................................................
-----><<-<>>>><---<>><<<<<>--<>>---<>><<----><<>>><-<>><--<>><>>>><><<>-
<>><-----<>><<>>----<>><-<>>><<>>><>>><->><>><-------><<<>>><---<>><----

Results in
Code: Select all
1   8   45  7   6   9   2   3   45
67  2   67  5   4   3   1   9   8
3   9   45  8   2   1   45  6   7
2   4   8   3   9   6   7   5   1
67  1   67  2   8   5   3   4   9
5   3   9   1   7   4   6   8   2
9   7   23  46  13  8   45  12  456
4   6   1   9   5   2   8   7   3
8   5   23  46  13  7   9   12  46


It needs more constraints or it has multiple solutions.
creint
 
Posts: 322
Joined: 20 January 2018

Re: Can someone solve my first thermo-sudoku?

Postby gifmenger » Tue Aug 17, 2021 3:27 pm

creint, thanks for your reply. It's very helpfull and clear. In your last result all single numbers were correct. So it should be solvable with extra information. Is there a way to come to an unique solution with a minimum of added information? Which number(s) should I add to the grid to make it solvable?
gifmenger
 
Posts: 4
Joined: 09 August 2021

Re: Can someone solve my first thermo-sudoku?

Postby creint » Tue Aug 17, 2021 7:01 pm

Here some example grids from the first solution.
Code: Select all
......................................6........................................24
...........7.............................................4.....................2.
.........6...................................................1..................4
.........6....................................................6.............1....
.........6................................................................36.....

Tried multiple times but all results in requiring 3 extra givens.
But with those starting givens it makes it easy.

You could also make r9c34 consecutive and r23c3 consecutive which will solve it without the need for givens. Can still be solved by advanced manual solvers. Only one layer of easy chains required.
creint
 
Posts: 322
Joined: 20 January 2018


Return to Sudoku variants