Jump to content
BrainDen.com - Brain Teasers

witzar

Members
  • Posts

    237
  • Joined

  • Last visited

  • Days Won

    7

Posts posted by witzar

  1. the answer does not work. Any 'move' with 4 such 4d 4u returns the puzzle to the exact same place. In other words they do nothing and should be omitted.

    You didn't get it. Move "4U" means: move 4th column Up (just one cell). (If you repeat this move 4 times, then you will return to the same position.)

  2. OK, here is the sequence of moves that swaps cells 1 and 2:

    4D, 1R, 4U, 3D, 1R, 1R, 3U, 4D, 1L, 4U, 1L, 3D, 1L, 3U, 4D, 1R, 1R, 4U, 3D, 1R, 3U.

    It should be read as follows:

    4D = "slide 4th column Down",

    1R = "slide 1st row Right",

    etc (U=Up, L=Left).

    Above sequence is not the shortest possible, but it completes the algorithm for solving any puzzle,

    that I've described in my previous post.

  3. I've played for a while with Anza Power's simulator and I've managed to swap "1" and "2" in original position.

    This means that it is possible to swap any two horizontally adjacent cells, you just have to:

    1. Make a couple of obvious moves to bring these two cells in place where "1" and "2" originally are.

    2. Apply the procedure that swaps cells "1" and "2".

    3. Undo moves made in step 1 (perform "opposite" moves in reversed order).

    Exactly the same can be done for every vertically adjacent cells due to the symmetry of the puzzle,

    you can easily transform procedure swapping "1" and "2" into procedure swapping "1" and "4".

    Now when you know how to swap any two adjacent (horizontally or vertically) cells,

    it is easy to solve every possible puzzle: you can just put numbers into their cells one by one.

    First put 1 in place, then 2 without touching 1, then 3 without touching 1 and 2, etc.

    Alternatively you can solve first three rows using method described by Anza Power and use above for the last row.

    All you have to do is to find a sequence of moves that swaps "1" and "2" (possibly by trial and error).

    And such a sequence exists, I've checked it.

  4. 1.

    Let:

    A = heads-heads coin was selected from bag by magician

    	P(A) = 1/4
    
    
    C = heads-tails coin was selected from bag by magician
    	P(C) = 1 - P(A) = 3/4
    B = all n repeated flips show heads
    	P(B) = P(A) * 1 + P(C) * 2^-n = (1/4) * (1 + 3*2^-n)
    We have:
    	P(AB) = P(A) = 1/4
    
    
    and
    	P(A|B) = P(AB)/P(B) = (1 + 3*2^-n)^-1
    
    
    We are looking for smallest n such that:
    	(1 + 3*2^-n)^-1 >= 1/2
    
    	1 + 3*2^-n <= 2 
    
    	2^-n <= 1/3
    
    
    So the answer is:
    	n=2
    
    
    2. Let: X = there is one tails-tails coin, one head-tails coin and two head-head coins
    	P(X) = 24/56 = 3/7
    (above result is an easy combinatorial exercise omitted here for space economy) Y = there are three head-tails coins and one head-head coin
    	P(Y) = 1 - P(X) = 4/7 
    
    
    A = heads-heads coin was selected from bag by magician
    	P(A) = P(X) * 2/4 + P(Y) * 1/4 = (3*2 + 4*1) / (7*4) = 10/28
    
    
    C = tails-tails coin was selected from bag by magician
    	P(C) = P(X) * 1/4 = 3/28
    
    
    D = heads-tails coin was selected from bag by magician
    	P(D) = P(X) * 1/4 + P(Y) * 3/4 = (3*1 + 4*3) / (7*4) = 15/28
    
    
    Double check:
    	P(A) + P(C) + P(D) = (10 + 3 + 15)/28 = 28/28 = 1 
    
    
    (OK) B = all n repeated flips show heads
    	P(B) = P(A)*1 + P(C)*0 + P(D)*2^-n = 10/28 + (15/28)*2^-n = (10/28)*(1 + 1.5*2^-n)
    
    
    We have:
    	P(AB) = P(A) = 10/28
    
    
    and
    	P(A|B) = P(AB)/P(B) = (1 + 1.5*2^-n)^-1
    
    
    We are looking for smallest n such that:
    	(1 + 1.5*2^-n)^-1 >= 1/2
    
    	1 + 1.5*2^-n <= 2
    
    	2^-n <= 2/3
    
    
    So this time the answer is:
    	n=1

    This means that this time just one flip of "heads" makes the bet on head-head coin profitable (meaning: even money or better).

  5. In any situation with nodes connected by equal length lines, you can determine the minimum distance to travel all the paths simply by counting the number of odd nodes (odd number of lines connected to the node) and number of total segments.

    ...

    I'm pretty sure this will always work.

    Think for example about a graph in a shape of a cross (or letter X): four arms, each arm made of 100 segments. This graph has 400 edges (segments) and only 4 odd nodes (one at the end of each arm). You can start and finish where You want. Can you traverse it in 402 steps? Can You do better then 600?

    PS If You don't like "dead ends" (vertices with only one segment)in graph, You can add a triangle (loop made of 3 segments) at the end of each arm.

  6. The truck needs to visit point C at least 2 times to paint all 3 adjacent streets.

    So it will arrive at point C at least twice and will leave it at least twice,

    so at least once it will drive on already painted road.

    The same applies to points D, E, F.

    Since each of the four points above requires an extra segment of truck's road,

    at least two extra segments are required (one extra segment per two points).

    City roads have 12 segments total, so there could no road shorter than 12+2=14.

  7. '-' denotes hole that may be empty or may contain the groundhog

    'X' denotes hole that does not contains the groundhog

    '!' denotes hole checked on given day

    Holes: 1 2 3 4 5

    Day1 : - ! - - -

    Day2 : X - ! - -

    Day3 : - X - ! -

    Day4 : - - X ! X

    OK, I made a mistake here: I missed 'X' on hole 1 day 4. It should be:

    Holes: 1 2 3 4 5

    Day1 : - ! - - -

    Day2 : X - ! - -

    Day3 : - X - ! -

    Day4 : X ! X - X

    Day5 : X X ! X -

    Day6 : X X X ! X

    So 6 days is enough. On Day 4 you can check hole 4 instead of hole 2 due to symmetry of X-es and continue by analogy. You can also start with hole 4 instead hole 2 on day 1. This gives total of 4 optimal solutions.

  8. '-' denotes hole that may be empty or may contain the groundhog

    'X' denotes hole that does not contains the groundhog

    '!' denotes hole checked on given day

    Holes: 1 2 3 4 5

    Day1 : - ! - - -

    Day2 : X - ! - -

    Day3 : - X - ! -

    Day4 : - - X ! X

    Day5 : - ! - X X

    Day6 : X ! X - X

    Day7 : X X ! X -

    Day8 : X X X ! X

    There are others solutions as well, but I think 8 days limit cannot be improved.

  9. Let:

    wyw = number of games Won by Yeti playing White

    lyw = number of games Lost by Yeti playing White

    wyb = number of games Won by Yeti playing Black

    lyb = number of games Lost by Yeti playing Black

    We have:

    lyw + wyb = 5

    and

    wyw + lyw = 7

    Adding above equations gives:

    wyw + wyb + 2*lyw = 12

    or

    wyw + wyb = 2*(6-lyw)

    This shows that Yeti won even number of games, so the winner is his opponent.

  10. Game cannot end after odd number of points (since we start from a deuce).

    Let's call a two consecutive points a turn (game can end after some number of turns).

    Let:

    a = .6*.6 = .36 = probability for player "A" to win in 1 turn from deuce

    b = .4*.4 = .16 = probability for player "B" to win in 1 turn from deuce

    d = 1 - (.36+.16) = .48 = probability of deuce after 1 turn from deuce.

    Let A, and B be the probabilities for players "A" and "B" respectively to win the game.

    Obviously:

    A + B = 1

    since "infinite deuce" probability is zero.

    Now player "A" can win in 1 turn, 2 turns, and so on.

    Probability for player "A" to win in exactly n turns equals d^(n-1)*a (since it only can happen with (n-1) consecutive d-turns followed by a-turn).

    Therefore we have:

    A = a + da + dda + ddda + ... = a(1 + d + d^2 + ...)

    Let

    X = (1 + d + d^2 + ...)

    Now we have:

    A = aX

    We can apply the same for the player "B", so:

    B = bX

    We know that A + B = 1, therefore

    aX + bX = 1

    From above equation we can find X:

    X = (a+b)^-1 = (.36 + .16)^-1 = .52^-1

    Now:

    A = aX = .36 * .52^-1 which is approximately 0.6923 and this is the correct answer.

×
×
  • Create New...