Puzzle Corner

As for complete the sequence type questions, it is well known that just about anything completes the sequence. Eg

0,0,0,0,0,-

Solution

(x-1)(x-2)(x-3)(x-4)(x-5)f(x)

Where f(x) can be anything, eg, 0, 1, x×x, sin(x), etc. You can even choose the next term arbitrarily and still get infinitely many solutions for following terms. Shame on you, gchq!
 
Last edited by a moderator:
Less challenging than the earlier content in this thread, but I was going to start a new thread for puzzles and discovered there already is one!

To relocate and reprise previous discussion of Kurosu in the Interesting Items thread: the Daily Mail frequently misclassifies their puzzles. Here's one rated "2 star" (out of 3), when their "3 star" are frequently easier than this (not that they are ever terribly hard, but I like them because I have very limited patience when there is no point to the task!). Even the really easy ones never get rated "1 star".

The rules are to complete the grid so that every row and column contains three Xs and three Os, with no runs of three.

The easy Kurosu (not worth my time, but only taking seconds) only require the solver to be able to count up to three. They should be "1 star". After that, you have to go into "what if": eg "placing an X there does not immediately break the rules, but implies the rules will be broken later on". I operate a 1-5 rating, and this one rates at least 4:
Code:
   ———————————————————————
  |   |   |   | O |   | O |
  |———|———|———|———|———|———|
  | X |   |   |   |   |   |
  |———|———|———|———|———|———|
  |   | X |   |   |   | X |
  |———|———|———|———|———|———|
  |   |   | O |   |   |   |
  |———|———|———|———|———|———|
  |   | O | X |   |   |   |
  |———|———|———|———|———|———|
  | X |   |   | O | X |   |
   ———————————————————————
 
Last edited:
Code:
   ———————————————————————
  |   |   |   | X | X |   |
  |———|———|———|———|———|———|
  |   | O |   |   |   |   |
  |———|———|———|———|———|———|
  | O |   | X |   | O |   |
  |———|———|———|———|———|———|
  |   |   | X |   |   |   |
  |———|———|———|———|———|———|
  |   |   | O | O |   | X |
  |———|———|———|———|———|———|
  |   | O |   |   |   | X |
   ———————————————————————
How many stars??! :rolling:
 
A few weeks ago, I think celebrating some anniversary of the Sudoku, the Mail published a special including some variations and what they described as the "world's hardest Sudoku", grading it 11-star. I have made no progress at all, I can't place even one number!

1631354945967.jpeg
 
I can't place even one number!
Me neither.
It took my main PC 30 seconds to 'solve' it. I tried it on the Humax and gave up watching, so I'd guess it was about 40 minutes (as it previously measured about 80 times slower).

358261479
217549386
964738152
483972615
195486723
672315948
739854261
841623597
526197834
 
Last edited:
Brute force.
I was fairly sure we'd had this discussion before, in more depth, but this is the only thing I can find.
I thought I'd posted the link to the documentation too, but can't find it on here:
https://www.sqlite.org/lang_with.html section 3.5 (and yes, it hurts my head too!).

I don't think you have any chance of solving it manually, given it took the PC 60 times as long to solve compared to a more normal example. So the spoiler is hardly necessary.
 
Last edited:
(and yes, it hurts my head too!)
I glaze over looking at ordinary code; even OO is a step too far for my hardware brain, let alone relational database queries. Anyone who understands this (other than the author, and then maybe not after a couple of pints or a few nights' sleep) must be warped:
Code:
WITH RECURSIVE
  input(sud) AS (
    VALUES('53..7....6..195....98....6.8...6...34..8.3..17...2...6.6....28....419..5....8..79')
  ),
  digits(z, lp) AS (
    VALUES('1', 1)
    UNION ALL SELECT
    CAST(lp+1 AS TEXT), lp+1 FROM digits WHERE lp<9
  ),
  x(s, ind) AS (
    SELECT sud, instr(sud, '.') FROM input
    UNION ALL
    SELECT
      substr(s, 1, ind-1) || z || substr(s, ind+1),
      instr( substr(s, 1, ind-1) || z || substr(s, ind+1), '.' )
     FROM x, digits AS z
    WHERE ind>0
      AND NOT EXISTS (
            SELECT 1
              FROM digits AS lp
             WHERE z.z = substr(s, ((ind-1)/9)*9 + lp, 1)
                OR z.z = substr(s, ((ind-1)%9) + (lp-1)*9 + 1, 1)
                OR z.z = substr(s, (((ind-1)/3) % 3) * 3
                        + ((ind-1)/27) * 27 + lp
                        + ((lp-1) / 3) * 6, 1)
         )
  )
SELECT s FROM x WHERE ind=0;
(VALUES is the initial Sudoku array encoded in a string, from the example prpr linked to above)
 
I don't think that Sudoku is fair. Normally you'd apply some sort of logic to find the solution. It's clear that this one requires trial and error. Someone has bent the rules.
Anyone who understands this (other than the author, and then maybe not after a couple of pints or a few nights' sleep) must be warped:
I might be able to make sense of this if I read up on relational databases. I doubt it, and I can't be bothered either. I'd sooner sit here with multiple copies of the original Sudoku and do it by a manual trial and error. Using a solver is cheating!
 
I don't think that Sudoku is fair.
How can a Sudoku be fair or unfair? What you mean is that the logic shortcuts you know don't help. The longer the necessary chain of inference, the harder it is... but that doesn't make it unfair unless the setter was required to have come up with a puzzle solvable using only a specific set of tools.

As that does not apply here, it's not breaking the rules and thus cannot be ruled unfair.

I bought the Mensa book of Sudoku solving, and the author claimed exactly the same: "real" Sudokus are solvable by logic not trial-and-error, which (frankly) revealed a substantial lack of IQ!

Using a solver is cheating!
Definitely pointless, whether cheating or not.
 
I agree with that, so we’ll have to disagree
Yes, perhaps, but I can't see any logic in your position. A Sudoku is a Sudoku is a Sudoku... saying "please make it easy so my limited abilities can solve it without guesswork" doesn't make the hard ones not Sudokus.
 
Someone has bent the rules.
You'll have to justify that assertion. Show me where the rules say anything about valid or invalid solving logic.

Normally you'd apply some sort of logic to find the solution
saying "please make it easy so my limited abilities can solve it without guesswork" doesn't make the hard ones not Sudokus
To expand on that: what do you mean by "logic"? I'll agree to disagree on the exact categorisation:

Level 0: Eight of the squares (in a row, column, or box) are already filled, so the ninth is the last remaining digit.

Level 1: The intersecting row, column, and box containing any particular empty square contain eight different digits, so the square must contain the last remaining digit.

Level 2: All the squares that a particular digit could be placed in any row, column, or box are already occupied except one.

Level 3: All the squares that a particular digit could be placed in any particular row, column, or box also contain a complete set of other candidate digits (by which I mean there are only n digits to fill n squares) except one (AKA "Naked Doubles/Triples/etc").

Level 4: All the squares that a particular digit could be placed in any particular row, column, or box also contain a complete set of other candidate digits (by which I mean there are only n digits to fill n squares) by virtue of exclusion, except one (AKA "Hidden Doubles/Triples/etc").

After that, you get into Swordfish, X-Wing, XY Chain etc etc (there are loads of strategies, most of which I can't get my head around let alone spot them in a grid)... but every single one of these strategies is actually a way to short-cut a trial and error exercise by predicting what will lead to a contradiction without going to all the effort of trying it. Yes, it's the result of logic, but nothing in the universe says there are not more tricks so far undiscovered.

So, according to you, any particular Sudoku set-up is only valid if: (a) there is just one solution (I'll accept that); and (b) it is amenable to solution using currently known strategies not including brute force (ie trial and error).

But, according to me, just because anyone's IQ is insufficient to find a solving strategy other than brute force, doesn't mean there isn't one, and it seems arrogant to declare there isn't one and that the particular Sudoku is therefore somehow "unfair". It's whinging.
 
Not wishing to get into the argument as to whether any particular Sudoku is unfair or not, there's a lot of fun to be had watching the Cracking The Cryptic YouTube channel


They solve 'crafted' Sudokus i.e. not random computer generated ones, but those where a real setter has used a particular set of ideas to create a break-in and a 'path' through to the conclusion, and 'bifurcation' (aka guessing) is never necessary.

I got into it at the start of the first lockdown when this one became a bit famous online


There are two new solves each day by the blokes that run it, and Simon Anthony's solves are usually pretty entertaining. They include most of the Sudoku variants (killer cages, themos, arrows, renban lines, kropki dots etc.)
 
Last edited:
How many stars??! :rolling:
This one seems rather more challenging (or am I just having an off day), but only rated 2-star (as usual):
Code:
   ———————————————————————
  |   |   | O | O |   |   |
  |———|———|———|———|———|———|
  | X |   |   |   | X |   |
  |———|———|———|———|———|———|
  |   |   |   |   |   | O |
  |———|———|———|———|———|———|
  |   |   | O |   |   |   |
  |———|———|———|———|———|———|
  |   |   |   |   |   |   |
  |———|———|———|———|———|———|
  | X |   |   |   |   | X |
   ———————————————————————
 
I would definitely rate that more than 2-stars. It took me about nearly 5 minutes to solve compared to the usual under 2 minutes. Yes, more than the usual “can’t have 3...”. Fortunately, required logic not trial and error. ;)
 
Back
Top