Jump to content
BrainDen.com - Brain Teasers
  • 0


Guest
 Share

Question


a * b + c - d / e

*   +   -   /   *

f + g - h / i * j

+   -   /   *   +

k - l / m * n + o

-   /   *   +   -

p / q * r + s - t

/   *   +   -   /

u * v + w - x / y

replace each letter with the numbers 1-25, each number only once, such that the total for each row and column is the maximum. operations are done in the order they appear, from top to bottom and left to right. division is presice, no rounding.

have fun :-).

Link to comment
Share on other sites

17 answers to this question

Recommended Posts

  • 0

I have column and row total combined 2217.601812 using substitutions

a = 25

b = 24

c = 16

d = 7

e = 20

f = 23

g = 15

h = 1

i = 18

j = 19

k = 14

l = 2

m = 17

n = 6

o = 13

p = 5

q = 9

r = 8

s = 12

t = 3

u = 22

v = 21

w = 11

x = 4

y = 10

Edited by Nana7
Link to comment
Share on other sites

  • 0

My first one was a solution, but there are much larger sums possible. Here is another try.

Column and row total combined is 2475.271104


a = 25   n = 9

b = 24   o = 13

c = 16   p = 18

d = 10   q = 1

e = 20   r = 17

f = 23   s = 12

g = 15   t = 4

h = 3    u = 22

i = 6    v = 21

j = 19   w = 11

k = 14   x = 5

l = 2    y = 7

m = 8		


Edited by Nana7
Link to comment
Share on other sites

  • 0

I have column and row total combined 2217.601812 using substitutions

a = 25

b = 24

c = 16

d = 7

e = 20

f = 23

g = 15

h = 1

i = 18

j = 19

k = 14

l = 2

m = 17

n = 6

o = 13

p = 5

q = 9

r = 8

s = 12

t = 3

u = 22

v = 21

w = 11

x = 4

y = 10

When I compute the score for your solution, I get 364.49. I think you must not be using the operations in the order in which they come.

Link to comment
Share on other sites

  • 0

So I went back and redid it not in the standard order but instead by total after each op, so 1+1+1/3 = 1 and not 2.33 and here is what I have

Total rows + col = 2427.179167


a = 12		n = 18

b = 23		o = 10

c = 14		p = 20

d = 17		q = 1

e = 15		r = 21

f = 19		s = 11

g = 24		t = 8

h = 5		u = 16

i = 2		v = 25

j = 22		w = 9

k = 13		x = 7

l = 4		y = 3

m = 6		



Link to comment
Share on other sites

  • 0

So I went back and redid it not in the standard order but instead by total after each op, so 1+1+1/3 = 1 and not 2.33 and here is what I have

Total rows + col = 2427.179167


a = 12 n = 18
b = 23 o = 10
c = 14 p = 20
d = 17 q = 1
e = 15 r = 21
f = 19 s = 11
g = 24 t = 8
h = 5 u = 16
i = 2 v = 25
j = 22 w = 9
k = 13 x = 7
l = 4 y = 3
m = 6


I get 2352.6792 for this. One of us has a bug.

Link to comment
Share on other sites

  • 0

So I went back and redid it not in the standard order but instead by total after each op, so 1+1+1/3 = 1 and not 2.33 and here is what I have

Total rows + col = 2427.179167


a = 12		n = 18

b = 23		o = 10

c = 14		p = 20

d = 17		q = 1

e = 15		r = 21

f = 19		s = 11

g = 24		t = 8

h = 5		u = 16

i = 2		v = 25

j = 22		w = 9

k = 13		x = 7

l = 4		y = 3

m = 6		



made a spread sheet and copied your numbers into it and came out with 2427.179167 as a total for all rows and columns, rounding to 6 decimal places, also. I have double checked cells to make sure that operations are calculated in order so, your calculation is correct, with the assumption that phillip1882 meant to be taken literally on the order question.

Link to comment
Share on other sites

  • 0

made a spread sheet and copied your numbers into it and came out with 2427.179167 as a total for all rows and columns, rounding to 6 decimal places, also. I have double checked cells to make sure that operations are calculated in order so, your calculation is correct, with the assumption that phillip1882 meant to be taken literally on the order question.

Thanks for checking this. I had a bug in my code. I knew one of us did!

Link to comment
Share on other sites

  • 0

a=25

b=24

f=23

j=22

n=21

r=20

v=19

c=18

g=17

k=16

o=15

s=14

w=13

d=12

h=11

l=10

p=9

t=8

x=7

e=6

i=5

m=4

q=3

u=2

y=1

If someone could put this into their program and tell me how I did, I would really appreciate it. Thanks!

Link to comment
Share on other sites

  • 0

There are 8 different maximal answers with identical scores (# of answer followed by

the a thru z values in order, followed by the score):

1 -> 12 19 13 20 16 23 24 4 1 25 14 5 6 21 10 17 2 18 11 7 15 22 9 8 3 2427.179

2 -> 12 23 14 17 15 19 24 5 2 22 13 4 6 18 10 20 1 21 11 8 16 25 9 7 3 2427.179

3 -> 12 19 13 20 16 23 24 4 1 25 14 5 6 21 10 17 2 18 11 8 15 22 9 7 3 2427.179

4 -> 12 23 14 17 15 19 24 5 2 22 13 4 6 18 10 20 1 21 11 7 16 25 9 8 3 2427.179

5 -> 12 23 14 17 15 19 24 5 2 22 13 4 6 18 9 20 1 21 11 8 16 25 10 7 3 2427.179

6 -> 12 23 14 17 15 19 24 5 2 22 13 4 6 18 9 20 1 21 11 7 16 25 10 8 3 2427.179

7 -> 12 19 13 20 16 23 24 4 1 25 14 5 6 21 9 17 2 18 11 8 15 22 10 7 3 2427.179

8 -> 12 19 13 20 16 23 24 4 1 25 14 5 6 21 9 17 2 18 11 7 15 22 10 8 3 2427.179

of which the third is Nana7's answer.

Link to comment
Share on other sites

  • 0

a=25

b=24

f=23

j=22

n=21

r=20

v=19

c=18

g=17

k=16

o=15

s=14

w=13

d=12

h=11

l=10

p=9

t=8

x=7

e=6

i=5

m=4

q=3

u=2

y=1

If someone could put this into their program and tell me how I did, I would really appreciate it. Thanks!

Your result is 1116.833333. I tried similar approaches and could not even get to 2000. So, kudos to Nana7 for the quick answer and to superprismatic for verifying it.

I would like to know how Nana managed to get this answer?

Link to comment
Share on other sites

  • 0

I began by finding a starting point. I put big numbers on either side of multiplication signs and small numbers after the minus signs. Then of the numbers left, the higher ones went after the plus signs and the lower ones after the divide signs. For some rows or columns I may have adjusted that strategy if I thought it would help. That was just to get a starting point, which was what I posted in my first try. *edit, I did it that way thinking the computation was algebreic order. For computation in OP order, it would have been better to put the smallest numbers after the divide signs rather than the minus signs.*

Then I looked for improvements by switching numbers around. First switch 1 and 2 and see if the total goes up. If it does not, undo that change and move on to 2 and 3, then 3 and 4, and so on, looking to see if any changes improve the total. If switch 3 and 4 improves the total, I would go ahead and recheck 2 and 3 since 3 has a new letter now, while proceeding to check 4 and 5, and so on to the end. That is 1 iteration. If there were any changes, then I go back and do another iteration checking 1 and 2, 2 and 3, and so on, until I have an iteration with no changes. That was the method I used. I used Excel to do the totals for me.

For my sheet layout I had one area where I typed the guesses for the letters. This area had a cell with the letter, followed by a cell with the number, for all letters a to y. In another part of the sheet I put those numbers in a 5 by 5 layout to match the layout of the OP equation (I used cell reference to do that) and then at the end of each row and column I entered the OP equation for that row or column. Then sum the results for the rows and columns to get the total. Underneath the total I would type in the highest total I found so far so I could compare that number to new totals when I changed numbers around.

Edited by Nana7
Link to comment
Share on other sites

  • 0

I began by finding a starting point. I put big numbers on either side of multiplication signs and small numbers after the minus signs. Then of the numbers left, the higher ones went after the plus signs and the lower ones after the divide signs. For some rows or columns I may have adjusted that strategy if I thought it would help. That was just to get a starting point, which was what I posted in my first try. *edit, I did it that way thinking the computation was algebreic order. For computation in OP order, it would have been better to put the smallest numbers after the divide signs rather than the minus signs.*

Then I looked for improvements by switching numbers around. First switch 1 and 2 and see if the total goes up. If it does not, undo that change and move on to 2 and 3, then 3 and 4, and so on, looking to see if any changes improve the total. If switch 3 and 4 improves the total, I would go ahead and recheck 2 and 3 since 3 has a new letter now, while proceeding to check 4 and 5, and so on to the end. That is 1 iteration. If there were any changes, then I go back and do another iteration checking 1 and 2, 2 and 3, and so on, until I have an iteration with no changes. That was the method I used. I used Excel to do the totals for me.

For my sheet layout I had one area where I typed the guesses for the letters. This area had a cell with the letter, followed by a cell with the number, for all letters a to y. In another part of the sheet I put those numbers in a 5 by 5 layout to match the layout of the OP equation (I used cell reference to do that) and then at the end of each row and column I entered the OP equation for that row or column. Then sum the results for the rows and columns to get the total. Underneath the total I would type in the highest total I found so far so I could compare that number to new totals when I changed numbers around.

That's exactly what I was doing too, but I guess i didn't spend enough time and didn't have enough patience checking the permutations.

Edited by k-man
Link to comment
Share on other sites

  • 0

After a few reads through the OP I came to the conclusion that the answer should be a whole number - "division is precise, no rounding", not just keeping n decimal places...

To that end I've been spending WAY TOO MUCH TIME on this and have only searched 1/2 of the ~4 million possible permutations for mod 0 solutions to all divisions. I got it DOWN to ~4 million using some assumptions that I hope maximized the answer. Chances are the true maximum is in the other 50% (and my assumptions are too constrictive) but I most likely will never get back to it, Excel is just too slow for this kind of crunching...

a___b___c___d___e

25__24__18__12__2

f____g___h___i___j

23__15__8___6___21

k___l___m___n___o

17__7___5___19__11

p___q___r___s___t

16__4___20__13__9

u___v___w___x___y

3___22__14__10__1

Row+Column Total = 1118 and is one of 12 possible solutions having this sum. Much smaller than what others have gotten but they also had "imprecise division". (no offense:)

phillip1882, can you please weigh in on this approach, even if the solution is incorrect? If I'm right maybe you other coding gurus can knock this one out properly! B)

Link to comment
Share on other sites

  • 0

After a few reads through the OP I came to the conclusion that the answer should be a whole number - "division is precise, no rounding", not just keeping n decimal places...

To that end I've been spending WAY TOO MUCH TIME on this and have only searched 1/2 of the ~4 million possible permutations for mod 0 solutions to all divisions. I got it DOWN to ~4 million using some assumptions that I hope maximized the answer. Chances are the true maximum is in the other 50% (and my assumptions are too constrictive) but I most likely will never get back to it, Excel is just too slow for this kind of crunching...

a___b___c___d___e

25__24__18__12__2

f____g___h___i___j

23__15__8___6___21

k___l___m___n___o

17__7___5___19__11

p___q___r___s___t

16__4___20__13__9

u___v___w___x___y

3___22__14__10__1

Row+Column Total = 1118 and is one of 12 possible solutions having this sum. Much smaller than what others have gotten but they also had "imprecise division". (no offense:)

phillip1882, can you please weigh in on this approach, even if the solution is incorrect? If I'm right maybe you other coding gurus can knock this one out properly! B)

My first reading of the OP was the way Herry64 interprets it. But after seeing

a few posts, I went along with the crowd. I'm now going to work on Herry64's

version of the problem and see what I can do with it. I should be posting in a

day or two. Thanks, Herry64! I wish I had stuck to my guns like you did.

Link to comment
Share on other sites

  • 0

I can get 2394.0125 as an exact number with no rounding by switching around the 3 and 4 in my prior solution. I would guess there is not any higher max than that. Or to end with a whole number, I can get 2110 though there are 3 fractions in the subtotals (.75, .75, and .50). This might not be the highest whole number, it is just one I found. That solution is



a = 15		n = 18

b = 23		o = 10

c = 14		p = 20

d = 17		q = 1

e = 6		r = 21

f = 19		s = 11

g = 24		t = 16

h = 5		u = 8

i = 4		v = 25

j = 22		w = 9

k = 13		x = 7

l = 3		y = 2

m = 12		


I can get 1858, probably not the highest possible total, with all the subtotals also being whole numbers with


a = 15		n = 21

b = 23		o = 10

c = 14		p = 18

d = 17		q = 4

e = 6		r = 20

f = 19		s = 11

g = 25		t = 16

h = 5		u = 8

i = 1		v = 24

j = 22		w = 9

k = 13		x = 7

l = 12		y = 2

m = 3		


My method above was to take my prior solution and just start changing numbers around to get rid of the fractions.

Edited by Nana7
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...