Teaser 3045

Stephen Hogg

Published Sunday January 31 2021

Let Tel Play BEDMAS Hold ‘Em!

Awaiting guests on poker night, Tel placed (using only clubs, face-up, in order left-to-right) the Ace (=1) to 9 (representing numerals), then interspersed the Ten, Jack, Queen and King (representing -, +, x and ÷ respectively) in some order, but none together, among these.

This “arithmetic expression” included a value over 1000 and more even than odd numbers. Applying BEDMAS rules, as follows, gave a whole-number answer. “No Brackets or powErs, so traverse the expression, left-to-right, doing each Division or Multiplication, as encountered, then, again left-to-right, doing each Addition or Subtraction, as encountered.”

Tel’s auntie switched the King and Queen. A higher whole-number answer arose. Tel displayed the higher answer as a five-card “flush” in spades (the Jack for + followed by four numeral cards).

Give each answer.

26 Replies to “Teaser 3045”

  1. I wrote down the digits from 1 to 9 on a piece of paper, and thought about the constraints placed on the possible numbers. I looked at the digits again and a possible way to proceed jumped off the page. Checking it gave a valid answer. In all of the years that I have been solving teasers and similar puzzles, I do not recall anything like this.
    It turns out that the solution space is very small, and that the solution is unique.

  2. The last sentence troubles me.

    The numeral cards available are 2,3,….9,10. The ace is not a numeral card in my opinion (there is no number on it !) even though it could count for 1 or 9.

    Four numeral cards are displayed by Tel in his flush. So the result could be a 4-digit number with minimum value +2345 or a 5-digit number with minimum value +10234.

    With this constraint I could not find an answer.

    In the case that Stephen Hogg regards the ace as a numeral card I think he should have said so.

    1. PS

      on the other hand, if the number to be found were, say, +1234 then Tel’s flush would be displayed as JA234. 10 could not be used in the display as it stands for “-” in this teaser.

      So my trouble seems to be irrelevant.

    2. Hi Peter,

      It does specify in the text that the Ace is equal to 1 – “… Ace (=1) to 9 (representing numerals), …”.

  3. I’m also worried about the words. It says that on the first pass, we are to ‘traverse’ the expression, left to right, doing each division or multiplication as encountered. So if the first digits were 1 2 3 4 5 6 (ignoring any + or -), I would expect to see, in order, 1, then 12, then 123, then 1234 and so on. So if the divide came after 123456, it would have to be 8 to give an integer result. Is that how others understand it? Then if there’s a following multiply, it has to go after the 7th or 8th digit, as these terms are ‘interspersed’. That means we finish up with a very long number – do we start with that number when carrying out the 2nd traverse, or does that start 1, 12, 123 etc as before? I don’t know what puzzle I’m supposed to be solving . . .

    1. Hi Robert,

      I believe the intention is that your should start with the sequence 123456789 and then insert the four operators (in some order) between the digits at four positions (no operators next to each other). One of the several numbers formed by doing this is greater than one thousand. After forming this sequence you then evaluate it using the normal rules of operator precedence.

      1. But I’m still puzzled. I thought the evaluation was done with two separate L-R traverses. The second one ignores the x and ÷ operators, so can only change the final output by some integer. This implies that the first traverse (which ignores the + and – operators) must have an integer output. And this must surely remain true when you interchange the x and ÷ operators (the Aunt’s input). I must be missing something here!

        1. Yes, your logic is faultless. But why does this prevent you from reaching a solution? Swapping the * and the / operators will change the result to a different (larger) integer.

      2. The ‘BEDMAS rule’ confused me too. Apparently implying no difference to the conventional way to calculate arithmetic expressions – why mention it at all?

        1. Having struggled with this one, then undsertood what the rest of you have been doing, I don’t think the words explain what is going on at all well. Having inserted the 4 operators into the original string of 9 digits, you carry out the first traverse L-R, and if you find a multiply or divide, you carry it out. But you then replace the digits that are being operated on by the result of that operation – e.g. 56 x 7 ÷ 8 is replaced by 49. Where does it tell you to do that? (If you swap the x and ÷, this becomes 64 which is a rational increase).

          Having done that, you have a set of three numbers separated by + & – symbols, which is easily evaluated by the 2nd traverse.

          Because of time wasted trying to find a solution that follows the actual wording, I’m rating this as very poor teaser.

          1. Hi Robert,

            like you I was puzzled by the two runs (first with x & / , second with + -). But I ignored it and used all four operations in one go, with 6 options for the position the 4-digit section. I solved it after having realised how wrong I was with my worry about Ace = 1 (confirmed by Brian’ s comment for me).

            I think Stephen Hogg should have omitted the two steps approach, leaving only “left-to-right”, corresponding to Brian’s posting on 30.1. 1.46 pm. Then the teaser would have been very nice in my opinion.

  4. I ended up with one candidate-pair in addition to one revealed in the protected answer. It stems from 12 ÷ 3 x 4 ± 5678 –/+ 9. I suppose it somehow does not apply with the ‘flush in spade’ constraint which I did not quite understand.

    1. Indeed, the higher answer of 5685 does not comply as there can be no duplicate cards in a flush (there is only one 5 of spades).

  5. A nice little teaser. 25 sequences of Ns and Fs where N is a numeral and F is a function (operator ÷×±). 6 don’t have more odd than even numbers so are ok. Looking at where the ÷ might go in these reveals where the × can go relative to this and determines just 2 sequences where we can place the ÷ and × and swap them. Putting the +- either way round gives 4 pairs of answers. The J+ eliminates one of these. I don’t really know what a flush is though I expected I wouldn’t need to. But it was clear that two of the answers could not have the higher number displayed using just spades (assuming from one pack of cards). Leaving one answer.

  6. also 1 + 2 *3456 / 78 – 9 is 1 + 6912 / 79 – 9 is 1 + 87.7 – 9
    there is no other way of calculating it without brackets

    would be nice to have the setters input on here in a few days

    1. 1234 + (56*7/8) – 9 is 1234 + 49 – 9 (first traverse) is 1274 (2nd traverse).
      Swap * and / to give 1234 + 64 – 9 = 1289.

      But brackets aren’t allowed, so this cannot be the solution. All very silly . . .

      1. Hi Robert,

        I must admit that I am having some difficulty in understanding why you have had so much difficulty in understanding this teaser.

        While I agree that the wording was somewhat confusing because the author felt the need to spell out the normal rules for evaluating arithmetic expressions, he did actually say it was an arithmetic expression, which is surely a clue to how he intended it to be used?

        And the two evaluations that give the solution can both be evaluated on a standard algebraic scientific calculator without using brackets, as in: 1274, 1289

  7. I’m simply reading the words Brian. Your scientific calculator example does an addition first, but we’re specifically told that on the first L-R traverse we only carry out divide or multiply. How can you justify starting off with 1234 + 56?

    Anyway, my most recent post was a reaction to Robert Farey’s comment, where he suggests another way of eliminating brackets, which also gives a different answer. I’m sorry, but the text for this teaser needs clarifying. I’m not the only one who was originally confused. I now understand what you believe is the correct interpretation, but it’s not how several of us read it initially. I’m wasting no more time on it.

    1. It does NOT do the addition first. It is a modern scientific calculator, which means that it knows all the rules of operator precedence and hence does the multiplications and divisions before doing the additions and subtractions.

      And because it knows the rules it does not require brackets — you can see from the results that it has done the evaluations correctly. This is the normal way that modern (algebraic) scientific calculators work (I say ‘algebraic’ because a few use RPN – Reverse Polish Notation).

      I don’t deny that the wording could be improved but the use of the term ‘arithmetic expression’ was sufficient,, in my view, to indicate how the expression should be treated. I too, had to read the teaser twice because, having seen this term, I could not see why the rules were then spelt out. I now see that this was necessary since it would appear that these rules are not as widely understood as I thought.

      But it seems that spelling them out only confused those who already knew them without helping those who didn’t!

  8. I don’t see the problem here, although others have, and others haven’t.
    .
    We are asked to arrange 5 groups of numbers, of which one is >1000, from (consecutive) 123456789, separated by arithmetic operators
    The majority has to be even.
    So that’s 1234$56$7$8$9 (where $ is an operator + – * /)
    Or 1234$5$6$78$9
    (12345$6$7$8$9 doesn’t fit the “majority even” rule)
    These have to transform into a 4-digit number, all digits different and 1 to 9 (the “flush”)
    It’s obvious that 56*7/8 and 56/7*8 produces integers.
    Testing 1234$56*7/8$9 and 1234$56/7*8$9, and swapping the other two $ for + or – gives:
    (1274, 1289), (1179, 1194) and we can discount the latter pair (double-digits)
    So I make the answers:
    1234+56*7/8-9 = 1274
    1234+56/7*8-9 = 1289
    (A more complete examination produces eight values, but not all are (*,/) swaps, so the answer is unique).

    PS. Just for fun, I checked whether Excel operates BEDMAS, and it turns out it does!
    1234+56*7/8-9 gives the same answer as 1234+(56*7/8)-9

    1. Seems to be a problem, Brian. The character {star = multiply)* doesn’t render. So I’ll use x
      It’s obvious that 567/8 and 56/78 produces integers.
      1234+56×7/8-9 = 1274
      1234+56/7×8-9 = 1289

      1234+56×7/8-9 gives the same answer as 1234+(56×7/8)-9

      1. Yes, comments here make use of ‘markdown’ where a few symbols such as * are used for emphasis, italics, etc. See the menu item for ‘Comments’ for more details (under ‘Site Objective’). To obtain a * put a backslash in front of it. I have fixed up your original and I will delete your subsequent posts and this one shortly.

Leave a comment

Design a site like this with WordPress.com
Get started