Monday, December 16, 2019

mathematics - Four dice puzzle: 2,2,4,5


Damiano has thrown four dice and the numbers 2, 2, 4, 5 showed up on top.
Damiano asks himself:



What is the smallest positive integer that cannot be generated with these four numbers according to the following rules?




  • One may use the four numbers 2, 2, 4, 5, and it is fine if not all of them are used.

  • Concatenation of digits is NOT allowed.

  • The only allowed operations are additions, subtraction, multiplication, and division ($+,-,*,/$).


  • One may use any number of brackets.


Examples: $~~~~1=5-4$; $~~~~2=4-2$; $~~~~3=4-(2/2)$; $~~~~4=(4+2)-2$; $~~~~$etc.



Answer



The answer is:



23.



Joel Rondeau’s answer gives ways of getting anything up to this, except for 17; but 17 = ((4+2)*2)+5.


If I am not mistaken, the full range of positive integer values achievable is




[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,24,25,26,28,30,32,36,38,40,42,44,48,50,56,60,80]



(found using a small Haskell script).



1 = ((2-4)*2)+5
2 = ((2/2)-4)+5
3 = ((4-5)+2)+2
4 = ((5-4)*2)+2
5 = ((2-4)+2)+5

6 = ((2/4)*2)+5
7 = ((4+2)*2)-5
8 = ((5*2)-4)+2
9 = ((2-2)+4)+5
10 = ((2/2)+4)+5
11 = ((4*2)-2)+5
12 = ((4-2)*5)+2
13 = ((2+2)+4)+5
14 = ((5-2)*4)+2
15 = ((4*2)+2)+5

16 = ((5*2)+4)+2
17 = ((4+2)*2)+5
18 = ((5+2)*2)+4
19 = (5*4)-(2/2)
20 = ((5+4)*2)+2
21 = ((2+2)*4)+5
22 = ((5+4)+2)*2
24 = ((5*4)+2)+2
25 = ((2/2)+4)*5
26 = ((4*2)+5)*2

28 = ((5*2)+4)*2
30 = ((5+2)*4)+2
32 = ((4+2)*5)+2
36 = ((5+2)+2)*4
38 = ((5*4)*2)-2
40 = ((2+2)+4)*5
42 = ((5*4)*2)+2
44 = ((5*4)+2)*2
48 = ((5*2)+2)*4
50 = ((4*2)+2)*5

56 = ((5+2)*4)*2
60 = ((4+2)*2)*5
80 = ((2+2)*4)*5



No comments:

Post a Comment

classical mechanics - Moment of a force about a given axis (Torque) - Scalar or vectorial?

I am studying Statics and saw that: The moment of a force about a given axis (or Torque) is defined by the equation: $M_X = (\vec r \times \...