English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have this logic (kind of) math problem for school that's due on Friday and I need a lot of help.

It is a triangle made out of circles. There are 5 circles on the bottom, 4 on the 2nd, 3 on the 3rd, till get it gets to one and makes a triangle.

The problem is writing a number between 1-15 in each of the boxes, and using each number once. You find the difference and absolute value, starting from the bottom, of two circles by each other, and write the solution in the circle that's stacked above it.

If any of you know the solution to this, I would greatly be thankful if you gave me the answer. I can't find a pattern and there are probably hundreds of combonations.

Sorry if my description isn't good enough. I wish I could put pictures.

Thanks!

2006-12-06 12:16:50 · 2 answers · asked by zgenator 2 in Science & Mathematics Mathematics

2 answers

I think I understand your question... in other words, if you had something like:

4 7, then the number above would be | 4 - 7 | = 3

This is a sort of puzzle which requires persistence.

I tried playing with it; maybe some of my ideas can help you.

One thing I did was to think about odd and even numbers. When you subtract two numbers, whether the difference is odd or even depends only on whether the numbers you started with are odd or even. So I could see what sort of pattern of odd and even numbers we will get by just using 0 and 1 as my sample odd and even numbers. We need something with 8 odd numbers and 7 even numbers. There are 32 combinations of odd/even for the bottom row, and half of them are mirrors. It turns out there are 5 patterns (excluding mirror images):

..... 1
.... 1 0
... 1 0 0
.. 0 1 1 1
. 0 0 1 0 1

..... 1
.... 0 1
... 1 1 0
.. 0 1 0 0
. 0 0 1 1 1

..... 1
.... 1 0
... 1 0 0
.. 1 0 0 0
. 0 1 1 1 1

..... 0
.... 1 1
... 1 0 1
.. 1 0 0 1
. 1 0 0 0 1

..... 0
.... 0 0
... 1 1 1
.. 1 0 1 0
. 1 0 0 1 1

Next it is obvious that 15 has to be in the bottom row... you can see why, right? There is no way to get a difference of 15 because no number is bigger. And 14 can't go further than the fourth row. So it helps to start at the bottom row with large numbers.

I bet if I kept at it I could probably find a solution... I'd suggest trying 13, 14 and 15 in the bottom row and go from there...

Okay, I finally gave up and decided to write a little VBA program to try all combinations for the bottom row, calculate the differences for the other rows, then have it check that all the numbers were in the correct range and were used exactly once.

......... 5
....... 4. 9
..... 7 11. 2
... 8. 1. 12 10
. 6 14 15 .3 13

Sure enough, big numbers at the bottom were a good idea. And this matches pattern #2 above. Note: besides the mirror image, the program found no other solutions, so I believe this is unique.

For reference here is the procedure I came up with... not the most elegant, but it gets the job done:

Sub bruteForce()
Dim A(15) As Integer
Dim B(15) As Integer
Dim bOkay As Boolean

For i = 15 To 1 Step -1
A(1) = i
For j = 15 To 1 Step -1
A(2) = j
For k = 15 To 1 Step -1
A(3) = k
For l = 15 To 1 Step -1
A(4) = l
For m = 15 To 1 Step -1
A(5) = m
A(6) = Abs(A(1) - A(2))
A(7) = Abs(A(2) - A(3))
A(8) = Abs(A(3) - A(4))
A(9) = Abs(A(4) - A(5))
A(10) = Abs(A(6) - A(7))
A(11) = Abs(A(7) - A(8))
A(12) = Abs(A(8) - A(9))
A(13) = Abs(A(10) - A(11))
A(14) = Abs(A(11) - A(12))
A(15) = Abs(A(13) - A(14))
bOkay = True
For n = 1 To 15
B(n) = 0
If A(n) < 1 Or A(n) > 15 Then bOkay = False
Next
If bOkay Then
For n = 1 To 15
B(A(n)) = B(A(n)) + 1
Next
For n = 1 To 15
If B(n) <> 1 Then bOkay = False
Next
End If
If bOkay Then
MsgBox A(15) & vbCrLf _
& A(13) & ", " & A(14) & vbCrLf _
& A(10) & ", " & A(11) & ", " & A(12) & vbCrLf _
& A(6) & ", " & A(7) & ", " & A(8) & ", " & A(9) & vbCrLf _
& A(1) & ", " & A(2) & ", " & A(3) & ", " & A(4) & ", " & A(5), _
vbOkayOnly, "Solution"
End If
Next
Next
Next
Next
Next
End Sub

2006-12-06 12:23:51 · answer #1 · answered by Puzzling 7 · 1 0

Gawd, this is brutal. You say there are hundreds of combinations? I'd say more like seventy thousand.

The only thing you can say for sure, I think, is that the 15 has to go on the bottom row, and you only have to consider 3 positions (corner, next to corner, or center). The other four slots can be anything, however.

I think a computer program could be written in a few hours that analyzes this out. Maybe I'll do that tomorrow if no one gets an answer by then.

2006-12-06 20:56:09 · answer #2 · answered by Anonymous · 0 0

fedest.com, questions and answers