Jump to content
BrainDen.com - Brain Teasers

araver

Members
  • Posts

    1976
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by araver

  1. I don`t want the details...I know they are very long steps...but u can give us the hole numbers only,

    so u begin with hole number 7,and ended at last in hole number 12 wining two jewels...then which holes are next?

    7,4,1,5,1,4,8,1,1,4,7,4,2,9,10,11,6,11,8,2,11,10,11,9,11,2,11,4,11,6,11,9,11,5,11,6,11,8,11,10,11.

    41 total choices.

  2. Please give a heuristic explanation of how you did this.

    I'm pretty sure you wrote a program to find your solution(s),

    so you must have thought up a strategy for it. I would

    appreciate a quick outline of the strategy.

    there's nothing special with my strategy.

    As I said, I have found no analytical insights on the game, except the fact that my intuition says it does not seem to be analytically "breakable".

    So, yes, I wrote a computer program:

    1) The game is pretty easy to simulate as long as you don't have a choice and then branch to all possible choices so you can simply try all the possibilities.

    2) I can look ahead with only one modulo 12 computation to see if I land on an empty hole. However I did not find a simple way to look ahead more than 1 move at a time. This would have moderately improved the algorithm.

    3) Retrograde analysis did not get me very far. It seems clear that the last positions (in reverse order) are:

    66 0 0 0 0 0 0 0 0 0 0 0 
    
    65 0 0 0 0 0 0 0 0 0 0 1 
    
    64 0 0 0 0 0 0 0 0 0 2 0 
    
    63 0 0 0 0 0 0 0 0 0 2 1 
    
    

    but afterwards you don't have a single path to follow back.

    I would have tried to encode possible end-game positions as a table so that I could detect earlier a winning sequence of choices. However my intuition is that the number of valid end-game positions is much larger than the number of end-game positions actually reachable from the proposed initial state.

    So, I crossed my fingers and tried to brute force it :) Gave each initial choice a bound on the running time before terminating the entire tree. The hole-7 choice gave me the first solution. I have no guarantee that it's actually the quickest solution (least moves).

  3. I'm afraid you didn`t understand the puzzle though....let me show you what did I mean..

    1...2...3...4...5...6...7...8...9...10...11...0

    if we take the jewel from hole No.1(only one)..we are going to put it in hole No.2(were only two jewels in),then we are going to take these 3 jewels( 2+1)from this hole leaving it empty,and put one jewel in hole 3,4 and5(here was our last jewel),making 6 jewels in it,and again we take these 6 jewels from hole 5( leaving it empty)and so on.by reaching the hole No. 12,we have Two possibilities :

    1-the last jewel ended here....and this case we can choose any new hole.

    2-we have still more jewels in hand...so we put one jewel in it and continue to hole No. 1

    Yes, I am using these rules, I forgot to mention that I also positioned the holes as Anza Power did

    0 (hole 12 which I call HOME for simplicity)...1...2...3...4...5...6...7...8...9...10...11

    Since there in a circle, it makes no difference on the rules and it makes easier computations modulo 12.

    So the first lines in my solution:

    Starting with hole 7
    
    Taking all jewels from hole 7 
    
    Jewels taken 7
    
    0 1 2 3 4 5 6 0 8 9 10 11 
    
    Taking all jewels from hole 2 
    
    Jewels taken 3
    
    1 2 0 3 4 5 6 0 9 10 11 12 
    
    
    should be read as (missing steps are now inserted):
    
    Initial: 0 1 2 3 4 5 6 7 8 9 10 11
    
    Starting with hole 7
    
    Taking all jewels from hole 7 
    
    Jewels taken 7
    
    0 1 2 3 4 5 6 0 8 9 10 11
    
    Putting one jewel in hole 8, still holding 6 in hand
    
    0 1 2 3 4 5 6 0 9 9 10 11 
    
    Putting one jewel in hole 9, still holding 5 in hand
    
    0 1 2 3 4 5 6 0 9 10 10 11 
    
    Putting one jewel in hole 10, still holding 4 in hand
    
    0 1 2 3 4 5 6 0 9 10 11 11 
    
    Putting one jewel in hole 11, still holding 3 in hand
    
    0 1 2 3 4 5 6 0 9 10 11 12
    
    Putting one jewel in hole 12(HOME), still holding 2 in hand
    
    1 1 2 3 4 5 6 0 9 10 11 12  
    
    Putting one jewel in hole 1, still holding 1 in hand
    
    1 2 2 3 4 5 6 0 9 10 11 12 
    
    Last jewel above hole 2 which is not empty so:
    
    Taking all jewels from hole 2 
    
    Jewels taken 3 (2 from hole and 1 in hand)
    
    1 2 0 3 4 5 6 0 9 10 11 12 
    
    

    I can provide a more verbatim solution (step-by-step) but it is much longer than the 439 lines I've already shown in 66Run.txt

  4. The way I see it, here's the result of what would happen with each hole you start from (note, this starts from hole 0 which is hole 12, the second one is hole 1):

    Start at 1: 0,0,0,6,0,4,11,7,0,17,0,21

    Start at +2: 0,1,0,5,0,9,6,7,0,17,10,11

    Start at +3: 0,1,2,0,7,5,0,13,8,9,10,11

    Start at +4: 0,1,2,3,0,9,6,7,0,17,10,11

    Start at +5: 0,1,2,3,0,4,11,7,0,17,0,21

    Start at +6: 0,1,2,3,4,5,0,13,8,9,10,11

    Start at +7: 11,1,0,5,0,9,6,0,0,24,0,10

    Start at +8: 0,1,2,3,0,9,6,7,0,17,10,11

    Start at +9: 0,1,2,3,4,5,0,13,8,0,19,11

    Start at +10: 0,1,2,3,0,9,6,7,0,17,0,21

    Start at +11: 11,1,2,3,0,9,6,7,0,17,0,10

    Unless I understood the riddle wrong...

    Rule 5 -"If you reach with your last jewel to your hole ( No. 12 ), repeat step 1."

  5. 1. Always.

    2. Not for 49 cards.

    1. Always in a game of M cards. The number of possible pile configurations at any time during the game is the number of partitions of M, denoted P(M).

    Dirichet's principle guarantees that in P(M)+1 consecutive rounds there are two identical configurations and since the game is deterministic, these configurations lead to an endless loop.

    2. Assume there is a stable state in a game of M cards.

    Let n>0 be the number of piles in such a stable state reached in round N.

    Then one round later, in round N+1 we must have exactly n piles.

    Reorder the piles as increasing in size: 0 <a(1) <= ... <= a(n) piles in round N.

    Denote A={a(1),..., a(n)}.

    Then a(1)-1,a(2)-1 .... a(n)-1 and n are piles in round N+1. Since it's a stable state it must have only n piles in round N+1 as well, so exactly one pile out of {a(1)-1,a(2)-1, .... ,a(n)-1,n} must be empty. Since n>0 and the others are still sorted 0<=a(1)-1 <= ... <= a(n)-1, then a(1)=1.

    So the piles in round N are exactly: B={a(2)-1, .... ,a(n)-1,n} and a(1)=1.

    Also if n>=2, a(2)>1. If a(2)=1, then it would become empty in round N+1 and that means less piles than in round N.

    One of the piles in B must be 1 since it's the same as the previous state 1=a(1) <= ... <= a(n).

    So either n=1 (which means M=1) or a(2)=2.

    For n>=2 we have:

    A={1,2,a(3),...,a(n)}

    B={1,a(3)-1, ..., a(n)-1, n}

    With the same argument, either n=2 (which means M=3) or a(3)-1=2. Latter case implies:

    A={1,2,3,...,a(n)}

    B={1,2,a(4)-1,...,a(n-1),n}.

    and so on ... (n=3 AND M=6) OR (a(4)=4).

    If the number of cards is known (e.g. M=49) then after a finite number of steps, the induction process stops as we run out of cards.

    If M is a triangular number then the process is successful A={1,2,...,n-1,n} and M=n*(n+1)/2.

    If M is not triangular (e.g. M=49) then the last step is not succesful and leads to a contradiction.

    E.g. for 49: A={1,2,3,4,5,6,7,8,a(9),...,a(n)}. Since 1+2+..+8=36 there are only 13 cards remaining. Since a(9)>=9 and a(n)>=9 then n<=9 (otherwise we need at least 9*2=18 cards). Therefore n=9 and a(9)=13. Then B={1,2,3,4,5,6,7,12,9} and B=/=A.

    So the only stable states are A={1,2,3,...,n-1,n} and only for triangular numbers M=n*(n+1)/2.

    To see posible states that lead in one round to a stable state, assume that in round N>1 we reach state A={1,2,3,...,n-1,n}. Then there are at most n piles in round N-1 since no pile is bigger than n.

    Also, since there are n piles in round N, there must have been at least n-1 piles in round N since the game at most creates 1 extra pile per round.

    If the previous round had n piles, then exactly one pile from round N-1 has dissapeared so it had 1 card, the pile with n cards is the new one which means 2,3,..., n were the rest of the piles in the previous round. So the previous round was identical to this round.

    If the previous round had n-1 piles, then the pile with n-1 piles is the new pile and no piles have been emptied in round N so the previous round is {2,3,4,...,n-1,n+1}. Which means there are other possible configuration leading to a stable state for a triangular number of cards.

  6. Please provide a purely geometrical solution.

    Nice Easter Egg indeed :)

    Completing the picture with four more circles:

    post-36575-045535500 1288322270.png

    So 1/4 of a circle is one blue + one red petal + one half blue + one half red petal

    And the area in question is one blue + one red petal + one red petal.

    We need to if either blue or red is the biggest. If red is biggest than Area >1/4 CircleArea, else Area <1/4 CircleArea.

    Construct another circle below to get a red petal inside the blue area. So 1/4 CircleArea > Area.

  7. :rolleyes:

    OK, I admit, I had a hard time learning the algorithm also. You don't get 40s the first time, you need training :ph34r:

    Maybe silly children songs could work:

    One, two, three, jump towards your base.

    Jump before the end. Did you find a friend?

    Can you find Joe? He's eating big primes.

    How many vowels can there be?

    Friends are first. Else you're very close.

    Is counting with one hand trickier?

    Four is Joe's help if he ate a friendly prime else move back to base.

    If Joe's a friend, can he play vowels too?

    I admit I don't have much talent, but it could be turned into a mnemonic ...

    It's at least plausible, right? :rolleyes:

  8. OK, I think I have it now...

    The 3rd letter is the last prime-numbered letter in the command

    Unknown 1 is true when the second to last letter <J ( or maybe <=J )

    Unknown 2 is true when the last prime-numbered letter >J ( or maybe >=J )

    Is that right?

    With hindsight I feel like I should have spotted these sooner but somehow they seem to have eluded all of us.

    I was beginning to wonder if it all hinged on whether the sum of all the ASCII characters was a prime number, or something like that :D

    :thumbsup: to all three answers. The algorithm is now completely discovered.

    <J was the rule in fact for both of my booleans (one of the booleans is in fact the opposite of yours). I can count to 10 using my fingers so I considered the first 10 letters of the alphabet to be friendlier(A..I) :D

  9. I've been staring at the lists of commands (spending more time than I probably ought :rolleyes: ) and I still don't see anything that sets the binary condition for the second letter or what separates the values for the eighth character either. :wacko:

    The lists both look pretty random to my eyes. It seems like the difference between OHIO and IOWA might provide the best chance at cracking it, but I don't see what one has that the other lacks (they are in separate lists in both cases).

    OK, that's exactly the problem with such an IF THEN 1 ELSE 0 rule, it kinda looks random for a small number of cases unless you stumble on a pattern.

    It's arguable that it may have appeared less random in the algorithm in game 2 because the rule was applied several times independently and then re-combined.

    I was able to see something by sorting the list on a fixed letter and then observe if there seems to be a rule in the output(passwords). E.g. in game 2 if you sort after the fourth letter (alphabetically) then the second letter of the password suddenly exhibits a pattern - it's odd (in hex) up to a point, then it becomes even.

    Regarding starting a new Crack the Code game: I'm up for it, regardless of the solution for this algorithm (We can leave it be for now and think between games or I can provide the solution in "spoilers")

    So who wants to start it?

  10. No one has put down the right answer...

    Sorry,

    that the answers Yes, Yes, No, No violate in any logically way the setting of the problem.

    And unless you as OP or anyone else can contradict that, it is a valid answer to the problem.

    Maybe not the right answer from your point of view, but a valid one nevertheless.

  11. Nice!

    at least 5 solutions so far:

    6 1 3 2 4 5

    1 2 6 5 3 4

    2 3 1 4 5 6

    3 4 5 6 1 2

    4 5 2 3 6 1

    5 6 4 1 2 3

    6 1 4 2 3 5

    1 2 6 5 4 3

    2 3 1 4 5 6

    3 4 5 6 1 2

    4 5 2 3 6 1

    5 6 3 1 2 4

    6 1 2 4 3 5

    1 2 6 5 4 3

    2 3 4 1 5 6

    3 4 5 6 2 1

    4 5 1 3 6 2

    5 6 3 2 1 4

    6 1 3 4 2 5

    1 2 6 5 3 4

    2 3 4 1 5 6

    3 4 5 6 1 2

    4 5 2 3 6 1

    5 6 1 2 4 3

    6 1 3 4 2 5

    1 2 6 5 4 3

    2 3 4 1 5 6

    3 4 5 6 1 2

    4 5 2 3 6 1

    5 6 1 2 3 4

    Am I missing something or is it OK that the solution is not unique?

  12. First, statement C is not true.

    Assume C is true then:

    - if B is true then B=/=C but they're both true - contradiction

    - if B is false then B=C which means B is actually true - contradiction.

    So C is false.

    C actually means (A=B AND C=A) OR (A=/=B AND C=D). C is false so nonC is true.

    Applying DeMorgan laws:

    nonC = non((A=B AND C=A) OR (A=/=B AND C=D))

    =non(A=B AND C=A) AND non(A=/=B AND C=D)

    =(non(A=B)OR non(C=A)) AND (non(A=/=B)AND non(C=D))

    =(A=/=B OR C=/=A) AND (A=B OR C=/=D)

    Assume A =/= B.

    ........Then C=/=D (because the second part of non-C must be true).

    ........If A is true, then from A we get A = C (else statement) which means A is false contradiction.

    ........Therefore A must be false.

    ........Since A = (C=D AND A=B) OR (C=/=D AND A=C) is false

    ........non A = (C=/=D OR A=/=B) AND (C=D OR A=/=C) must be true.

    ........But since C=/=D and A=C (they're both false) the second part (C=D OR A=/=C) cannot be true. Another contradiction.

    Therefore A=B.

    ........Then C=/=A is true (first part of nonC must be true) which means A and B are both true.

    ........Looking at A (which we know is true) we see that if C=/=D then A=C impossible.

    ........Therefore C=D. Which means D is False (the answer is not riff-raff it's FALSE :) ).

    Answers:

    A - True

    B - True

    C - False

    D - False

    Or if you prefer more "standard" answers:

    A: Yes. B. Yes. C. No D. No.

  13. Maybe the consistency rule isn't working quite as I intended it. When writing that I was thinking in terms of operations which are used repeatedly (as in the first game). But here each operation applies only once within each clue and the 50% rule pretty much rules out any IF A THEN B ELSE C operation if applied only once per clue (since if B occurs more than half the time, C won't, and vice versa). That's probably too restrictive. What matters is that the hackers get to see enough examples of the rule that they can deduce it, so I wouldn't get hung up on that too much. It probably needs to be worded differently.

    I agree.

    As to whether brute force attacks are appropriate, my inspiration for this game is the real-life problem of creating secure passwords as a hash of website names. Such a system needs to be resistant to a little guessing, since a hacker who has obtained some of your passwords may well try a few likely-looking combinations without knowing the entire system. IMO that is in the spirit of the game as it's part of the challenge to build in resistance to that. Plus, it would take enormous restraint not to make guesses knowing the password could only be one of four! It is, after all, a race between the hackers. The brute force applicable is limited by the fact that they only get one guess for every 3 states you destroy.

    There is no need to recalculate anything you can keep track of in your head. For most people that would not be very much, but still, reusing a couple of booleans is fine, and cuts down on thinking time.

    I know the real-life problem is often solved with brute-attacks, no argument for me there. This however is a small scale model - 51/3=17 - at most 16 guessing rounds.

    I still would have liked to "patch" it up a little. I would have been much happier designing something that does not suggest a brute-force attack is feasible e.g. the algorithm in the first game. As I said, I was too anxious to start the game :D

  14. not mutually satisfiable.

    First, assume c=d. then a=b (From eq A). Since a=b, c=a (eq C). Since a=b and c=a, c=b. But we are told b != c (eq B). Contradiction!

    So c!=d. This means a=c (eq A). We know b!=c (eq B), so a!=b. Since a!=b, c=d (eq C). So c=d and c!=d.... another contradiction.

    Correct. But not mutually satisfiable just means they're not all true at the same time, right?

  15. Here. Let's formalise the statements so that they're more condensed.

    A) If C = D, then A = B, else A = C.

    B) B =/= C.

    C) If A = B, then C = A, else C = D.

    D) D = riff-raff.

    This doesn't help uncover the solution, so it isn't a "hint".

    First, statement C is not true.

    Assume C is true then:

    - if B is true then B=/=C but they're both true - contradiction

    - if B is false then B=C which means B is actually true - contradiction.

    So C is false.

    C actually means (A=B AND C=A) OR (A=/=B AND C=D). C is false so nonC is true.

    Applying DeMorgan laws:

    nonC = non((A=B AND C=A) OR (A=/=B AND C=D))

    =non(A=B AND C=A) AND non(A=/=B AND C=D)

    =(non(A=B)OR non(C=A)) AND (non(A=/=B)AND non(C=D))

    =(A=/=B OR C=/=A) AND (A=B OR C=/=D)

    Assume A =/= B.

    ........Then C=/=D (because the second part of non-C must be true).

    ........If A is true, then from A we get A = C (else statement) which means A is false contradiction.

    ........Therefore A must be false.

    ........Since A = (C=D AND A=B) OR (C=/=D AND A=C) is false

    ........non A = (C=/=D OR A=/=B) AND (C=D OR A=/=C) must be true.

    ........But since C=/=D and A=C (they're both false) the second part (C=D OR A=/=C) cannot be true. Another contradiction.

    Therefore A=B.

    ........Then C=/=A is true (first part of nonC must be true) which means A and B are both true.

    ........Looking at A (which we know is true) we see that if C=/=D then A=C impossible.

    ........Therefore C=D. Which means D is False (the answer is not riff-raff it's FALSE :) ).

    Answers:

    A - True

    B - True

    C - False

    D - False

  16. Well, MICHIGAN, FLORIDA, CALIFORNIA and others all violate the rule I noticed about separated consonants, so it seems to have been something of a fluke. :wacko:

    Yes, it's not the intended algorithm but I think it would be an interesting valid rule for an algorithm in a different game as ABORT does not have separated consonants and falls on the most frequent branch. It might still raise some objections depending on each player's view on the game rules.

×
×
  • Create New...