• Code output:

    Question:  0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 
    Do:left 0 1 2 3  right 4 5 6 7 , expect to get 1.58496 BITS information. 
    if tilted left:
        Do:left 2 3 4 5 6  right 7 8 9 10 11 , expect to get 1.56128 BITS information. 
        if tilted left:
            Do:left 1 2  right 3 4 , expect to get 1.58496 BITS information. 
            if tilted left:
                Answer is  2 Heavy
            if balanced:
                Answer is  7 Light
            if tilted right:
                Answer is  3 Heavy
        if balanced:
            Do:left 0  right 1 , expect to get 1 BITS information. 
            if tilted left:
                Answer is  0 Heavy
            if tilted right:
                Answer is  1 Heavy
        if tilted right:
            Do:left 1 2 3 4  right 6 7 8 9 , expect to get 1.58496 BITS information. 
            if tilted left:
                Answer is  6 Light
            if balanced:
                Answer is  5 Light
            if tilted right:
                Answer is  4 Light
    if balanced:
        Do:left 1 2 3 4 5  right 6 7 8 9 10 , expect to get 1.56128 BITS information. 
        if tilted left:
            Do:left 7 8  right 10 11 , expect to get 1.58496 BITS information. 
            if tilted left:
                Answer is  10 Light
            if balanced:
                Answer is  9 Light
            if tilted right:
                Answer is  8 Light
        if balanced:
            Do:left 1 2 3 4 5  right 7 8 9 10 11 , expect to get 1 BITS information. 
            if tilted left:
                Answer is  11 Light
            if tilted right:
                Answer is  11 Heavy
        if tilted right:
            Do:left 7 8  right 10 11 , expect to get 1.58496 BITS information. 
            if tilted left:
                Answer is  8 Heavy
            if balanced:
                Answer is  9 Heavy
            if tilted right:
                Answer is  10 Heavy
    if tilted right:
        Do:left 2 3 4 5 6  right 7 8 9 10 11 , expect to get 1.56128 BITS information. 
        if tilted left:
            Do:left 1 2 3 4  right 6 7 8 9 , expect to get 1.58496 BITS information. 
            if tilted left:
                Answer is  4 Heavy
            if balanced:
                Answer is  5 Heavy
            if tilted right:
                Answer is  6 Heavy
        if balanced:
            Do:left 0  right 1 , expect to get 1 BITS information. 
            if tilted left:
                Answer is  1 Light
            if tilted right:
                Answer is  0 Light
        if tilted right:
            Do:left 1 2  right 3 4 , expect to get 1.58496 BITS information. 
            if tilted left:
                Answer is  3 Light
            if balanced:
                Answer is  7 Heavy
            if tilted right:
                Answer is  2 Light
    
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment