Tuesday, July 25, 2017

mathematics - How many Strobogrammatic numbers are there from 0 to 99999


0,1,2,5,8,11,69,96 are Strobogrammatic numbers.



We call a Strobogrammatic numbers if:



When it is typed on a calculator, and the calculator is spun 180 degrees, the number visually looks the same.



How many Strobogrammatic numbers are there from 0 to 99999?


This is a no-computer puzzle; only the first right answer with explanation will be accepted.



Answer



assumption: we can not usually have leading zeroes on a calculator, they are usually stripped.



the spinnable digits are 0, 1, 2, 5, (6/9), and 8

For 1 digit

Pos 1: we can have any of the five non-paired options (0 is not stripped in this one instance, as 0 is displayed on the calculator)

Total: 5

For 2 digits:

Pos 1: we can have any of the six non-zero spinnable digits

Pos 2: we can only have the inverse digit of pos 1

Total 6x1 = 6

For 3 digits:

Pos 1: we can have any of the six non-zero spinnable digits
Pos 2: we can have any of the five self-referential spinnable digits
Pos 3: we can only have the inverse digit of pos 1

Total 6x5x1 = 30

For 4 digits:

Pos 1: we can have any of the six non-zero spinnable digits
Pos 2: we can have any of the seven spinnable digits
Pos 3: we can only have the inverse digit of pos 2
Pos 4: we can only have the inverse digit of pos 1

Total: 6x7x1x1 = 42

For 5 digits

Pos 1: we can have any of the six non-zero spinnable digits
Pos 2: we can have any of the seven spinnable digits
Pos 3: we can have any of the five self-referential spinnable digits
Pos 4: we can only have the inverse digit of pos 2
Pos 5: we can only have the inverse digit of pos 1

Total: 6x7x5x1x1 = 210

Thus all spinnable numbers from 0 to 99999 is the sum:
5+6+30+42+210 = 293



So:



There are 293 spinnable numbers between 0 and 99999



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 \...