## The not-so-magic square

Anything goes, but keep it seemly...
udosuk wrote:

Okay, I spot it for you.

Thanks udosuk.
My program was just trying to give Min, Max for PS6, PS8 and an example for each case.

JPF
JPF
2017 Supporter

Posts: 3754
Joined: 06 December 2005
Location: Paris, France

I wrote:Two new challenges:

1. Most Narrow-Ranged Square

Fill all of {1..9} into a 3x3 square. Write down the sums and products of all rows/columns/diagonals. Let

range width of sums = max sum - min sum

range width of products = max product - min product

combined range width = range width of sums + range width of products

Now find the 3x3 square with the most narrow combined range.

2. The (Almost) Anti-Magic Square

Fill all of {1..9} into a 3x3 square so that all 18 numbers from {1..18} appear either as a cell value or a sum of a row/column/diagonal. Oh wait a minute, 9+8=17 is fewer than 18 by 1... In that case one of the 18 numbers is allowed to appear as a sum of 2 corners.

Both these challenges, of course, have unique solutions (allowing reflection/rotation).

They say good things come in threes. So here is a 3rd challenge:

3. The (Nearly Perfect) Anti-Magic Square

Fill all of {1..9} into a 3x3 square so that all 19 numbers from {1..19} appear either as a cell value or a sum/product of a row/column/diagonal.

This is my favourite among the 3.

JPF, if I were you I'd start writing a program to work out these nice results.
udosuk

Posts: 2698
Joined: 17 July 2005

udosuk wrote:Most Narrow-Ranged Square
....
JPF, if I were you I'd start writing a program to work out these nice results.
OK,udosuk here you are :
The solutions :
Code: Select all
`257961348293564718348961257392465817718564293752169843817465392843169752`
all isomorphic

max sum = 16
min sum = 14
range width of sums = max sum - min sum = 2
max product = 126
min product = 54
range width of products = max product - min product = 72

combined range width = range width of sums + range width of products = 74

JPF
JPF
2017 Supporter

Posts: 3754
Joined: 06 December 2005
Location: Paris, France

udosuk wrote:3. The (Nearly Perfect) Anti-Magic Square

This is my favourite among the 3.

Code: Select all
`2 7 39 1 46 5 8`

JPF
JPF
2017 Supporter

Posts: 3754
Joined: 06 December 2005
Location: Paris, France

Well done JPF!

So two down, one to go. FYI there are only 16 essentially different squares where the 8 sums of rows/columns/diagonals are all different and come within a range of 9 consecutive numbers. Good luck looking for them.

PS: I regard this as the 2nd sexiest pattern formed by the numbers 1..19:
Code: Select all
`11 17 13 15 1012  2  7  314  9  1  419  6  5  818          16`

No prize for finding out the sexiest pattern.
udosuk

Posts: 2698
Joined: 17 July 2005

udosuk wrote:2. The (Almost) Anti-Magic Square
Fill all of {1..9} into a 3x3 square so that all 18 numbers from {1..18} appear either as a cell value or a sum of a row/column/diagonal. Oh wait a minute, 9+8=17 is fewer than 18 by 1... In that case one of the 18 numbers is allowed to appear as a sum of 2 corners.

Both these challenges, of course, have unique solutions (allowing reflection/rotation).

I'm not sure I understood what you meant.
I got many solutions.
Here are the first ones :

Code: Select all
`123   456   879`

Code: Select all
`123845976`

For example, for the first square :
Code: Select all
`15 13 14 18 16 6  1  2  3 15  4  5  6 24  8  7  9 `
sum of the corners : 4,10,9,12,11,17

JPF
JPF
2017 Supporter

Posts: 3754
Joined: 06 December 2005
Location: Paris, France

JPF wrote:For example, for the first square :
Code: Select all
`15 13 14 18 16 6  1  2  3 15  4  5  6 24  8  7  9 `
sum of the corners : 4,10,9,12,11,17

It is not the answer because I only allow one sum of 2 corners to be there in the mix, and you had 4 (10,11,12,17).

Basically, you must have the 18 numbers from {1..18} as nine single cell values, eight sums of rows/columns/diagonals and one sum of 2 corners.

I wrote:FYI there are only 16 essentially different squares where the 8 sums of rows/columns/diagonals are all different and come within a range of 9 consecutive numbers. Good luck looking for them.

This is relevant.
udosuk

Posts: 2698
Joined: 17 July 2005

Here's probably what you are looking for :
Code: Select all
`374925618`

JPF
JPF
2017 Supporter

Posts: 3754
Joined: 06 December 2005
Location: Paris, France

That's correct JPF!

I'm still looking for other interesting 3x3 squares. Perhaps if I have a nice collection of them I can pick 9 of them to form a really special Sudoku grid.
udosuk

Posts: 2698
Joined: 17 July 2005

Got a couple more nice ones.

First of all, a new definition:

A boomerang is a triple of cells with one common orthogonal neighbour (orthogonal = horizontal or vertical). Alternatively, you can view a boomerang as 3 diagonally connected cells which don't form a straight line.

Within a 3x3 square, there are eight different boomerangs.

Boomerang challenge 1:

Fill all of {1..9} into a 3x3 square so that all except one of {1..24} appear as cell values or sums of rows/columns/diagonals/boomerangs. The exception must appear as the product of 2 adjacent (orthogonally or diagonally) cells.

Boomerang challenge 2:

Fill all of {1..9} into a 3x3 square so that all rows/columns/diagonals/boomerangs share the same sum as at least two other rows/columns/diagonals/boomerangs. The most repeated sum must also appear as the sum of 2 adjacent (orthogonally or diagonally) cells.

More programming chores for somebody I guess?
udosuk

Posts: 2698
Joined: 17 July 2005

udosuk wrote:More programming chores for somebody I guess?
Sorry, I didn't catch the definition of a boomerang
Give examples with this square :
Code: Select all
`1 2 34 5 67 8 9`
Thanks.

JPF
JPF
2017 Supporter

Posts: 3754
Joined: 06 December 2005
Location: Paris, France

JPF wrote:Give examples with this square :
Code: Select all
`1 2 34 5 67 8 9`

If I understood udosuk's post correctly, the boomerangs are 153, 486, 426, 759, 157, 268, 248 and 359.

RW
RW
2010 Supporter

Posts: 1000
Joined: 16 March 2006

RW is spot on.

Just like to add that each of my challenges without the additional 2nd rule (product/sum of 2 adjacent cells) has 2 essentially different solutions (i.e. 16 solutions overall).
udosuk

Posts: 2698
Joined: 17 July 2005

RW wrote:If I understood udosuk's post correctly, the boomerangs are 153, 486, 426, 759, 157, 268, 248 and 359.
Thanks RW.

The most difficult part of the game is to understand what udosuk wants to do

Boomerang 1 :
Code: Select all
`4 3 87 9 15 2 6`

Boomerang 2 :
Code: Select all
`2 1 87 5 34 9 6`
JPF
JPF
2017 Supporter

Posts: 3754
Joined: 06 December 2005
Location: Paris, France

Well done, again!

JPF wrote:The most difficult part of the game is to understand what udosuk wants to do

I suppose so, but I bet my description are a bit easier to understand than some of the other posters in this forum (e.g. some of your countrymen).

At least RW could get it no problem. Perhaps I was using too many mathematical terms.

Anyway, there is another "spin-off" of Boomerang challenge 1:

Boomerang challenge 3:

Fill all of {1..9} into a 3x3 square so that all of {1..23} appear as cell values or sums of rows/columns/diagonals/boomerangs. The most repeated sum must also appear as the sum of a broken diagonal.

Hopefully the term "broken diagonal" won't cause too much confusion. If any, consult wikipedia.
udosuk

Posts: 2698
Joined: 17 July 2005

PreviousNext