Posts

Showing posts with the label even

A Warden Killing The Boredom

A warden oversees an empty prison with 100 cells, all closed. Bored one day, he walks through the prison and opens every cell. Then he walks through it again and closes the even-numbered cells. On the third trip he stops at every third cell and closes the door if it’s open or opens it if it’s closed. And so on: On the nth trip he stops at every nth cell, closing an open door or opening a closed one. At the end of the 100th trip, which doors are open?

A Warden Killing The Boredom



Open Doors in an Empty Prison!


Read the story behind the title!

Let's take few cells into consideration as representatives.

The warden visits cell no. 5 twice - 1st & 5th trip.1 & 5 are only divisors of 5.

He visits cell no. 10, on 1st, 2nd, 5th, 10th trips i.e. 4 times. Here, divisors of 10 are 1,2,5,10.

He stops cell no. 31 only twice i.e. on 1st and 31st trip.

He visits cell no.25 on 1st, 5th, 25th trips that is thrice.

In short, number of divisors that cell number has, decides the number of visits by warden.

For example, above, cell no.5 has 2 divisors hence warden visits it 2 times while 10 has 4 divisors which is why warden visits it 4 times.

But when cell number is perfect square like 16 (1,2,4,8,16) or 25 (1,5,25) he visits respective cells odd number of times. Otherwise for all other integers like 10 (1,2,5,10) or like 18 (1,2,3,6,9,18)  or like 27 (1,3,9,27) he visits even number of time.

For prime numbers, like 1,3,5,....31,...97 he visits only twice as each of them have only 2 divisors. Again, number of visits is even.

Obviously, the doors of cells to which he visits even number of times will remain closed while those cells to which he visits odd number of time will remain open.

So the cells having numbers that are perfect square would have doors open. That means cells 1, 4, 9, 16, 25, 36, 49, 64, 81, and 100 would be having their doors open.

Open Doors in an Empty Prison!

Crack The 10-Digits Password

In an attempt to further protect his secret chicken recipe, Colonel Sanders has locked it away in a safe with a 10-digit password.  Unable to resist his crispy fried chicken, you'd like to crack the code. 

Try your luck using the following information:

All digits from 0 to 9 are used exactly once.

No digit is the same as the position which it occupies in the sequence.

The sum of the 5th and 10th digits is a square number other than 9.

The sum of the 9th and 10th digits is a cube.

The 2nd digit is an even number.

Zero is in the 3rd position.


The sum of the 4th, 6th and 8th digits is a single digit number.

The sum of the 2nd and 5th digits is a triangle number.

Number 8 is 2 spaces away from the number 9 (one in between).

The number 3 is next to the 9 but not the zero.


Click here to know how to CRACK it! 


Crack The 10-Digit Password

Cracking The 10-Digits Password


What was the challenge? 

Let's suppose the 10-digits password is ABCDEFGHIJ.

---------------------------------

Take a look at the given clues to crack down the password.

1. All digits from 0 to 9 are used exactly once.

2. No digit is the same as the position which it occupies in the sequence.


3. The sum of the 5th and 10th digits is a square number other than 9.
 

4. The sum of the 9th and 10th digits is a cube.
 

5. The 2nd digit is an even number.
 

6. Zero is in the 3rd position.
 

7. The sum of the 4th, 6th and 8th digits is a single digit number.
 

8. The sum of the 2nd and 5th digits is a triangle number.
 

9. Number 8 is 2 spaces away from the number 9 (one in between).
 

10. The number 3 is next to the 9 but not the zero. 

--------------------------------------

STEPS : 

Respective Clues are in ().

1] Since, every digit is used only once (1), the sum of 2 digits can't exceed 
9 + 8 = 17 and minimum sum of 2 digits can be only 0 + 1 = 1.

2] So, the sum of 5th & 10th digits which is square (3) can be - 1, 4, 16.
The sum of 9th & 10th digits which is cube (4) can be - 1, 8.
The sum of 2nd & 5th digits which is triangle number (8) can be - 1, 3, 6, 10, 15.

3] As per (6), 0 is already at third position i.e. C = 0. Hence, 2nd, 5th, 9th or 10th digits can't be 0. Therefore, the sum of 5th & 10th or 9th & 10th or 2nd & 5th can't be 1. Revising list of possible values of those in step 2.

The sum of 5th & 10th digits which is square (3) can be -  4, 16.
The sum of 9th & 10th digits which is cube (4) can be -  8.
The sum of 2nd & 5th digits which is triangle number (8) can be 3, 6, 10, 15.

4] Possible pairs of 9th & 10th digits - (1,7), (7,1), (2,6), (6,2), (3,5), (5,3)

If IJ = 71, then 5th digit E must be 4 - 1 = 3 & possible values of 2nd digit B are 0,3,7.
But as per (5), B must be even & C = 0 already.

IJ = 26 or 62 or 35 doesn't leave any valid value for 5th digit E.

If IJ = 53, then 5th digit E must be 1 & possible values of 2nd digit B are 2,5,9
That is B = 2 (5). But as per (2), no digit is the same as the position which it occupies in the sequence. So, the number 2 can't be at 2nd position where B is there.

Hence, IJ must be 17 i.e. I = 1, J = 7.

5] This leaves only 9 as valid value for 5th digit E so that (3) is true. 

So, E = 9 and hence B = 6 with sum of 2nd digit B and 5th digit E as 15.

6] So far, we have, B = 6, C = 0, E = 9, I = 1 and J = 7. 

As per (10), the number 3 is next to the 9 but not the zero. Hence, the 6th digit F must be 3. F = 3.

7] As per (9), the 8 is 2 spaces away from 9 i.e. here 5th digit E=9. With 3rd position already occupied by C = 0, the digit 8 must be at 7th position. 
So, G = 8. 

8] As per (7), D + F + H must be single digit. We have, F = 3 already, 
so possible values of D + H are 0, 1, 2, 3, 4, 5, 6.

D + H can't be 0 (0+0), 1 (1+0), 2(1+1/2+0), 3(1+2/3+0), 4(2+2/3+1/4+0), 5(2+3/4+1/5+0) since digits are repeated with C=0, I=1, F=3 already.

Hence, D + H = 6. 

9] Now, D = 5 and H = 1 is not possible. Also, D/H can't be 0 or 6. Both D and H can't be 3 at the same time. D can't be 4 as D is at 4th position. 

Hence, D = 2, H = 4.

10] With B = 6, C = 0, D = 2, E = 9, F = 3, G = 8, H = 4, I = 1, J = 7, the only digit left for the first position A is 5. So A = 5.

CONCLUSION : 

A = 5, B = 6, C = 0, D = 2, E = 9, F = 3, G = 8, H = 4, I = 1, J = 7.

So, the 10-digits password ABCDEFGHIJ is 5602938417.

Cracking The 10-Digits Password
 



The Second Case of Mystery Number

There is a ten-digit mystery number (no leading 0), represented by ABCDEFGHIJ, where each numeral, 0 through 9, is used once. Given the following clues, what is the number?

1) Either A = B / 3 or A = G + 3.


2) Either B = I - 4 or B = E + 4.


3) Either C = J + 2 or C = F * 3.


4) Either D = G * 4 or D = E / 3.


5) Either E = J - 1 or E = D / 4.


6) Either F = B * 2 or F = A - 4.


7) Either G = F + 1 or G = I - 3.


8) Either H = A / 2 or H = C * 3.


9) Either I = H + 3 or I = D / 2.


10) Either J = H - 2 or J = C * 2.


The Second Case of Mystery Number


HERE is that MYSTERY Number! 

What was the FIRST case? 

Demystifying The Second Mystery Number


What was the challenge?

Let's take a look at clues given once again to identify number ABCDEFGHIJ.

------------------------------------------------------------------------------ 


1) Either A = B / 3 or A = G + 3.

2) Either B = I - 4 or B = E + 4.


3) Either C = J + 2 or C = F * 3.


4) Either D = G * 4 or D = E / 3.


5) Either E = J - 1 or E = D / 4.


6) Either F = B * 2 or F = A - 4.


7) Either G = F + 1 or G = I - 3.


8) Either H = A / 2 or H = C * 3.


9) Either I = H + 3 or I = D / 2.


10) Either J = H - 2 or J = C * 2.


------------------------------------------------------------------------------  

STEPS :  

------------------------------------------------------------------------------ 

STEP 1 : 

Few digits can be eliminated for few numbers straightaway on the first go. Those digits just don't 'fit' into the both equations provided for the particular letter.

1) Either A = B / 3 or A = G + 3.

    A - 0.

3) Either C = J + 2 or C = F * 3.

    C - 0, 1.

4) Either D = G * 4 or D = E / 3.


    D - 0, 5, 6, 7, 9

5) Either E = J - 1 or E = D / 4.


    E - 9 

6) Either F = B * 2 or F = A - 4.


    F - 7, 9

7) Either G = F + 1 or G = I - 3.


    G - 8 (since F can't be 7 & I can't be 11) 

8) Either H = A / 2 or H = C * 3.


    H - 0, 5, 7, 8 

9) Either I = H + 3 or I = D / 2.


    I - 8 (since H can't be 5 and obviously D can't be 16).

10) Either J = H - 2 or J = C * 2.


    J - 3 (since H can't be 5 & C can't be 1.5), 5 (since H can't be 7 & C can't 
    be  2.5), 9.

------------------------------------------------------------------------------  

STEP 2 :

Now, after eliminating some digits for letters we can revise the list of digits a particular letter(s) on LHS of equation can't make because the letter(s) on RHS doesn't (don't) take some digits.

For example, if J can't be 3 or 5 then C = J + 2 can't be 5 or 7. The deduction is supported by the other equation as F can't be 5/3 or 7/3. Hence, C can't be 5 or 7 for sure.

3) Either C = J + 2 or C = F * 3.

    C - 0, 1, 5, 7

4) Either D = G * 4 or D = E / 3.

    D - 0, 5, 6, 7, 9, 3 ( since E can't be 9 & G can't be 9/4).

5) Either E = J - 1 or E = D / 4.

    E - 9, 4 (J can't be 5 & D can't be 16), 8 (J can't be 9 & D can't be 32).

7) Either G = F + 1 or G = I - 3.

    G - 8, 0 [since G can't be -1 and I can't be 3 (since if I = 3 then I = H +3 
     gives H = 0 but H doesn't take 0)].

------------------------------------------------------------------------------   

STEP 3 : 

For B,

2) Either B = I - 4 or B = E + 4.

    B - 8 (since I can't be 12 & E can't be 4) 

------------------------------------------------------------------------------  

STEP 4 : 

Possible values left for D are -  1, 2, 4, 8. Remember, only one of the two given hints for the particular letter has to be true.
   
   ------------------------------------------------------------------------------

      STEP 4.1 : 

       If D = 1, then D = E/3 (Hint 4) gives E = 3 & hence E = J - 1 (Hint 5) 
      gives J = 4. 

      Here, D = G*4 of Hint 4 must not be true as G would be 1/4.

      Similarly, E = D/4 of Hint 5 must be false and hence other hint i.e. 
      E = J - 1 must be true.

      Following the same logic as above -

      If D = 1 ---> E = 3 ----> E = J - 1 ---> J = 4 ----> 
      ---> J = H - 2 or J = C * 2.

      Hence, H = 6 or C = 2.

      If H = 6, then out of H = A / 2 or H = C * 3 only H = C*3 remains 
      valid which gives C = 2.

      And if C = 2, then C = J + 2 (Hint 3) gives J = 0.

      So, D = 1 produces 2 different values of J as 0 and 4. 

      Hence, this value of D is invalid. 

      ------------------------------------------------------------------------------  

     STEP 4.2 : 

     If D = 2, then (using Hint 4) E = 6 --> (Hint 5)---> J = 7  --->(Hint 10)

     ---> H = 9 ---> makes I = H + 3 invalid hence I = D/2 gives I = 1 

      I = 1 ---> leaves G = F + 1 (of Hint 7) valid.

     Further, H = 9 ---> (Hint 8) ---> C = 3 ---> (Hint 3) ---> 

      ---> F = 1 (since C = J + 2 = 9 invalid as H = 9 already) ---> (Hint 7)

      ---> G = 2.

     So if D = 2, the value of G will be also 2. That's against the rule.

      ------------------------------------------------------------------------------ 

     STEP 4.3 :

     If D = 4, then (using Hint 4) G = 1 ----> (Hint 7) ---> 
     ---> F = 0 or I = 4 (invalid as D = 4 already) ---> (Hint 6) ---> A = 4. 

     Again, if D = 4, then A = 4 also hence this value of D is invalid.

     Hence, the only valid value of D is 8.

------------------------------------------------------------------------------  

STEP 5 : 

If D = 8, then using Hint 4 we have, G = 2  --->(Hint 7) ---> F = 1 or I =5

If I = 5, --->(Hint 9) ----> H = 2 but already we have G = 2. So,

G = 2  --->(Hint 7) ---> F = 1 ---> (Hint 6) ---> A = 5.

So far, we get,  D = 8, G = 2, F = 1, A = 5 at this stage so far.

------------------------------------------------------------------------------  

STEP 6 : 

Possible values left for E are - 0, 3, 6 and 7.
 
E = 0 ---> (Hint 5 ) ---> J = 1. But 1 is already taken by F.

E = 3 ---> (Hint 5 ) ---> J = 4 ---> (Hint 10) ---> H = 6 or invalid C = 2

H = 6 ---> (Hint 8 ) ---> invalid C = 2.

The digit 2 is already taken by G, so C = 2 is invalid. Hence, E = 3 is invalid.

E = 7 ---> (Hint 5 ) ---> J = 8. But 8 is already taken by G.

So, the only valid value of E = 6.

------------------------------------------------------------------------------  

STEP 7 :

E = 6 ---> (Hint 5 ) ---> J = 7 ---> (Hint 10) ---> H = 9 ---> (Hint 5) --->

H = 9 ---> (Hint 8) ---> C = 3

------------------------------------------------------------------------------  

STEP 8 :

The values we got so far,  E = 6, J = 7, H = 9, C = 3, D = 8, G = 2, F = 1, 
A = 5.

Only letters left are B and I while digits left are 0 and 4.

Correct hint out of "Either B = I - 4 or B = E + 4" must be B = I - 4 since 
B = E + 4 = 6 + 4 = 10 must be invalid.

So, B = I - 4 gives us I = 4 and B = 0 .

------------------------------------------------------------------------------  

Conclusion :

A = 5, B = 0, C = 3, D = 8, E = 6, F = 1, G = 2, H = 9, I = 4, J = 7 

all together gives us number

ABCDEFGHIJ as 5038612947.

Demystifying The Second Mystery Number


Let's verify the above number as per given hints.

1) A = G + 3 = 2 + 3 = 5.
2) B = I - 4 = 4 - 4 = 0.
3) C = F * 3 = 1 * 3 = 3.
4) D = G * 4 = 2 * 4 = 8.
5) E = J - 1 = 7 - 1 = 6.
6) F = A - 4 = 5 - 4 = 1.
7) G = F + 1 = 1 + 1 = 2.
8) H = C * 3 = 3 * 3 = 9.
9) I = D / 2 = 8 / 2 = 4.
10) J = H - 2 = 9 - 2 = 7.

 
 
Follow me on Blogarama