How I Learn Stuff

April 1, 2009

Try a Puzzle

Filed under: Uncategorized — james @ 1:01 am

A lot of my learning is motivated by puzzles. I particularly like math puzzles. Here’s one:

1 2 3 4 5 = 1
5 4 3 2 1 = 2
1 1 1 1 1 = 5
2 2 2 2 2 = 1
3 3 3 3 3 = 6
4 4 4 4 4 = 2
5 5 5 5 5 = 7
6 6 6 6 6 = 3
1 1 2 2 2 = 6
3 3 4 4 4 = 7
1 1 1 1 2 = 1
1 1 1 1 3 = 6
1 1 1 1 4 = 2
1 1 1 1 5 = 7
2 2 2 2 6 = 3
2 2 2 2 5 = 7
2 2 2 2 4 = 2
2 2 2 2 3 = 6
2 2 2 2 2 = 1
6 1 1 1 1 = 2
5 1 1 1 1 = 8
4 1 1 1 1 = 5
3 1 1 1 1 = 2
2 1 1 1 1 = 8

3 1 4 1 5 = ?

This puzzle came to me from Trey Klein. I found it difficult to solve. Took me a couple of hours.

Most buccaneers, I will hazard to say, enjoy the challenge of a good puzzle. If you, like me, can’t resist puzzles, then of course you’ll have to try this one. But, I have a request. Whether or not you solve it, I’d like you to write a comment telling us how you tried to solve it. What steps did you take? What ideas did you have? What techniques or tools did you apply?

To puzzle is to learn.

Puzzles are fabulously educational even if you fail to solve them. So, don’t get too hung up on the solution itself. I could tell you the solution to the puzzle above, right now, and you would gain something. Sure. But if you try very hard to find the answer, fail, and THEN ask me for the answer, you will gain a lot more. The answer will have much more power and meaning for you, because of how you suffered for it. You will learn something critical about your strategy of problem-solving.

I talk about this in my book. I call it the “Sail Power Principle.” If you don’t struggle with a problem at all, that’s like sails with no wind in them. If you struggle too much, then you’ll get discouraged, and that’s like sails with too much wind– blowing them to shreds. You want to find that sweet spot. Put some effort into it, and when you begin to despair, say to yourself “I’m about to learn something important!” then you can LOOK AT THE ANSWER.

Of course, you may solve the puzzle, yourself. That’s cool, too.

21 Comments »

  1. I first tried to use operators. Thought by inserting operators within the digits, or substituting operators for digits, I might get the right hand side. I tried this for a while, and then thought of using numbers with multiple digits and operators.
    Then I tried the range of numbers present on the LHS and the RHS. And found that the number 4 was missing from the RHS. That way, 4 could be the answer. But that didn’t sound puzzling enough for me, so I labored on.
    I tried to see if it was a continuous series, like if the first string had anything to do with the next one.
    Lastly, I decided to take the first set as a reference of which numbers could appear if a digit is at a particular place on the LHS. Accordingly, 6,7 or 2 could be the RHS if 3 is the first digit on the LHS. If 5 is the last digit on the LHS, the only matching number on the RHS is 7.
    I am not sure if that is the answer, but that is how far I got in half an hour. Looking forward to hearing the answer.

    [James' Reply: I also thought it odd that the only missing result was a 4. However, I can tell you that "2 4 2 3 2" would be equal to 4.

    What about 1 2 3 4 5? That is not equal to 7, but rather 1.]

    Comment by Anoop — April 1, 2009 @ 4:55 am

  2. [James' Reply: This is an impressive example of a stream-of-consciousness style of notetaking. Pradeep has not yet solved the puzzle, but he certainly is applying interesting theories and creative ideas, isn't he?

    Pradeep is a student of mine, so he is well-seasoned and very bold about my challenges. This is good work, Pradeep.]

    Start: 12:00 PM : April 1st : 2009

    As another human, I started to observe patterns, first on the left and
    then on the right.

    I tried questioning the patterns and trying to make inferences out of it.

    A thought came to my mind if this could be simpler than what I think it could be.
    General Systems thinking came to my mind.

    Instead of reading it from top to bottom, I decided to read it from bottom to top
    and maybe I may try reading it from in between to top or bottom.

    A part of brain says, “Google Search” and the larger part says, “Dont lose the fun”

    I noticed 7 and 8 being the only numbers on the right that are not available on left.
    It may or may not help me solve the problem but I dont want to ignore that.

    I decided to group them based on the right hand side values:

    RH1

    1 2 3 4 5 = 1
    2 2 2 2 2 = 1
    1 1 1 1 2 = 1
    2 2 2 2 2 = 1

    RH2

    5 4 3 2 1 = 2
    4 4 4 4 4 = 2
    1 1 1 1 4 = 2
    2 2 2 2 4 = 2
    6 1 1 1 1 = 2
    3 1 1 1 1 = 2

    RH3

    6 6 6 6 6 = 3
    2 2 2 2 6 = 3

    RH5

    1 1 1 1 1 = 5
    4 1 1 1 1 = 5

    RH6

    3 3 3 3 3 = 6
    1 1 2 2 2 = 6
    1 1 1 1 3 = 6
    2 2 2 2 3 = 6

    RH7

    5 5 5 5 5 = 7
    3 3 4 4 4 = 7
    1 1 1 1 5 = 7
    2 2 2 2 5 = 7

    RH8

    5 1 1 1 1 = 8
    2 1 1 1 1 = 8

    I notice there is no 4 on the right hand side. Wondering if that is a clue.

    Here is the guy : 3 1 4 1 5 = ?

    I am asking a question if question mark is waht is supposed to be there but I dont have any ideas to disprove it.

    If I can get 4 on the right hand side, I think the puzzle is cracked but as of now, I don’t know how to get that.

    Some conjectures:

    In all RH7, there is at least one 5 on the LH
    In all RH6, there is at least one 3 on the LH
    In all RH5, there are at least four 1 on the LH
    In all RH2, there is either four – ones or one – four on LH
    In all RH8, there are four ones on the LH
    In all RH3, there is at least one six on the LH
    In all RH1, there is at least one two on the LH

    —-

    Going by the above: RH5,RH2 RH8 seems to have a similar pattern on LH but I am wondering what differentiates them?

    Leave this thread as of now and let me apply the above to the puzzle:

    Here is the guy : 3 1 4 1 5 = ?

    It cant be RH5 or RH8 or RH3( based on the above conjectures )
    It cant be RH 1 either

    It could either be RH7 / RH6 / RH2
    I want to re look into RH7, RH6 and RH2 more deeper now.

    Wow! I found a bug in my observation of RH7, there is a pattern 3 3 4 4 4 = 7 that does not have a 5 in LH
    Maybe, I screwed up. What do I do next?

    Hmm, let me see what other things in the list has

    two ones
    one three
    one four
    one five

    that 3 1 4 1 5 = ?

    Got an interesting idea: Go and smoke or take a break:

    Back from break:

    Why is there is an “is equal to” sign?

    Let me do some math there:

    Opened calculator, planning to try a few ideas:

    1 2 3 4 5 = 1
    side thought: could the space between the numbers be of any significance? May be for some other puzzle. Let me stock
    the idea for future use.

    Ah! A scene from Monty Python and the Holy Grail comes to mind : The witch scene where they smartly ( err ) try
    to come out with theroies of how to prove the lady was a witch.

    I visited : http://www.buccaneerscholar.com/ in which the blog post appeared something like the below:

    //
    Latest Top (10) News

    ——————————————————————————–

    Try a Puzzle
    A lot of my learning motivated by puzzles. I particularly like math puzzles. Here’s one: 1 2 3 4 5 = 1 5 4 3 2 1 = 2 1 1 1 1 1 = 5 2 2 2 2 2 ….
    Wow. Isn’t that a new way of lookin at it?

    //

    I suspect James might have altered the alignment of how the puzzle looks but I take guts to refute that because I think he
    does not need to complicate an already existing problem. Hey Pradeep, isn’t he a man who sets traps to educate?

    I feel lost!
    I think I am adding too many variables than required.

    Thinking of using the defocusing heuristic:

    1 some operator 2 some operator 3 some operator 4 some operator 5 is equal to 1

    What are those some operators in each case?

    - 1 – 2 + 3 – 4 + 5 = 1

    Now let me take another one and apply the same operators in the same position:

    -3 – 3 + 3 – 3 + 3 = 6 ( bad idea but I took a random series in between, let me take the one after 12345 =1 )
    -5 + 4 + 3 + 2 – 1 = 2 ( what relation can I draw between this and the previous series – 1 – 2 + 3 – 4 + 5 = 1 )
    -1 – 2 + 3 – 4 + 5 = 1

    ( I think I could be on the right track but might want to deepen my analysis )

    Let me bring in another RH2 and try it out:

    -3 + 1 + 1 + 1 – 1 = 2 ( minus 2 )
    -5 + 4 + 3 + 2 – 1 = 2 ( plus 2 )

    Taking another RH2

    -1 + 1 + 1 + 1 – 4 = 2 ( minus 2 )

    Wow! Makes me feel a hope that I might not be lost

    Here comes the test of the test:

    - 4 + 4 + 4 + 4 – 4 = 4 ( Ah nuts, supposed to be 2 but maybe there is another principle for all numbers equal )
    - 6 + 1 + 1 + 1 -1 = -4 ( Nuts again. No, there isn’t a four in RH, maybe 2 is substituted for 4 )

    This is cool.

    Taking: RH6

    + 1 – 1 + 2 + 2 + 2 = 6 ( rough work )
    + 1 – 1 + 1 + 1 + 3 = 6 ( rough work )
    + 2 – 2 + 2 + 2 + 3 = 6 ( rough work )
    - 3 – 3 + 3 – 3 – 3 = 6 ( rough work )

    Hmm, appears to fail for Rh6

    How about other numbers?

    + 3 + 3 + 4 + 4 – 4 = 7

    I notice I am being playing with – and + but what about other operators?

    What is 334 / 44 ? = 7.5909090909090909090909090909091 ( ~7 )
    What is 222 / 23 ? = 9.6521739130434782608695652173913 ( Ah nuts of nuts )

    I am unable to establish a relationship with about 2 and half hours of work on this. I want to pause now, publish
    this on James blog and then chew the cud sometime later.

    I think I am not giving up.

    3: 21 PM :: April 1st :: 2009

    [ hope its not an April fool prank James However, there is fun in being fooled this way ]

    Comment by Pradeep Soundararajan — April 1, 2009 @ 4:56 am

  3. I was able to solve the puzzle within about twenty minutes, thanks largely to a lucky observation of mine. Without giving away too much about the solution I arrived at, I will try to describe my process:

    The first thing I looked at were the bounds of the numbers on either side – The fact that no numbers are higher than 8 on the right side and none are higher than 6 on the left.

    [James' Reply: This is an interesting point: you were looking not only at what was there, but at what was suspiciously NOT there. As others have noted, there is not "4" on the right hand side of the original set.]

    At first I discounted the former observation because it didn’t make sense, though I later came back to it. The second half made me think of dice – Each number, I reasoned, probably represented the result of a roll of a die and therefore the result would likely have something to do with dice, perhaps their spots. After working through many possibilities that came to mind, I eventually discarded that option for the time being.

    [James' Reply: Interesting observation, because in fact Trey's puzzle is a version of a dice puzzle game I introduced him to, some time ago.]

    Next I focused on the atomic elements as much as possible – The order of the numbers is clearly important, as shown by the first two(1 2 3 4 5 and 5 4 3 2 1), so I found the minimal change set for each digit and saw how they affected the result. There is a handy progression in both the last digit and the first digit provided for comparison. After seeing the pattern(Helped by my earlier observations about the limits…) the solution became trivial and was worked out in minutes.
    For me, the important part was the observations I made, not the effort I put in. Take in as much information as you can, even if it seems trivial or unimportant, even if you set it aside immediately, it may find new importance at a later moment, after the rest has fallen into place. That’s true of all learning – Grasp as much knowledge as you can, it will be invaluable eventually.
    The answer is four. Have fun arriving at it, and thank you for the logic exercise James.

    [James' Reply: (Actually the answer is not 4, but that was a trivial arithmetic mistake. Nicholas has privately told me the true answer.)]

    Comment by Nicholas Raverty — April 1, 2009 @ 11:40 am

  4. I am not sure but I think I have the answer.

    Process:
    I first translated it into the words and then did the vowel pairing and even cyphered the letters of the words. a=1, b=2 and so on. Ha! Then I translated it into 1337, but got nowhere interesting.

    [James' Reply: You may have gotten nowhere interesting with 1337, but the very idea of trying that IS interesting. It didn't occur to me to do that.]

    Then I scrapped it all and just looked at the last set of numbers and sneezed a few times, (I have a cold.) and it dawned on me. Missing a decimal point perhaps?

    [James' Reply: So, do you have a principle by which you can relate all the cases to the associated number on the right hand side? If so, what is it, and what is the answer for the last case?]

    Tanga is a great site for puzzles like this. http://tanga.com/ They make you think in all sorts of ways. It can be addicting. When I did the puzzles at Tanga the other puzzlers would give hints to guide people. They call their hints “salt.” And if I have the right answer then I have salted in this comment.

    [James' Reply: Cool. I'll look at that site.]

    Comment by boo — April 1, 2009 @ 2:38 pm

  5. Reading the other attempts suggested to me that it was something simpler. I tried adding the LHS and RHS to see if that generated a pattern. I put the numbers into a spreadsheet and sorted them numerically on the LHS. The RHS looked like a mod of the LHS of some sort. I tried a DEC2BIN conversion first though, but that wasn’t working for me. I looked at the values on the right and they all range between 1 and 8. So I tried modulus 9. Matches for first few values of sum(!) of digits of LHS and RHS. Interesting that there are no zeros on either side. Note that values of sum exceed 9 by value of mod 9, so do mod 9 of sum. Mod 9 of sum of LHS digits and RHS matches mod 9 of LHS as a single number.

    Verify: check that hint of “2 4 2 3 2″ would be equal to 4 works. It does. So answer is …

    [James' Reply: Summing the digits modulo 9 works for some of the cases, but not all. Can that be the right method, then?]

    Comment by Kerry — April 1, 2009 @ 3:53 pm

  6. I must say that having studied discrete maths, group theory, etc helped as it gave me a familiarity with what mod’s look like (having said that, it is over five years since I studied any of that stuff). This matching of familiar patterns is in my view the basis of what most people call ‘common sense’ and ‘experience’ and the key measure of learning. It’s just like watching Shakespeare being performed – the more often you see Macbeth the greater the depth of the experience as you start becoming familiar with the patterns in the language.

    [James' Reply: Absolutely so! I know this as the principle of "Knowledge attracts knowledge." What you already think you know-- how you already think-- facilitates what you think and learn next.

    Some people are familiar with lateral thinking puzzles and that leads them to do things like spell out the digits or look at the shape of the digits for clues. Other people may be more comfortable with arithmetic patterns and immediately look for an equation. Still others might look at each case as a series and look at the differences between the numbers as they progress. Then there are those of us who are familiar with the constant Pi, and may make meaning from that pattern.

    Whatever the answer is, a puzzle-solver has faith that there will be a compelling story behind it. Among other things, he's looking for that story.]

    Comment by Kerry — April 1, 2009 @ 4:01 pm

  7. [James' Reply: Melora these are wonderful notes! See below for a bit more information about your conjectures.]

    I haven’t solved this yet either, but I’ve made some significant progress to share with others …

    *****

    start with the principle of gathering as much information as possible about the problem

    add to list the hint James gave in the problem presentation

    2 4 2 3 2 = 4

    read what others have done so far to see if an answer is already known (no sense repeating work that has already been done)

    missing on right = 4
    missing on left = 7, 8

    Note notation in use: “RH”, “LH” adopt for consistency in comparing posts.

    Note strategies others have suggested:
    order by RHS, try operators, look for series, substitution cyper?,

    rearrange the blocks, restructure the presentation of the blocks, …

    *****

    Trying a twist on Pradeep’s plan:
    combining James hint with RH groupings and reordering according to far LH value (set up like an eigenvalue problem):

    1 1 1 1 2 = 1
    1 2 3 4 5 = 1
    2 2 2 2 2 = 1
    2 2 2 2 2 = 1

    1 1 1 1 4 = 2
    2 2 2 2 4 = 2
    3 1 1 1 1 = 2
    4 4 4 4 4 = 2
    5 4 3 2 1 = 2
    6 1 1 1 1 = 2

    2 2 2 2 6 = 3
    6 6 6 6 6 = 3

    2 4 2 3 2 = 4

    1 1 1 1 1 = 5
    4 1 1 1 1 = 5

    1 1 2 2 2 = 6
    1 1 1 1 3 = 6
    2 2 2 2 3 = 6
    3 3 3 3 3 = 6

    1 1 1 1 5 = 7
    2 2 2 2 5 = 7
    3 3 4 4 4 = 7
    5 5 5 5 5 = 7

    2 1 1 1 1 = 8
    5 1 1 1 1 = 8

    Nothing obvious pops out here.

    [James' Reply: I agree. I even did a scatter plot of these values, and found no apparent visual pattern.]

    *****

    Trying my own strategy:

    Like others I am noticing patterns on the LH side.

    Let’s see what happens if I break out the big block into groupings of smaller sets with similar patterns. Self-organizing maps are often useful in making sense of large data sets, such as when analyzing genomic data.

    Maybe rules differ by set? Perhaps each set illustrates a rule? (metaphor: control code, not data; introns, not exons …? maybe a mix of “code” and “data” depending on the set?)

    Set 1:

    1 2 3 4 5 = 1
    5 4 3 2 1 = 2

    Observation: 1st set member counts up consecutively, 2nd counts down consecutively

    Conjecture: does this suggest a factor assigning directionality of values in a series?

    Conjecture: is this a hint that ordering R–>L is different than ordering L–>R? Ordering with respect to what? the set of LH digits? the “=” sign?

    Conjecture: perhaps the opposition suggests an inverse operation such as subtraction rather than addition?

    Conjecture: Is there a significance to the numbers in the series? Do I need to apply them through an operator according to the positions of the LH digits?

    Deduced Rule: ?

    *****

    Set 2:

    1 1 1 1 1 = 5
    2 2 2 2 2 = 1
    3 3 3 3 3 = 6
    4 4 4 4 4 = 2
    5 5 5 5 5 = 7
    6 6 6 6 6 = 3

    Observation: All 5 digits on LH have same value for each member of set

    Conjecture: RH is unlikely to be an arbitrary assignment (but possible if this is a substitution cypher). There is likely to be some simple rule for figuring out the RH. Try addition first. Aha!

    Observation: addition works but with a twist. You need to add the digits of the answer to the sum together to get the final RH value

    Conjecture: missing values from set are:

    7 7 7 7 7 = 8
    8 8 8 8 8 = 4
    9 9 9 9 9 = 9

    [James' Reply: Here are the actual results:

    7 7 7 7 7 = 8
    8 8 8 8 8 = 4
    9 9 9 9 9 = 0

    ]

    Observation: reordering the set by RH with assumed missing values reveals that even LH values give odd RH values and vice versa.:

    2 2 2 2 2 = 1
    4 4 4 4 4 = 2
    6 6 6 6 6 = 3
    8 8 8 8 8 = 4
    1 1 1 1 1 = 5
    3 3 3 3 3 = 6
    5 5 5 5 5 = 7
    7 7 7 7 7 = 8
    9 9 9 9 9 = 9

    Conjecture: Any significance to the odd/even pattern in the context of this puzzle, or is it just an inherent property of numbers?

    Deduced Rule: RH values = sum digits of answer to sum LH digits (e.g.,

    5 x 3 = 15 –> 1 + 5 = 6

    *****

    Set 3:

    1 1 2 2 2 = 6
    3 3 4 4 4 = 7

    Observation: each member of set has a subsets of 2 identical digits and a set of 3 identical digits

    Observation: repeated values in subsets are consecutive and increasing within a given set member

    Observation: RH values are consecutive (an artefact of ordering?)

    Conjecture: Try a simple substitution cypher

    Observation: not a straightforward substitution … come back to this later

    Conjecture: ? insufficient information so far ?

    Deduced Rule: ?

    *****

    Set 4:

    1 1 1 1 2 = 1
    1 1 1 1 3 = 6
    1 1 1 1 4 = 2
    1 1 1 1 5 = 7

    Observation: rightmost LH digits count up (artefact of ordering)

    Observation: 4 left-most digits of LH same for all members of set

    Observation: RH’s are unique for this set, but set is smaller than block 6, so be cautious in drawing conclusions, perhaps deduced rule would not hold for missing members of set …

    Conjecture: right-most LH digit must suffice (in combination with significance of “1111″) to change value of RH value

    Conjecture: “1111″ must represent a function, operation or instruction rather than a value, but *what*?: is “1 1 1 1″ some kind of mask? or to be ignored? Is this just a case where “1″ behaves wierdly? What happens if some other value is used in this way?

    Conjecture: The simplest approach would be a straight mapping. Aha!

    Deduced Rule: values of right-most LH map to values in Block 2 (e.g., 1 1 1 1 3 = 3 3 3 3 3 = 6 (value mapping is from LH to RH in both cases)

    *****

    Set 5:

    2 2 2 2 6 = 3
    2 2 2 2 5 = 7
    2 2 2 2 4 = 2
    2 2 2 2 3 = 6
    2 2 2 2 2 = 1

    Observation: pattern is similar to Block 4, but with “2222″ in place of “1111″

    Conjecture: He read my mind. But what difference does the difference make?

    Observation: mapping is same as for Block 4

    Conjecture: It may not matter what value populates the repeated subset … but then 2 does map to 1 (or 4, depending on the direction of mapping) … Not sure what to conclude here.

    Deduced Rule: ?

    *****

    Set 6:

    6 1 1 1 1 = 2
    5 1 1 1 1 = 8
    4 1 1 1 1 = 5
    3 1 1 1 1 = 2
    2 1 1 1 1 = 8

    Observation: far left LH digits count down (artefact of ordering)

    Observation: 4 right-most digits of LH same for all members of set

    Observation: 2 members of this set have the same RH but different LH. Is this a transcription error or a significant piece of information?

    Conjecture: far LH digit must suffice (in combination with significance of “1111″) to change value of RH value

    Conjecture: Putting above together, I must conclude that mapping is not the same as for Sets 4 & 5. Shifting the repeated digits to the right side of the LH has different significance than if it appears on the left side of the LH. Or perhaps I need to revisit Deduced Rules from Sets 4 & 5 …

    Conjecture: “1111″ must represent a function or operation rather than a value, but *what*?

    Deduced Rule: ?

    *****

    James’ Hint:

    2 4 2 3 2 = 4

    Observation: This hint demonstrates that at least one additional member of the problem set (beyond the unknown) is missing from the problem presentation

    Conjecture: other pieces of puzzle may be missing too? would finding them help? (Tried this for Set 2)

    Conjecture: There should be sufficient info as presented to solve the puzzle. Look for patterns. Hypotheses must apply to all known evidence.

    Deduced Rule: ?

    *****

    Unknown:

    3 1 4 1 5 = ?

    Conjecture: problem is solvable by deducing the rules from the above patterns and applying them to the unknown

    Conjecture: first conjecture may be wrong, perhaps this isn’t a mathematical problem at all, but is probably at least an exercise in logic

    [James' Reply: Actually it is mathematical. I mentioned that in the original post (probably shouldn't have).]

    Conjecture: there may be no relationship at all, James is making it all up and just wants to draw us into the game to understand how we think …

    [James' Reply: I would only do that with people I know very well, and who consider themselves master puzzlers. With strangers or anyone not supremely self-confident, giving a puzzle with no meaning behind it just makes them angry.

    Personally, I'm happy to get a puzzle that has no meaning. I believe that my art should be good enough to detect that possibility, as yours has.

    Anyway, I promise that once you know the answer, you will not feel that I was wasting your time.]
    ;-)

    Answer: ?

    Comment by Mel — April 1, 2009 @ 6:14 pm

  8. [James' Reply: This is another wonderful set of notes from well known software tester Jeff Fry, who led the team that won the 2nd CAST testing competition.]

    Some quick notes, attempting to capture key thoughts (fruitful and not) as I go:

    Scanning the list, looking to see what clues pop out.

    Position seems like it almost certainly matters, e.g.
    1 1 1 1 2 = 1
    2 1 1 1 1 = 8
    and
    1 2 3 4 5 = 1
    5 4 3 2 1 = 2

    Every example listed is 5 digits between 1 & 6.
    Every example given yields a number 1 through 8 (no 2 digit results).

    This could come from one or more of: addition, subtraction, multiplication, division, modulo…If it’s arithmetic operations on the digits, I like the idea of modulo in some form.

    Looking at these, if the answer was modulo 9, it looks like they’re progressing by 3s, e.g. 2+3=5, 5+3=8, 8+3=(11-9)=2
    2 1 1 1 1 = 8
    3 1 1 1 1 = 2
    4 1 1 1 1 = 5
    5 1 1 1 1 = 8
    6 1 1 1 1 = 2

    …and these are progressing in increments of 5. Seems like a good lead, now (assuming I’m not attributing meaning to noise). What determines the increment?
    1 1 1 1 2 = 1
    1 1 1 1 3 = 6
    1 1 1 1 4 = 2
    1 1 1 1 5 = 7

    By the way, at this point, I think having 31415 = 9 would be very clever, since the pattern above seems like it might point be able to yield a 9, but never does in the sample provided.

    OK, this set also seems to increment by 5. What on Earth is determining the increment? (Oh, and what’s determining the number that’s getting incremented…but that seems likely less fruitful to expore at the moment. We’ll see…)
    1 1 1 1 1 = 5
    2 2 2 2 2 = 1
    3 3 3 3 3 = 6
    4 4 4 4 4 = 2
    5 5 5 5 5 = 7
    6 6 6 6 6 = 3

    This set’s incrementing by 4*:
    2 2 2 2 6 = 3
    2 2 2 2 5 = 7
    2 2 2 2 4 = 2
    2 2 2 2 3 = 6
    2 2 2 2 2 = 1

    *Whoops. No, it’s incrementing by 5. I was reading top down, but I didn’t catch that until later on, noted below.

    I can’t tell yet if ..
    1 2 3 4 5 = 1
    5 4 3 2 1 = 2

    ..Or this..
    1 1 2 2 2 = 6
    3 3 4 4 4 = 7

    ..are related sets. All my other sets have been (a) bigger, and (b) changed either 1 or all the digits as they progressed. I seems like these two /might/ be the clues that help me unravel the unknown set, since it isn’t a one-off of any of the others, as far as I can tell so far.

    Now I’m scanning digits in a column, and seeing what is the set of answers they yield. Everything that ends in a 1 = 2, 5, or 8. Everything that ends in a 2 = 1. 3 always yields 6. 4 yields 2 or 7. 5 yields 1 or 7. 6 yields 3. Interesting? I’m not sure yet – all of these are pretty small samples (with the set of sets ending in 1 being the largest of them).

    Oh! I just also noticed that none of the examples yield 4. Coincidence?

    OK. The sets I suspect I understand the most about are progressing by 3, 4, or 5.

    Just had a thought. Can this be simplified down to a smaller set? E.g, can I ignore digits 2,3,4 and only consider digits 1 and 5? Eh, nope. E.g. 12345=1 but 11115=7, therefore x***y is not all I need to look at. Maybe something like that though? I like the idea of trying to eliminate extraneous variables here.

    Looking at some sets out of the given order, e.g.
    11111=5
    11115=7
    51111=8

    Just noticed that “22222=1” occurs twice on the list. It’s reassuring that 22222 = the same thing both times…but I’m not sure what else I can learn from this at this point. Why 1, instead of something else?

    Ah, nice! I just realized that if I sum these sets, modulo 9, they yield the listed answer.
    1 1 1 1 1 = 5
    2 2 2 2 2 = 1
    3 3 3 3 3 = 6
    4 4 4 4 4 = 2
    5 5 5 5 5 = 7
    6 6 6 6 6 = 3

    This is the first time I pulled out a tool: The interactive ruby shell, where I confirmed
    irb(main):010:0> 15 % 9
    => 6
    irb(main):011:0> 20 % 9
    => 2
    irb(main):012:0> 25 % 9
    => 7
    irb(main):013:0> 30 % 9
    => 3

    This is a cool step! Now I think I could estimate the result for, say 77777 or 88888. What about the sets that aren’t five of the same digit? I wondered for a second if the whole puzzle was just sum the digits, modulo 9…but that doesn’t explain the cases where order matters. Clearly wrong. Let’s experiment more.

    Going back to the increment, the two sets that solely increment the 5th digit are incrementing by 5, as is the set that increments all 5 digits together. (This is when I noticed that I’d gotten the increment wrong on the set below – not noticing that the set was arranged in reverse order, relative to the others — and went up to add my footnote, correcting myself.)
    2 2 2 2 6 = 3
    2 2 2 2 5 = 7
    2 2 2 2 4 = 2
    2 2 2 2 3 = 6
    2 2 2 2 2 = 1

    The only set I’m sure of where the yield /isn’t/ incrementing by 5 is the one that increments the first digit. That one increments by 3. What’re the critical differences?

    I’m feeling a bit stumped (and tired). Before I give it a rest for the night, lets take another look at my oddball sets:
    1 2 3 4 5 = 1
    5 4 3 2 1 = 2
    1 1 2 2 2 = 6
    3 3 4 4 4 = 7

    One thing that’s true of both of them, their yield is incremented by 1 (at least after % 9). Another tidbit: Most of my sets start with a digit that’s less than or equal to the digit they end with. The set of 2222x is interesting, because 22221 isn’t listed with the other 2222x’s. Would that set, if included follow the same pattern? If it did, it’d = 5 (and mesh with my observation that sets that end in 1 yield answers in the set of 2, 5, or 8.

    Doh! As an aside, I just realized that “N % 9” is another way of saying “add the digits of N up, and repeat until one has a single digit number”, e.g. 77 => 7+7 => 14 => 1+4 => 5. That helps a bit, when I’m wondering what is being reduced down to (for example) 7, it’s quicker to picture that it’s probably one of (7, 16, 25, 34, 43, 52, 61, 70). Yes, it could be a 3+ digit number, but I think it’s likely not.

    Back to my oddball sets. Why would 12345 = something in (1, 10, 19, 28, 37, 46, 55, etc.)? Why would 54321 = something in (2, 11, 20, 29, 38, 47, 56, 65, etc.)?

    Oy! It’s 1AM local time. I’ve been at this on and off for a couple hours. I think it’s time to sleep on it! This seems long enough for a comment, so I suppose I’ll submit it now. Time permitting, I hope to puzzle on this some more and possibly submit a round two before I let myself read the other comments.

    Thanks for a fun puzzle!

    Jeff Fry

    Comment by Jeff Fry — April 2, 2009 @ 3:09 am

  9. [James' Reply: I also use Google when solving difficult problems. If it's a "play" problem, instead of a work problem, I will leave googling until I get really frustrated. For work, though, googling is a core skill of rapid learning and problem solving.]

    Initially I clubbed all the values for a specific RHS and made the below table, to observer if there is a common representation used to indicate each RHS.
    1=> 1 2 3 4 5
    2 2 2 2 2
    1 1 1 1 2
    2 2 2 2 2

    2=> 5 4 3 2 1
    4 4 4 4 4
    1 1 1 1 4
    2 2 2 2 4
    6 1 1 1 1
    3 1 1 1 1

    3=> 6 6 6 6 6
    2 2 2 2 6

    4=>

    5=> 1 1 1 1 1
    4 1 1 1 1

    6=> 3 3 3 3 3
    1 1 2 2 2
    1 1 1 1 3
    2 2 2 2 3

    7=> 5 5 5 5 5
    3 3 4 4 4
    1 1 1 1 5
    2 2 2 2 5

    8=> 5 1 1 1 1
    2 1 1 1 1

    9=>

    Once I arranged them I tried adding, subtracting, multiplying, dividing, within the LHS, I chose the operators randomly. I wanted to find what is common in the arrangement to make it 1 or 2 or 3 , etc. I was going no where with this approach.

    But later I observed that 2 2 2 2 2 is 1 and 4 4 4 4 4 is 2 so 6 6 6 6 6 is 3 and 4 could be 8 8 8 8 8, in the same way 1 1 1 1 1 is 5, 3 3 3 3 3 is 6, 5 5 5 5 5 is 7 and 7 7 7 7 7 could be 8.

    If I arrange it properly it could be written as

    11111 – 5
    22222 – 1
    33333 – 6
    44444 – 2
    55555 – 7
    66666 – 3
    77777 – 8
    88888 – 4
    99999 – 9

    Next, observation was

    1 1 1 1 2 = 1,
    1 1 1 1 4 = 2,
    Hence the below could be possible
    1 1 1 1 6 = 3
    1 1 1 1 8 = 4

    And in the same way the below could be possible

    1 1 1 1 3 = 6 (correct, as per the data provided)
    1 1 1 1 5 = 7 (correct, as per the data provided)
    1 1 1 1 7 = 8
    1 1 1 1 9 = 9

    And so,

    2 2 2 2 6 is 3 as provided, so v could say
    2 2 2 2 8 = 4
    2 2 2 2 2 = 1
    2 2 2 2 4 = 2 (correct as per the data provided)

    The next set would be

    2 2 2 2 3 = 6 (correct as per the data provided)
    2 2 2 2 5 = 7 (correct as per the data provided)
    2 2 2 2 7 = 8
    2 2 2 2 9 = 9

    But now, concentrating on the patterns which I am still not able to understand

    1 2 3 4 5 = 1
    5 4 3 2 1 = 2
    1 1 2 2 2 = 6
    3 3 4 4 4 = 7

    I am pausing here, but plan to work on the puzzle in the night or in the weekend.

    (I even goggled once with the text “Trey Klein” and then “3 1 4 1 5 = ?” Which sort of hinted me once could it be related to the US postal code, but then the other numbers did not match, also since it is written as a math puzzle dropped the idea;)

    Comment by Sharath Byregowda — April 2, 2009 @ 6:33 am

  10. Looking back at my spreadsheet I’m thinking ‘what was I thinking’. I must keep better notes.

    Playing around a bit more I discovered that the LHS as a number less the sum of its digits is exactly divisible by 9. Probably related to the mod of the LHS as a number being equal to the mod of the sum of the LHS digits as discovered earlier. Doesn’t seem to help but fascinating nevertheless. It seems to be a property of all five digit decimal numbers. Reminds me of the rule for determining whether a number is divisible by 3.

    Might have a think about it over the weekend – going away and doing something else usually helps.

    Comment by Kerry — April 2, 2009 @ 3:15 pm

  11. 11111=5
    11112=1
    11113=6
    11114=2
    11115=7

    22222=1
    22223=6
    22224=2
    22225=7
    22226=3

    These series suggest a cycle of 5-1-6-2-7-3 which is +5 in mod 9. So I tried brute-force in a spreadsheet: increment 11111 by 1 for the LHS and adding 5 then mod 9 for RHS. I then checked it against the other values we have. This doesn’t produce 11222=6 though – it gives 2. Also for the range 22222-22226 it is out by 2 (except for 22225 which is out by 7). 21111 is also out by 7. Perhaps because there are no zeros my increments should skip zeros? Removing the zeroes gets a closer match but 12345=1 and a few others don’t work.

    Hmm. Why are there no zeros? This suggests that it is a transformation of some sort where zero is represented by another number. Groups without zero are not that common. It has evens though so it isn’t, I mean unlikely to be, a prime-related thing like that cycle under addition of integers less than 10 that are primes.

    Hmm.

    [James' Reply: Interesting wondering about zero. It turns out that 3 4 2 1 1 would equal 0.]

    Comment by Kerry — April 2, 2009 @ 8:17 pm

  12. Continuing my investigation on this puzzle:

    Yesterday afternoon, I read the comments and noticed that you mentioned this puzzle was derived from a dice game and hence I decided to use “dice” as a tool to solve the problem.

    After I thought about dice, I started noticing that LHS contains numbers from 1 to 6 that are in dice and then felt “Wow”, I might be really close in solving the problem.

    I came back home from work and opened a box of dice and started arranging them in a series and questioned what out of these dice series can make the RHS numbers?

    While I was doing that, I noticed something that I had not earlier:

    1 1 1 1 1 = 5 ( 5 times 1 is 5 ) or [ 5 x 1 = 5 ]
    2 2 2 2 2 = 1 ( 5 times 2 is 10 and 1+0 = 1 )
    3 3 3 3 3 = 6 ( 5 times 3 is 15 and 1+5 = 6 )
    4 4 4 4 4 = 2 ( 5 times 4 is 20 and 2+0 = 2 )
    5 5 5 5 5 = 7 ( 5 times 5 is 25 and 2+5 = 7 )
    6 6 6 6 6 = 3 ( 5 times 6 is 30 and 3+0 = 3 )

    Now, how do I apply this for other series? That’s a challenge but I have work on it.

    At this stage looking at the other series, I suspect that the moment a different number is there on the series, the rule of how to calculate the output changes and maybe the order of them matters. I also need to experiment more with my dice.

    I have a deliverable at work and need to travel in the evening. I shall revisit this later on Sunday ( after watching the Formula 1 race :P )

    Comment by Pradeep Soundararajan — April 2, 2009 @ 9:42 pm

  13. I run it through my neural network and let it work out the answer :-)

    Comment by Oliver — April 3, 2009 @ 2:59 am

  14. Oh I was way off and look forward to working backwards with the solution. I have to find a way to develop an affinity towards math problems. It seems like the only thing I did right with the problem was to send it along to others who would enjoy it. Ha! Thanks for the puzzle. Even if I did not get it right, I still learned something. Much appreciated.

    [James' Reply: Before I get too frustrated with a puzzle, I find people to share it with. I move into a facilitator perspective rather than a solver. Maybe someone else will possess the right kind of trivia or skill or tool to get the job done.]

    Comment by boo — April 3, 2009 @ 2:16 pm

  15. I’d been mulling over this one for a while, and gave it a go today. Here was my thoughts on it as I went:

    no way straight addition/subtraction due to last one. (2 + 1 + 1 + 1 + 1 = 8)

    last five:

    6 1 1 1 1 = 2 AND
    3 1 1 1 1 = 2

    5 1 1 1 1 = 8 AND
    2 1 1 1 1 = 8

    first number is off by 3, but generate same result.

    1 1 1 1 2 = 1
    1 1 1 1 3 = 6
    1 1 1 1 4 = 2
    1 1 1 1 5 = 7

    last position: even seems to be low, odd seems to be high. Differnece of 5 between even and odd.

    2 2 2 2 6 3
    2 2 2 2 5 7
    2 2 2 2 4 2
    2 2 2 2 3 6
    2 2 2 2 2 1

    Now off by 4: Even is low, odd is high again.

    Decided to sort by final number.

    final number:

    1 => 5, 2, 8 + 3
    2 => 6, 1 + 5
    3 => 6
    4 => 2, 7 + 5
    5 => 1, 7 + 6 ?
    6 => 3

    Sort by first number:

    no simple correlation.

    I think there’s a modulo in there.

    Wrote a quick perl script to help see effects of various formulas and sorting methods, and quickly change between them.

    I’m pretty sure a modulus factor of three is involved somewhere. There’s a very noticeable difference when the FIRST and the LAST values change. The middle three are probably related.

    Looking at those with the last number of two, and how they translate into their answers: always 2, 5, or 8.

    Tried modding by 3 at various places in the the equation, but didn’t seem to go anywhere.

    I took the perl script I had and modified it to generate various operators and then automatically try those values, to see if I could get close to any pattern that looked right. The best I could get was four to match. At this point I got frustrated, read the answer, then and read the comments here.

    Mod 9! OF COURSE! I was completely obsessed by the ‘off by 3′ that it hadn’t occurred to me that the modulus might be after ALL the processing.

    Comment by Robert P — April 3, 2009 @ 4:43 pm

  16. I’ve just solved with elementary math..not sure if it’s correct approach though but got answer.

    What I did is rearranging the hints and group them in sequence to figure out if there is pattern on the right side outcome;

    1 1 1 1 1 = 5 seq ended
    1 1 2 2 2 = 6
    1 2 3 4 5 = 1

    2 1 1 1 1 = 8
    2 2 2 2 2 = 1 seq ended

    3 1 1 1 1 = 2
    3 1 4 1 5 = ?
    3 3 3 3 3 = 6
    3 3 4 4 4 = 7

    4 1 1 1 1 = 5
    4 4 4 4 4 = 2

    5 1 1 1 1 = 8
    5 4 3 2 1 = 2
    5 5 5 5 5 = 7

    6 1 1 1 1 = 2
    6 6 6 6 6 = 3

    I could notice there is pattern in the outcome starting from ‘5′ and followed by ‘1-6-2-7-3′, and they are confirmed with the above two groups of sequences. I’ve assumed ‘8′ will be following ‘3′ since the hints started with outcome ‘5′, so the entire pattern I concluded is ‘5-1-6-2-7-3-8′, total 7 digits repeat.

    Therefore to tell the outcome of the questioned entry, I calculated;
    31415 – 11111 + 1 = 20305 / 7 remains 5, which means 5th digit of the pattern array, ‘7′, is the answer.

    I’m not able to make fancy mathematical models already approached many guys above but considering it is a puzzle not a quiz, this my approach would be fine enough for fun.

    [James' Reply: I don't quite follow your logic. Can you calculate the answer for any set of numbers? What about 9 9 9 9 9?]

    Comment by chimin — April 7, 2009 @ 8:41 am

  17. My co-worker Adam printed out this puzzle this morning and dropped it on my desk, probably knowing that I’d come in and not get any work done until I’d tackled it.

    I saw the request to describe how I worked on solving it, so I fired up an emacs and just started typing.

    I come from a discrete math background so the character of the solution suggested itself to me pretty quickly.

    ————–

    quick scan for patterns/whatever

    modular addition? no, because 12345 54321
    can’t be modular multiplication for same reason

    pick out 1111x
    11111=5
    11112=1
    11113=6
    11114=2
    11115=7

    that does look like some kind of modular thing

    interesting how some of the answers are 7 and 8 even though the numbers are all 1-6, that fits in with modular arithmetic

    what’s 1-6? dice?

    21111=8
    31111=2
    41111=5
    51111=8
    61111=2

    look at that, it’s adding 3 mod 9

    1111x looks like adding 5 mod 9

    22222=1
    22223=6
    22224=2
    22225=7
    22226=3

    there again, adding 5 mod 9

    so the last digit is something about adding 5 mod 9

    33333=6
    33444=7

    11111=5
    11222=6

    ok that’s consistent at least so (3rd digit) + (4th digit) + (5 mod 9) = 1 mod 9 ==> (3rd+4th) = 5 mod 9

    11111=5
    22222=1

    so (3 mod 9) + (2nd digit) + (5 mod 9) + (5 mod 9) = 5 mod 9
    so 2nd digit + 4 mod 9 = 5 mod 9
    so 2nd digit = 1 mod 9
    so to check, if 1 1 1 1 1 = 5 we have (3 mod 9) + (5 mod 9) + (3rd) + (4th) + (5 mod 9)
    and (3rd+4th) = 5 mod 9
    check: 3 + 5 + 5 + 5 = 18 = 0 mod 9 ….
    but 2 2 2 2 2 = 1 = (6 mod 9) + (10 mod 9) + (10 mod 9) + (10 mod 9) = 36 mod 9 = 0 mod 9 ….

    ten minutes so far

    1st digit = 3 mod 9
    2nd digit = 1 mod 9 (?)
    3rd+4th = 5 mod 9
    5th = 5 mod 9

    wait, that works 3 + 1 + 5 + 5 = 14 = 5 mod 9

    ok so 1 2 3 4 5 = 1 –> (3 mod 9) + (2 mod 9) + (3x mod 9) + (4y mod 9) + (25 mod 9) = 1
    –> (30 mod 9) + (3x mod 9) + (4y mod 9) = 1 –> (3 mod 9) + (3x mod 9) + (4y mod 9) = 1 and x+y=5 and x and y are integers

    3 3 4 4 4 = 9 3 20 20 = 52 mod 9 = 7

    so that works

    1 2 3 4 5 = 1 ==> 3 2 3x 4y 25 = 1 ==> 30 3x 4y = 1 ==> 3 3x 4y = 1 ==> 3x 4y = (7 mod 9)
    so 3x + 4y = (1-3 mod 9) = 7 mod 9 and x+y = 5 mod 9

    x=1 y=4? 3+16=19 = 1 mod 9
    x=2 y=3? 6+12=18 = 0 mod 9
    x=3 y=2? 9+8=17 = 8 mod 9
    x=4 y=1? 12+4=16 = 7 mod 9 we have a winner

    so I think it works like this

    1st digit = (3 mod 9) times the value
    2nd digit = (1 mod 9) times the value
    3rd digit = (4 mod 9) times the value
    4th digit = (1 mod 9) times the value
    5th digit = (5 mod 9) times the value

    check:

    1 2 3 4 5 = 3 2 12 4 25 = 46 = 1 mod 9
    5 4 3 2 1 = 15 4 12 2 5 = 38 = 2 mod 9

    3 1 4 1 5 = 9 1 16 1 25 = 52 = 7 mod 9

    so 3 1 4 1 5 = 7

    ok that took me a bit less than half an hour

    [James' Reply: That was fast. It looks like you went directly for the matrix math hypothesis. I tried a lot of other things before I got to that. Did you set it up in a spreadsheet and play with the values? Once I did that, it was pretty quick.]

    Comment by JMike — April 28, 2009 @ 9:07 am

  18. I actually ran into a math error after I’d figured out the first, second, and third digits, and I was tempted to throw the whole mess into MATLAB, but I don’t have easy access to MATLAB anymore so I just did it by hand.

    This problem was right down my alley, and I’m a pretty-darn-fast-but-kind-of-sloppy problem solver, so I’m actually a little sad about it taking half an hour.

    I kind of wish I could go back and honestly figure out what made me come up with the hypothesis that it was some kind of modular arithmetic thing — that’s the critical part right there and the rest is just pencil pushing, IMO.

    Comment by JMike — April 29, 2009 @ 9:09 am

  19. I printed this puzzle out yesterday and left on the desk of a few co-workers. I probably worked on in earnest for a couple of hours (although I was thinking about it on and off for most of the day), trying different things out until I finally “stumbled” upon the answer.

    Upon first glance, this screamed check-digit to me. After seeing the calculations for 11111, 22222, 33333, I realized that MOD9 was involved. In a previous job, I worked for a shipping/logistics company, so check-digit algorithms in tracking numbers are a familiar thing, and I started thinking that the straight MOD9 would have to be modified by a multiplier sequence.

    I rearranged the numbers and started looking at:

    11111 = 5
    11112 = 1
    11113 = 6
    11114 = 2
    11115 = 7

    So OK, the “answer” seems to be adding 5mod9. I then did a similar thing for the group:

    11111 = 5
    21111 = 8
    31111 = 2
    41111 = 5
    51111 = 8

    To realize that position one altered the result by 3mod9, all other things equal.

    From this point, I put the values in a spreadsheet and started playing around with different multipliers. I got frustrated and stepped away last night. This morning I was talking with a co-worker about the problem, and I had the idea of just using the “puzzle” as the multiplier string itself, and lo and behold, it worked!

    Along the way, I had noticed that c + d = 5 (as JMike did earlier). So I suppose I should/could have applied some substitution and arrived at the multiplier through the same method.

    In any case, great puzzle! Thanks for sharing.

    Comment by Adam — April 29, 2009 @ 9:56 am

  20. I hate puzzles. But I decided to try this one, and allow myself 3 minutes to either pass or fail it, then move on. It turns out I passed. But I’m not proud of the method I used, particularly, since it was entirely heuristic, involving zero math.

    Whenever the result, on the RHS, is 7, the sequence on the LHS ends with 5. Reasoning backwards, I figured the result here, if it happened to be 7, would be consistent with everything known about 7 in terms of LHS-terminal numbers being 5. So I chose 7.

    [James' Reply: Not proud? Well, if we were trying to escape from a burning building by solving these problems, you'd be alive, and I'd be nicely oxidized. You made a snap shot from the hip and took it down. Feel good about that.

    Don't hate puzzles. Puzzles give you a chance to reflect on your ways of thinking.]

    Comment by Kas Thomas — May 16, 2009 @ 6:04 am

  21. I suppose the answer is 7 and this is how I came to the conclusion:
    When you compare every number of the RH with the last digit on the LH you will see that the RH has the same last digit on the LH 3 times and a different last digit on the LH once.

    5 5 5 5 5 = 7
    3 3 4 4 4 = 7
    1 1 1 1 5 = 7
    3 1 4 1 5 = ? = 7

    Comment by Milin Patel — March 29, 2014 @ 4:02 am

RSS feed for comments on this post.

Leave a comment

  • Powered by WordPress