14
$\begingroup$

This is a Shingoki puzzle.


Rules of Shingoki:

  • Draw lines between the dots to form a single loop without crossings or branches.
  • The loop should pass through every circled number in the grid.
  • For white circles, the loop must pass through in a straight line.
  • For black circles, the loop must make a 90-degree turn when passing through them.
  • The numbers in the circles show the sum of lengths of the 2 straight lines going out of that circle.

An example is shown below for greater clarity.

Example Puzzle:

Shingoki_example

Shown below is the solution with some explanation:

Shingoki_example_ans

Note how the total length is calculated for the '6' black circle and '5' white circle.


The actual puzzle to solve is shown below:

Shingoki_1

For your convenience, you may use this link, where a version of the puzzle has already been created using the penpa editor. Select "Mode" to be 'Edge' to draw the lines.

Good luck and have fun!

$\endgroup$
  • $\begingroup$ In the example the line also goes through all the dots. I assume that is a requirement, correct? $\endgroup$ – hkBst Oct 22 at 11:51
  • 1
    $\begingroup$ @hkBst No, that is not a requirement. It just happened to be a coincidence in the example. $\endgroup$ – Alaiko Oct 22 at 11:55
  • $\begingroup$ (How were you able to place numbers on dots? I'm cooking up a shingoki puzzle too hehe) $\endgroup$ – oAlt Nov 7 at 15:34
  • $\begingroup$ @oAlt Using the penpa editor, select 'Border' to be "ON". Then, select Mode to be "Number". You will then see a small red square on the grid, which indicates where to place the number and you can use that to place numbers on the grid intersection points. You can look here for more information. $\endgroup$ – Alaiko Nov 8 at 1:48
  • $\begingroup$ yeah it works-- thanks :D $\endgroup$ – oAlt Nov 8 at 3:41
9
$\begingroup$

The solution is:

enter image description here

Step 1:

Begin by extending lines through white circles on the edge, and radiating in from black circles on the edge. Black circles in corners can be extended in both directions.

enter image description here

The 9 in the top-left can be fully resolved, terminating a single dot away from the white 3 below it and the black 2 to its right (otherwise these smaller numbers would be violated). The 2 and 3 can then also be fully resolved, as can the white 3 in row 7. We can also place at least 3 line segments extending through the white 4 in row 2.

enter image description here

Now the black 5 at the end of row 3 can only extend at most 3 segments to the left (else it meets the line from the white 3, violating its constraint). It must therefore extend at least 2 segments down, since up is not an option (the line will end up trapped in a corner). But this means that the line snaking from the 2 in row 1 must extend down 1 unit further, meeting the line from the 5 and setting its length to 1. Thus we must have 4 units of line extending down from the 5.

enter image description here

This means that the black 3 at the end of row 9 can extend vertically at most 1 unit and must therefore extend 2 units to the left.

Meanwhile, the line through the white 7 on the bottom row can also be extended at least 3 spaces to the left (since only room for 4 on its right), and at least 3 to the right (since cannot meet the line coming from the 3 bottom-left). The black 3 above it can be partially resolved.

enter image description here

Step 2:

Note that the 2 at the end of row 10 can now only be resolved one way. This then resolves the white 7, the two black 3's in the bottom left, then the other numbers in the bottom-left corner section also.

enter image description here

Step 3:

Next, note that the white 5 cannot be satisfied horizontally, or the line extends through the nearby 4 and violates its constraint. It must therefore be crossed vertically instead. To avoid violating the black 2 below it, there is only one way to satisfy it. This forces the 2 to link to the nearby black 3 and also finalises the loop passing through the nearby 4, with knock-on deductions resulting in the top-right section being fully resolved.

enter image description here

Step 4:

The black 3 in line 3 must now have a line extending 2 spaces to the left (it can only extend 1 either up or down). This then forces the resolution of the white 4 in row 2 and has some knock-on effects for the black 3 and its neighbouring black 5.

enter image description here

Now the white 4 in row 5 can only be satisfied horizontally.

enter image description here

Step 5:

Now an interesting logical step: Consider what would happen if the black 5 were to be satisfied by extending the line downwards - we end up in an impossible position which separates the top and bottom of the grid into separate loops:

enter image description here

Thus the 5 must be completed using the line to the left instead.

enter image description here

Step 6:

The 4 loose points in the centre must all connect up to each other to avoid dead ends. Thus the rest of the grid can be resolved:

enter image description here

And now there is only one way to lay the last segments to keep one single loop!

| improve this answer | |
$\endgroup$
  • $\begingroup$ Well done! Very nice and easy to follow explanation. Btw, did you forget to place the completed grid at the end? $\endgroup$ – Alaiko Oct 21 at 13:27
  • $\begingroup$ @Alaiko Thanks - actually I deliberately left it out as it was already present at the start and it should be clear by eye which way the final 2 segments should go, I hope! :) $\endgroup$ – Stiv Oct 21 at 13:30
  • $\begingroup$ OK, yeah that's good enough! $\endgroup$ – Alaiko Oct 21 at 13:31
  • $\begingroup$ @Alaiko Deceptively tricky, by the way, to find the next logical steps at each stage. I'd never done one of these before - it was a very enjoyable challenge. Thanks for posting it! $\endgroup$ – Stiv Oct 21 at 13:32
3
$\begingroup$

The best way to solve it would be to start with the circles on the edges.

If a white circle is on an edge you must have that the line passing through it is parallel to the edge.

If a black circle is on an edge you know that a line must go into it perpendicular to edge.

Following this and a bit of deduction you arrive at solution.

solution

| improve this answer | |
$\endgroup$
  • 7
    $\begingroup$ I see two loops here, when the puzzle rules state there should be only one, right? $\endgroup$ – Braegh Oct 21 at 12:34
  • $\begingroup$ @Braegh Oh nice catch. Sorry, this is not the answer then. $\endgroup$ – Alaiko Oct 21 at 12:49
  • $\begingroup$ It would be good to show your deductive reasoning as well for a good answer. You could just add in the key steps. $\endgroup$ – Alaiko Oct 21 at 13:21
  • $\begingroup$ You're right. I was going to but someone beat me to it! $\endgroup$ – Rom Oct 21 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.