5
$\begingroup$

You are given an empty square grid. Each cell can be an island with a positive integer $n$ or a bridge connecting islands. The following rules apply:

  • Each island with a number $n$ must have exactly $n$ bridges attached to it
  • Bridges must be either horizontal or vertical with one or more cells in length
  • Bridges cannot intersect, but they can meet at an island
  • All islands must be connected into a single component

For example, here is a valid arrangement for islands with numbers 1 to 4:

enter image description here

Can you find an arrangement for islands with numbers 1 to 12? Bonus: what is the smallest rectangle (by area) that can fit such an arrangement?

$\endgroup$
3
  • 2
    $\begingroup$ If you are wondering, the title is referring to this: en.wikipedia.org/wiki/The_Twelve_Apostles_(Victoria) $\endgroup$ Aug 1 at 6:54
  • 4
    $\begingroup$ Number of bridges between islands is unlimited? Islands are not allowed to touch? All islands need to be connected? $\endgroup$
    – daw
    Aug 1 at 7:04
  • 1
    $\begingroup$ ah yes all islands should be connected... will add it in $\endgroup$ Aug 1 at 7:26

2 Answers 2

13
$\begingroup$

Islands can be arranged in one line: putting islands with odd numbers on one end, and islands with even numbers on the other end: numbers in brackets are islands, numbers between dashes are bridges.

 [ 1] -1- [ 3] -2- [ 5] -3- [ 7] -4- [ 9] -5- [11]
                                               -6-
 [ 2] -2- [ 4] -2- [ 6] -4- [ 8] -4- [10] -6- [12]
 

This arrangement needs $3*11=33$ cells. Putting all islands on one long line
needs $23$ cells.

This is the minimum: we need $12$ cells for all the islands, if all islands are to be connected, we need at least $11$ bridges.

$\endgroup$
2
  • 1
    $\begingroup$ Nice solution. Just realised that the example one follows a similar pattern. $\endgroup$ Aug 1 at 7:30
  • 1
    $\begingroup$ You can now try another version of this puzzle. $\endgroup$ Aug 1 at 7:41
1
$\begingroup$

In case not all the islands need to be connected (I have a feeling they might, but the rules do not say this at the time of writing this) a simple solution can be

Split them in 4 groups of 3 in such a way that the islands in the group are connected, but the groups are not connected.
1 - 12 - 11
4 - 10 - 6
3 - 8 - 5
2 - 9 - 7

$\endgroup$
4
  • $\begingroup$ To get everything connected: you can add vertical bridges between the islands in columns 2 and 3. $\endgroup$
    – daw
    Aug 1 at 7:12
  • $\begingroup$ Ah rigth.... I will try it $\endgroup$
    – Marius
    Aug 1 at 7:18
  • $\begingroup$ Rules state that all islands "must be connected into a single component". $\endgroup$ Aug 1 at 15:38
  • 1
    $\begingroup$ @ConnieMnemonic Not at the time the answer was posed, which he states explicitly $\endgroup$
    – No Name
    Aug 1 at 19:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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