POW – Sequential Triad 24

Many people are familiar with the math game 24, but not many know about the sequential triad version. You must make each of the following sequences true by only inserting operators and without changing the order of the numbers:

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

You can use any of the following operators on the left-hand side of the equation, but the right-hand side of the equation must remain untouched:

  • Addition: +
  • Subtraction (and negation): +
  • Multiplication: ×
  • Division: /
  • Exponential: ^
  • Modulo: &
  • Absolute Value: abs(X)
  • Ceiling (round up): ceil(X)
  • Floor (round down): floor(X)
  • Square root: sqrt(X)
  • Factorial: X!
  • Parentheses: ( and )

Feel free to post your answers below or you can wait until the answers are posted next week. 😎

POW – JavaScript Self Inequality

Assuming a normal JavaScript engine, what could you possibly pass into the following mystery() function that would not thrown an error?

function mystery(a) {
  if (a === a) {
    throw new Error('The first argument has self equality.');
  }
}

As is normal, this answer will be shown a week from when it was posted and will be linked to from here.The answer to this POW can now be found here.

POW Answer – Multiple Choice Question?

If you remember the problem, the key is the fact that the problem never said to choose one of the answers from the multiple choice list. Also, the question never said that that question was the one that applied to the multiple choice questions. Having those two facts in mind, you now have to do the math and figure out what the odds actually are that you at least got the question “right in some way“. Since that phrase is used, “right in some way“, we can assume that more than one of the options are the answer. Knowing this, what are all of the possible answer permutations?

  1. a
  2. b
  3. c
  4. d
  5. e
  6. ab
  7. ac
  8. ad
  9. ae
  10. bc
  11. bd
  12. be
  13. cd
  14. ce
  15. de
  16. abc
  17. abd
  18. abe
  19. acd
  20. ace
  21. ade
  22. bcd
  23. bce
  24. bde
  25. cde
  26. abcd
  27. abce
  28. abde
  29. acde
  30. bcde
  31. abcde

As shown above, we have 31 different answers that could be right. Since we have been limited to picking one letter at random, to determine the odds that your answer at least partially matches one of the answers listed above, you will have to multiply 31 by 5. That comes to 155 total possible scenarios. Now the final part of the problem is to determine how many of those times the random answer that is chosen would actually be correct. Since we can only pick one letter at random and it has to be one of the ones listed above, the number of characters that appear above is the same as the total amount of times that you will be correct. There are 80 letters shown above. In conclusion, the chance that you will at least be partially correct is 80 out of 155 or about 52%.

I know that many people probably disagree with me on this one, but in the end, since I wrote the problem, I am not sure I can be wrong on this one. 😉 Still, thanks for the feedback in advanced.