Still needing HELPbut should have posted this

  • Context: High School 
  • Thread starter Thread starter strack22
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around a numerical puzzle involving two equations represented by letters, where participants explore methods to solve it, including programming approaches and mathematical reasoning. The scope includes problem-solving techniques and computational methods.

Discussion Character

  • Exploratory
  • Mathematical reasoning
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant presents a numerical puzzle where letters represent unique digits, leading to two equations: ABC + DEF = GHI and ADG + BEH = CFI.
  • Another participant suggests a method of transforming the equations into multiple smaller equations, using modular arithmetic to derive relationships between the digits.
  • A participant shares a computer program they wrote to find solutions, noting that it initially produced many answers until they accounted for the uniqueness of digits, significantly reducing the possibilities.
  • Multiple solutions are reported by different participants, with some providing specific outputs from their programs, including variations that involve leading zeros or the inclusion of zero as a valid digit.
  • One participant expresses gratitude for the insights provided, indicating a shift in their understanding of the problem's constraints.
  • Another participant mentions running their program again and confirming the previously found solutions, suggesting a possible oversight in their earlier attempts.

Areas of Agreement / Disagreement

Participants present multiple competing views on the methods to solve the puzzle and report different sets of solutions. There is no consensus on a single solution or method, and the discussion remains unresolved regarding the best approach.

Contextual Notes

Some participants note the importance of unique digits and the implications of including zero, which may affect the validity of certain solutions. The discussion reflects varying interpretations of the problem's constraints.

Who May Find This Useful

Individuals interested in numerical puzzles, programming solutions to mathematical problems, or those seeking to understand different approaches to problem-solving in a collaborative environment may find this discussion useful.

strack22
Messages
3
Reaction score
0
there is a second part to my original puzzle...sorry

So, IF ABC plus DEF equals GHI THEN,

ADG, plus BEH equals CFI...

Please any takers on this...it is driving me CRAZY !

the teasers are listed across if that helps
A B C A D G
+D E F + B E H
_______ ________
G H I C F I

Not sure if you will see it correctly ...sorry
 
Mathematics news on Phys.org
The usual way to solve these puzzles is to turn your two equations into many. For example, based on the small digits: (C + F) mod 10 = (G + H) mod 10 = I. However, whenever I see these puzzles I always just write a computer program to solve them by doing a case-by-case. Here is the output of the program I wrote (notice how there are TWO answers, but that they are very similar):
Code:
718236954     718 + 236 = 954             729 + 135 = 864
729135864     729 + 135 = 864             718 + 236 = 954

and the program:

Code:
Dim d(1 To 9) As Long

Private Sub Main()
    Call testDigit(1) 'start the recursion on the first digit
End Sub
Private Sub testDigit(ByVal index As Long)
Dim a As Long
    For a = 1 To 9
        If digitsContain(a) = False Then 'make sure the digit is unique
            d(index) = a 'try this digit in this position
            If index < 9 Then
                Call testDigit(index + 1) 'go to next digit if we're not at the last one
            ElseIf isValid Then 'if we're at the last digit, check the answer
                printDigits
            End If
        End If
    Next a
    d(index) = 0 'reset digit
End Sub
Private Function digitsContain(ByVal n As Long) As Boolean
Dim a As Long
    'Check if the digit 'n' is already used
    For a = 1 To 9
        If d(a) = n Then
            digitsContain = True
        End If
    Next a
End Function
Private Function isValid() As Boolean
    'make sure the digits match the program
    isValid = CBool(CLng(d(1) & d(2) & d(3)) + CLng(d(4) & d(5) & d(6)) = CLng(d(7) & d(8) & d(9)))
    isValid = isValid And CBool(CLng(d(1) & d(4) & d(7)) + CLng(d(2) & d(5) & d(8)) = CLng(d(3) & d(6) & d(9)))
End Function
Private Sub printDigits()
Dim a As Long
Dim s As String
    For a = LBound(d) To UBound(d)
        s = s & d(a)
    Next a
    Debug.Print s, d(1) & d(2) & d(3) & " + " & d(4) & d(5) & d(6) & " = " & d(7) & d(8) & d(9), d(1) & d(4) & d(7) & " + " & d(2) & d(5) & d(8) & " = " & d(3) & d(6) & d(9)
End Sub

Originally I missed the 'unique 1-9' requirement and was finding hundreds of answers. But when I realized they had to be unique the problem space went from a billion possibilities to 362880 possibilities, so it turned out much better!
 
Last edited:
omg...THANK YOU so much...I was trying to figure it out but just assumed that no number would equal more than 10..I was so focused in that respect, I never entertained any other possibilites...geez...but thank you sooo much!
 
Alkatran said:
The usual way to solve these puzzles is to turn your two equations into many. For example, based on the small digits: (C + F) mod 10 = (G + H) mod 10 = I. However, whenever I see these puzzles I always just write a computer program to solve them by doing a case-by-case. Here is the output of the program I wrote (notice how there are TWO answers, but that they are very similar):
Code:
718236954     718 + 236 = 954             729 + 135 = 864
729135864     729 + 135 = 864             718 + 236 = 954

Hm. I wrote a program that found 4 solutions:

Code:
ABCDEFGHI    ABC + DEF = GHI    ADG + BEH = CFI
146583729    146 + 583 = 729    157 + 482 = 639
157482639    157 + 482 = 639    146 + 583 = 729
718236954    718 + 236 = 954    729 + 135 = 864
729135864    729 + 135 = 864    718 + 236 = 954

And a few more if you include 0 (I didn't catch where 0 wasn't a valid option?):

Code:
ABCDEFGHI    ABC + DEF = GHI    ADG + BEH = CFI
326584910    326 + 584 = 910    359 + 281 = 640
348562910    348 + 562 = 910    359 + 461 = 820
359281640    359 + 281 = 640    326 + 584 = 910
359461820    359 + 461 = 820    348 + 562 = 910

And even a few more if you let 0 be a leading digit (which is bad form!)

Code:
ABCDEFGHI    ABC + DEF = GHI    ADG + BEH = CFI
023594617    023 + 594 = 617    056 + 291 = 347
023695718    023 + 695 = 718    067 + 291 = 358
045876921    045 + 876 = 921    089 + 472 = 561
056291347    056 + 291 = 347    023 + 594 = 617
067291358    067 + 291 = 358    023 + 695 = 718
067854921    067 + 854 = 921    089 + 652 = 741
089472561    089 + 472 = 561    045 + 876 = 921
089652741    089 + 652 = 741    067 + 854 = 921

DaveE
 
Interestingly, when I run the program again I get all four answers. I must have missed them somehow.
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
Replies
6
Views
1K
Replies
23
Views
5K
  • · Replies 72 ·
3
Replies
72
Views
6K
Replies
7
Views
2K