## The not-so-magic square

Anything goes, but keep it seemly...

### The not-so-magic square

Prompted by JPF's interesting brainteaser here, I worked a bit manually on this problem:
Code: Select all
`Fill the integers 1 to 9 into the following 3x3 square:+-+-+-+| | | |+-+-+-+| | | |+-+-+-+| | | |+-+-+-+`

Let SP=sum of product of each row + sum of product of each column + sum of product of each main diagonal

The smallest SP I can find is 436, while the largest is 1101.

I wonder if anyone can verify/prove these or find a different result.

This is not really a brainteaser but rather an interesting piece of recreational mathematics...
udosuk

Posts: 2698
Joined: 17 July 2005

Matt

Just a quick note highest I have is from {715392648}.
35+54+192+126+36+80+270+504=1297

Couldn't get your lowest I'll have another look if it's still outstanding.
Glyn

Posts: 357
Joined: 26 April 2007

### Re: The not-so-magic square

udosuk wrote:Let SP=sum of product of each row + sum of product of each column + sum of product of each main diagonal

The smallest SP I can find is 436, while the largest is 1101.

Are you sure you counted in the diagonals in 436? Could you post the two boxes where you found those results?

RW
RW
2010 Supporter

Posts: 1000
Joined: 16 March 2006

RW has hit it on the head. I didn't post my lowest as it didn't match Matt's

Grid is {365718492}
Sum = 90+56+72+84+54+80+6+20=462.
Glyn

Posts: 357
Joined: 26 April 2007

With only the main diagonal , I get :

Min = 442
Code: Select all
`169734852`

Max = 1169
Code: Select all
`724596318`

Edit :

With the main diagonal and the antidiagonal , I get :

Min = 462
Code: Select all
`285916473`

Max = 1321
Code: Select all
`518394726`

JPF
JPF
2017 Supporter

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

Sorry guys for the mistakes and confusion. I'm embarassed (no "oops" emoticon here to display it).

By "main diagonals" I meant both the leading diagonal and non-leading diagonal (aka anti-diagonal). They're called "main" as opposed to the "broken diagonals". But after some research I think I've misused the term so from now on I'll only use the term diagonal. Sorry again!

And of course I forgot to add the product of the 2 diagonals in my initial results. After a comprehensive check using Excel (and a resulting 32MB .xls file) I can confirm that JPF's range of 462..1321 is correct. Perhaps a bit surprising to me is if you don't count the diagonals (i.e. only 3 rows and 3 columns) the range become 436..947:
Code: Select all
`Min = 4361 6 97 3 48 5 2Max = 9471 2 73 4 85 6 9`

While you can rearrange the 436-grid to become the 462-grid, you can't do the equivalent for the 947-grid to become the 1321-grid. And while in many examples the min-grid and the max-grid are convertible to each other by the "10 minus" operation, it isn't the case here for both pairs. It is probably due to the usage of the multiplication operation.

Also from my Excel results I've confirmed 90 as the minimun largest product for the 3 rows & 3 columns in a grid. And 54 as the maximum smallest one. So for anybody who wants an encore of JPF's previous brainteaser:

Prove elegantly that there must always be at least a row or a column which has a product smaller than or equal to 54.

Last edited by udosuk on Sat May 17, 2008 7:11 pm, edited 1 time in total.
udosuk

Posts: 2698
Joined: 17 July 2005

udosuk wrote:
Prove elegantly that there must always be at least a row or a column which has a product smaller than or equal to 54.

That's easy. Digit 9 is in one row and one column. One of them must have a product greater than or equal to 9*1*X (X>1) and the other a product greater than or equal to 9*2*Y ( Y>2). The smallest possible product for the second is 9*2*3=54.

RW
RW
2010 Supporter

Posts: 1000
Joined: 16 March 2006

RW wrote:That's easy. Digit 9 is in one row and one column. One of them must have a product greater than or equal to 9*1*X (X>1) and the other a product greater than or equal to 9*2*Y ( Y>2). The smallest possible product for the second is 9*2*3=54.

RW, what you just did was only to prove that there is at least a row or a column which is larger than or equal to 54. I'm looking for a proof for "smaller than or equal to 54".

Everyone but RW please triple click to see the proof I wrote:The 1 must have 4 other buddies on the same row/column. One of them must be from {23456}. The largest possible product of that line is 1*6*9=54.

RW must write the correct proof on his own before peeping at mine.

Now, what if the diagonals are also involved?
udosuk

Posts: 2698
Joined: 17 July 2005

udosuk wrote:RW must write the correct proof on his own before peeping at mine.

How will you know?
Glyn

Posts: 357
Joined: 26 April 2007

Note to self: Don't solve brainteasers late saturday night!

Ok, you're right udosuk. But the real solution is of course just as easy. You have digit 1 in two units. The maximum minimum products for these two would be 1*7*8=56 and 1*6*9=54. I'm sure udosuk already gave a better description in invisible ink, so I won't bother to improve this answer!
RW
2010 Supporter

Posts: 1000
Joined: 16 March 2006

Glyn wrote:How will you know?

See? I trust RW will always play it straight like Kimi Räikkönen!

I wrote:Now, what if the diagonals are also involved?

Nothing changes, the minimum maximum product is still 90, the maximum minimum product is still 54.
udosuk

Posts: 2698
Joined: 17 July 2005

### Re: The not-so-magic square

How about this:
Code: Select all
`Fill the integers 1 to 9 into the following 3x3 square:+-+-+-+| | | |+-+-+-+| | | |+-+-+-+| | | |+-+-+-+`

Let PS6 = product of sum of each row * product of sum of each column

and PS8 = PS6 * product of sum of each diagonal

What are the ranges of PS6 & PS8 respectively?
udosuk

Posts: 2698
Joined: 17 July 2005

PS6
Code: Select all
`Min = 680400123468579Max = 11390625159672834`

PS8
Code: Select all
`Min = 653184000264819573Max = 5464166400537491628`

JPF
JPF
2017 Supporter

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

JPF, one of your answers is not unique. Can you (or your program) spot it?
udosuk

Posts: 2698
Joined: 17 July 2005

I wrote:JPF, one of your answers is not unique. Can you (or your program) spot it?

Okay, I spot it for you.
Code: Select all
`Min = 653184000264819573264918573`

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).
Last edited by udosuk on Fri May 23, 2008 1:13 pm, edited 2 times in total.
udosuk

Posts: 2698
Joined: 17 July 2005

Next

Return to Coffee bar