Math puzzle
Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Math puzzle
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular iknowu99's Avatar
    Join Date
    Dec 2004
    Location
    PA
    Posts
    1,158
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Math puzzle

    There are pairings and values are received one from each scale. Small scale numbers are always unique. We have sum of values that are used. We know that pairings are either summed or not. Based on sum we need the function to return which index in the array was used.

    The goal is to build deciphering function to return which pairings were used to create the sum. For ex: Can you figure out which pairings were used to make the sum?

    Excel
    ABCDE
    1large scale:600400800800
    2small scale:50516364
    3
    4sum:1965

    Last edited by iknowu99; Mar 19th, 2016 at 02:04 PM.
    Hence, we fail to reject the null hypothesis that there is no relationship

    Being Excel addict this could be very frustrating

  2. #2
    MrExcel MVP mikerickson's Avatar
    Join Date
    Jan 2007
    Location
    Davis CA
    Posts
    22,463
    Post Thanks / Like
    Mentioned
    20 Post(s)
    Tagged
    14 Thread(s)

    Default Re: Math puzzle

    Sum of what?

    What does small scale or Large scale matter to the question?

  3. #3
    Board Regular iknowu99's Avatar
    Join Date
    Dec 2004
    Location
    PA
    Posts
    1,158
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Math puzzle

    Sum of pairings that were used. Edited the original post. mikerickson, does that make sense?
    Last edited by iknowu99; Mar 19th, 2016 at 02:06 PM.
    Hence, we fail to reject the null hypothesis that there is no relationship

    Being Excel addict this could be very frustrating

  4. #4
    Board Regular
    Join Date
    Oct 2015
    Location
    Italy
    Posts
    415
    Post Thanks / Like
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Math puzzle

    Each couple (pairings) may be inolved in the sum (1) or not (0). You have to implement a distribution with repetition method to cicle all possible solutions and keep only those matching your sum. I think the light is on but turns off if the pairing are a lot: for 12 pairings you have to test 2^12 possible solutions.

    Bye

  5. #5
    Board Regular iknowu99's Avatar
    Join Date
    Dec 2004
    Location
    PA
    Posts
    1,158
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Math puzzle

    Quote Originally Posted by B___P View Post
    Each couple (pairings) may be inolved in the sum (1) or not (0). You have to implement a distribution with repetition method to cicle all possible solutions and keep only those matching your sum. I think the light is on but turns off if the pairing are a lot: for 12 pairings you have to test 2^12 possible solutions.

    Bye
    how to build recursion function that returns the index of the array that is (1)?
    Last edited by iknowu99; Mar 19th, 2016 at 03:18 PM.
    Hence, we fail to reject the null hypothesis that there is no relationship

    Being Excel addict this could be very frustrating

  6. #6
    Board Regular
    Join Date
    Oct 2015
    Location
    Italy
    Posts
    415
    Post Thanks / Like
    Mentioned
    5 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Math puzzle


  7. #7
    Board Regular iknowu99's Avatar
    Join Date
    Dec 2004
    Location
    PA
    Posts
    1,158
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Math puzzle

    Quote Originally Posted by B___P View Post
    Thanks for reply B_P. That is the correct direction but was this possible with VBA solution (pseudocode) in cases when there are many more permutations?

    It would have 3 parameters =DecipherFunction("B1:E1","B2:E2","B4") and it would return array "1,2,4"
    Last edited by iknowu99; Mar 19th, 2016 at 04:29 PM.
    Hence, we fail to reject the null hypothesis that there is no relationship

    Being Excel addict this could be very frustrating

  8. #8
    MrExcel MVP shg's Avatar
    Join Date
    May 2008
    Location
    The Great State of Texas
    Posts
    21,588
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    13 Thread(s)

    Default Re: Math puzzle

    The vertical pairs are irrlevent, right? So it just reduces to finding the combination of a set of numbers that add to a given total, a problem that has been well explored on this and other forums.

  9. #9
    Board Regular iknowu99's Avatar
    Join Date
    Dec 2004
    Location
    PA
    Posts
    1,158
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Math puzzle

    Hello shg, not sure why you said vertical pairs were irrelevant. some of them might not count toward the sum. The task is to use code to decipher the sum to the pairings (one from large scale one from small scale).
    Hence, we fail to reject the null hypothesis that there is no relationship

    Being Excel addict this could be very frustrating

  10. #10
    MrExcel MVP shg's Avatar
    Join Date
    May 2008
    Location
    The Great State of Texas
    Posts
    21,588
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    13 Thread(s)

    Default Re: Math puzzle

    Right. But for a given vertical pair, you either use both or neither, so it is only their sum that matters, yes?

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •