Results 1 to 8 of 8

Math Help - 4x4 Grid Puzzle

  1. #1
    Member
    Joined
    Sep 2007
    Posts
    75

    4x4 Grid Puzzle

    Hello. Here is a puzzle that could interest YOU!

    A 4x4 grid contains letters from A-I.
    Each of those letters represents only 1 number of 9 (1-9).
    Each number can only be represented by 1 letter.
    At the end of each column and row is the sum of the numbers that are represented by the letters in those columns or rows.
    It is your job to decipher which letters represent which numbers.

    Here's an example puzzle:


    Here's the/an answer to the above puzzle:


    Here's another one for you to do/post the answer for:

    Now, here's what I really want to know; can anyone come up with a logical way of solving one of these puzzles? I'm trying to program Microsoft Excel to solve it for me (to pair with the random puzzle generator I've programmed) but the only way I can think of is to look through all of the 9*8*7*6*5*4*3*2 combinations of letter to number representations and identifying which combination/s (could be multiple) would fit for any puzzle (something that Excel does not have the capacity to handle).

    Something you may need to know is that all the letters must be present on the grid in any puzzle and the remaining 7 squares are filled with random letters (which are also randomly located amongst the 16).

    -Much obliged. I hope you enjoy thinking about this. I will seriously be impressed if somebody thinks of a method of solving any puzzle.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor Mathstud28's Avatar
    Joined
    Mar 2008
    From
    Pennsylvania
    Posts
    3,641
    Quote Originally Posted by Obsidantion View Post
    Hello. Here is a puzzle that could interest YOU!

    A 4x4 grid contains letters from A-I.
    Each of those letters represents only 1 number of 9 (1-9).
    Each number can only be represented by 1 letter.
    At the end of each column and row is the sum of the numbers that are represented by the letters in those columns or rows.
    It is your job to decipher which letters represent which numbers.

    Here's an example puzzle:


    Here's the/an answer to the above puzzle:


    Here's another one for you to do/post the answer for:

    Now, here's what I really want to know; can anyone come up with a logical way of solving one of these puzzles? I'm trying to program Microsoft Excel to solve it for me (to pair with the random puzzle generator I've programmed) but the only way I can think of is to look through all of the 9*8*7*6*5*4*3*2 combinations of letter to number representations and identifying which combination/s (could be multiple) would fit for any puzzle (something that Excel does not have the capacity to handle).

    Something you may need to know is that all the letters must be present on the grid in any puzzle and the remaining 7 squares are filled with random letters (which are also randomly located amongst the 16).

    -Much obliged. I hope you enjoy thinking about this. I will seriously be impressed if somebody thinks of a method of solving any puzzle.
    Isn't it just a system of equations?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Junior Member shinhidora's Avatar
    Joined
    Jun 2008
    Posts
    56
    Solution is whited out for the people who still want to try!

    A = 1
    B = 4
    C = 8
    D = 6
    E = 7
    F = 3
    G = 9
    H = 2
    I = 5


    Gimme a cookie
    Last edited by shinhidora; June 17th 2008 at 12:14 PM.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Member
    Joined
    Sep 2007
    Posts
    75
    Mathstud28: Please elaborate for me. Thanks.

    shinhidora: Woah! Demon speed! Could you take the method you used and turn it into a logical sequence that would solve any puzzle?
    Last edited by Obsidantion; June 17th 2008 at 12:26 PM.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    MHF Contributor Mathstud28's Avatar
    Joined
    Mar 2008
    From
    Pennsylvania
    Posts
    3,641
    Quote Originally Posted by Obsidantion View Post
    Mathstud28: Please elaborate for me. Thanks.

    shinhidora: Woah! Demon speed! Could you take the method you used and turn it into a logical sequence that would solve any puzzle?
    Just think about it as a series of equations

    For the first one

    E+G+F+I=22
    2G+F+H=18

    Now if you keep going until you have set up every row and colum as an equation you can put this into any decent computer system as a matrix and it will solve it for you quicker than you could blink.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Junior Member shinhidora's Avatar
    Joined
    Jun 2008
    Posts
    56
    Make a system to solve any puzzle? Can't be too hard...

    I could make a system with warcraft 3 world editor xD

    Imagine...

    A B C D Q
    E F G H R
    I J K L S
    M N O P T
    U V W X

    A till P being your values
    Q till X being your solutions



    Set A = 0
    Set B = 0
    ...
    Set P = 0
    If
    A+B+C+D = Q
    E+F+G+H = R
    ...
    D+H+L+P = X
    Do
    Display: Value for Q, Value for R, ... , Value for X
    Else
    Set A = 1
    Set B = 0
    ...
    Set P = 0

    And so on...

    Edit: If it wouldn't 've been exams I would've written you the entire and correct code

    Edit2: I'll try to write it in the coming weekend...

    Edit3: Made it anyway

    This is made using the GUI-editor of Warcraft 3 (it's a game and the only language I can program in xD)

    What this does...

    It creates integer variables from A till X. It starts calculating each equation. If the equations don't match, it changes the variables for each integer until the equations match. When they match, it displays the value for each variable.

    Code:
        Events
        Conditions
        Actions
            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                    (A + (B + (C + D))) Equal to Q
                    (E + (F + (G + H))) Equal to R
                    (I + (J + (K + L))) Equal to S
                    (M + (N + (O + P))) Equal to T
                    (A + (E + (I + M))) Equal to T
                    (B + (F + (J + N))) Equal to V
                    (C + (G + (K + O))) Equal to W
                    (D + (H + (L + P))) Equal to X
                Then - Actions
                    Game - Display to (All players) the text: (String(A))
                  ....
                    Game - Display to (All players) the text: (String(X))
                Else - Actions
                    Set A = 1
                    Set B = 0
                    Set C = 0
                    Set D = 0
                    Set E = 0
                    Set F = 0
                    Set G = 0
                    Set H = 0
                    Set I = 0
                    Set J = 0
                    Set K = 0
                    Set L = 0
                    Set M = 0
                    Set N = 0
                    Set O = 0
                    Set P = 0
                    If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                        If - Conditions
                            (A + (B + (C + D))) Equal to Q
                            (E + (F + (G + H))) Equal to R
                            (I + (J + (K + L))) Equal to S
                            (M + (N + (O + P))) Equal to T
                            (A + (E + (I + M))) Equal to T
                            (B + (F + (J + N))) Equal to V
                            (C + (G + (K + O))) Equal to W
                            (D + (H + (L + P))) Equal to X
                        Then - Actions
                            Game - Display to (All players) the text: (String(A))
                           ....
                            Game - Display to (All players) the text: (String(X))
                        Else - Actions
                            Set A = 1
                            Set B = 1
                            Set C = 1
                            Set D = 0
                            Set E = 0
                            Set F = 0
                            Set G = 0
                            Set H = 0
                            Set I = 0
                            Set J = 0
                            Set K = 0
                            Set L = 0
                            Set M = 0
                            Set N = 0
                            Set O = 0
                            Set P = 0
    
    And so on and on until finally...
    
                            If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                                If - Conditions
                                    (A + (B + (C + D))) Equal to Q
                                    (E + (F + (G + H))) Equal to R
                                    (I + (J + (K + L))) Equal to S
                                    (M + (N + (O + P))) Equal to T
                                    (A + (E + (I + M))) Equal to T
                                    (B + (F + (J + N))) Equal to V
                                    (C + (G + (K + O))) Equal to W
                                    (D + (H + (L + P))) Equal to X
                                Then - Actions
                                    Game - Display to (All players) the text: (String(A))
                                   ....
                                    Game - Display to (All players) the text: (String(X))
                                Else - Actions
                                    Set A = 9
                                    Set B = 9
                                    Set C = 9
                                    Set D = 9
                                    Set E = 9
                                    Set F = 9
                                    Set G = 9
                                    Set H = 9
                                    Set I = 9
                                    Set J = 9
                                    Set K = 9
                                    Set L = 9
                                    Set M = 9
                                    Set N = 9
                                    Set O = 9
                                    Set P = 9
    Last edited by shinhidora; June 17th 2008 at 12:40 PM.
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Member
    Joined
    Sep 2007
    Posts
    75
    Mathstud28: My aim is to actually program the computer system (Excel functions) to solve the equations. Any idea how it might do that?

    shinhidora: If I understand you correctly, you are suggesting I cycle through all the possible combinations of values that the letters could have until I find a combination that will fit into the puzzle, which is too cumbersome for Excel (It doesn't have a repeat function).
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Junior Member shinhidora's Avatar
    Joined
    Jun 2008
    Posts
    56
    Quote Originally Posted by Obsidantion View Post
    Mathstud28: My aim is to actually program the computer system (Excel functions) to solve the equations. Any idea how it might do that?

    shinhidora: If I understand you correctly, you are suggesting I cycle through all the possible combinations of values that the letters could have until I find a combination that will fit into the puzzle, which is too cumbersome for Excel (It doesn't have a repeat function).
    It's the only way I can think of... you really need some kind of loop or repeat function to solve this, I think.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. grid generation
    Posted in the Math Software Forum
    Replies: 1
    Last Post: January 30th 2010, 02:06 PM
  2. Ten by Ten grid
    Posted in the Discrete Math Forum
    Replies: 3
    Last Post: November 2nd 2009, 02:50 PM
  3. nxn grid problem.
    Posted in the Math Topics Forum
    Replies: 4
    Last Post: October 31st 2009, 07:00 AM
  4. Help With A Grid
    Posted in the Pre-Calculus Forum
    Replies: 2
    Last Post: October 31st 2008, 12:34 PM
  5. Probability Grid
    Posted in the Statistics Forum
    Replies: 10
    Last Post: October 14th 2008, 10:46 PM

Search Tags


/mathhelpforum @mathhelpforum