Jump to content
BrainDen.com - Brain Teasers

witzar

Members
  • Posts

    237
  • Joined

  • Last visited

  • Days Won

    7

Posts posted by witzar

  1. Let F(n) be the number of different ways staircase of n steps can be climbed.

    You can start either with 2 steps (and n-2 remaining) or with 1 step (and n-1 remaining),

    which leads to a recurrence relation:

    F(n) = F(n-1) + F(n-2)

    Obviously

    F(0) = 1, F(1),

    and

    F(n+2) = F(n) + F(n+1)

    so you are looking for 10th Fibonacci number, which is 89.

    • Upvote 3
  2. Operation of cutting one piece into 10 pieces increases number of pieces by 9 thus preserving number of pieces modulo 9. A finite number of such operations will preserve it too. But 10 and 1984 are not equal modulo 9.

  3. You need one of the 3 following outcomes in consecutive games:

    wwl, www, lww

    where w=win and l=loss.

    So playing in order ABA your probability of success is:

    ab(1-a) + aba + (1-a)ba = ab(2-a)

    where a and b are probabilities of winning in single game against A and B respectively.

    Obviously your probability of success for order BAB is

    ba(2-b)

    Therefore ABA is better, since a<b.

  4. Let's name colors we use: a, b, c, d, e, f.

    We can always rotate painted cube so that face a is at bottom. There are 2 cases:

    1) Face b is at top.

    Now we can rotate cube to have face c in front. Remaining three faces are painted with d, e, f, and each out of 3! cases is possible

    2) Face b is not at top.

    Now we can rotate the cube to have face b in front. Remaining four faces are painted with c, d, e, f and each out of 4! cases is possible.

    So the answer is 3! + 4! = 6 + 24 = 30.

  5. Obviously, exactly one of the five statements is true (since at least one must be true and no two can be true at the same time).

    The remaining four must be lies, so exactly four students are lying.

    The lying students are those responsible for cupcakes disappearance.

  6. Switching of left and right (but not up and down) by the mirror is an illusion.

    The source of this illusion lies in vertical symmetry of human body.

    Imagine a creature with no such symmetry looking at its own reflection in the mirror.

    Will this creature experience this illusion?

  7. I'm a bit confused because I don't know what you mean by symmetries. Would you mind defining symmetries?

    I should have used term "reflection" instead of "symmetry". Sorry for that.

    For me cases are equivalent when there is an isometry of a cube that transforms one case into another.

    For you cases are equivalent when there is an orientation preserving (or rotational, which is the same) isometry of a cube that transforms one case into another.

  8. Sure

    Thanks. Now I see why I get 20 and you get 22.

    You treat two cases as equivalent if there exists rotation that transforms one case into another.

    And I allow symmetries as well.

    For example (1,6) and (1,8) are equivalent for me but not equivalent for you.

  9. Way to go, Molly! I agree. 18 cases for the cube.

    There are 4 edge-edge cases:

    1) parallel sharing face

    2) parallel not sharing face

    3) sharing edge

    4) not parallel and not sharing edge

    I think you missed it.

  10. #1 The best algorithm is to divide b by a and check if reminder is zero or not. ;)

    #2 If division and multiplication is not allowed, then keep subtracting a from b while b<=a and check if the end value of b is 0.

    #3 If only division by 2 is allowed, then method #2 can be improved by dividing both a and b by 2 in a loop while both a and b are even (prior to applying #2). If the above reduction terminates with even a and odd b, then there is an immediate answer "NO". If the above reduction terminates with odd a and even b, then keep dividing b by 2 until it is odd. Only with both a and b odd proceed to #2. Ah, and do not forget to check for special cases (a=0, a=1, a=2) to begin with. ;)

  11. It is not possible. Think about 5x4 grid as a chessboard with 10 black squares and 10 white squares. Now try to paint with black and white tiles A-E. Each tile except D will have 2 white squares and 2 black squares, no matter how you paint it. But tile D will have 3 black and 1 white or 3 white and 1 black. Therefore it is not possible to cover with tiles A-E an area with the same number of white and black squares.

  12. Let a be the first number of the sequence, and let n be the number of numbers of the sequence. We have:

    (a+(a+n-1))*n/2 = 10^6

    or

    (*) (2a+n-1)*n = 2^7*5^6

    The above equation implies that

    (**) n = 2^k*5^l (where k=0,1,...,7 and l=0,1,...6)

    We can also observe in (*), that if n is even, then (2a+n-1) is odd and 2^7|n.

    So either n is odd or n is a multiplicity of 128.

    We can easily check (assuming a=1), that n<1414, so by (**) we know that either

    n \in { 5^0, 5^1, 5^2, 5^3, 5^4 }

    (when n is odd; higher powers of 5 produce n>=1414) either

    n \in { 2^7, 2^7*5}

    (when n is even; 2^7*5^l>=1414 for l>1)

    Now we can transform (*) into

    a = 10^6/n - (n-1)/2

    and find a for every possible value of n.

    It turns out that all 7 values of n produce a valid sequence.

  13. Let's give the prisoners numbers from 1 to 20.

    Let w be a number of white hats, and let w(i) be the number of white hats seen by prisoner number i (for i=1, 2, ..., 20).

    The strategy for prisoner number i is to wait w(i) minutes, then raise a hand and claim his hat color to be:

    a) white, if no prisoner raised a hand before him

    b) black, otherwise.

    That's it.

    For w=0 (only black hats) this strategy fails making all prisoners to say "white" at the beginning.

    For w>0 this strategy ensures to save the prisoners.

    Note that that w(i) = w for prisoners with black hats and w(i) = w - 1 for prisoners with white hats.

    Therefore if w>0 then w(i)>=0 for every i.

    So in case w>0 each prisoner with white hat will say "white" exactly (w-1) minutes after beginning, and exactly one minute later each prisoner with black hat will say "black".

    Since warden tosses fair coin to assign hats colors, the probability of a success of this strategy is 1 - 0.5^20.

×
×
  • Create New...