Search:

Type: Posts; User: Snafuist

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: Riddle Thread

    by Snafuist
    Replies
    108
    Views
    69,941

    Hmm... I don't think that it's a good idea to...

    Hmm... I don't think that it's a good idea to merge all riddle threads. If we run out of riddles or loose the interest, the threads will quickly disappear out of sight. If on the other hand we keep...
  2. Thread: Riddle Thread

    by Snafuist
    Replies
    108
    Views
    69,941

    Bonus Riddle

    CornedBee already has.

    Greets,
    Philip
  3. Thread: Riddle Thread

    by Snafuist
    Replies
    108
    Views
    69,941

    Bonus Riddle

    Grmbl. I already dismissed the parity approach. Should have thought it through...

    Anyway, very nice riddle!

    Greets,
    Philip
  4. Thread: Riddle Thread

    by Snafuist
    Replies
    108
    Views
    69,941

    Bonus Riddle

    It may even work without making pauses. Are the dwarves allowed to call out their presumed hat color more than once?

    Greets,
    Philip
  5. Thread: Riddle Thread

    by Snafuist
    Replies
    108
    Views
    69,941

    Bonus Riddle

    If the dwarves are allowed to move, I have another solution:

    The last dwarf (the one who can't see any other dwarf) moves forward one step. The next dwarf walks right next to him. Then comes the...
  6. Thread: Riddle Thread

    by Snafuist
    Replies
    108
    Views
    69,941

    Yet another riddle

    Oops, you are right. I didn't get it in the first place, so I wrote down this table:



    BBB
    WBB
    BBW B
    BWB
    BWW A
    WBW B
  7. Thread: Riddle Thread

    by Snafuist
    Replies
    108
    Views
    69,941

    Bonus Riddle

    I have a solution, but I think it involves cheating:

    The first dwarf simply says the color of the hat directly in front of him. The 2nd dwarf thus knows its own hat color. If the third dwarf has a...
  8. Thread: Riddle Thread

    by Snafuist
    Replies
    108
    Views
    69,941

    Yet another riddle

    Because the situations WBB and BBB are indistinguishable for all dwarves.

    Greets,
    Philip
  9. Thread: Riddle Thread

    by Snafuist
    Replies
    108
    Views
    69,941

    Yet another riddle

    I doubt that. If all get a black sticker, there's no way to tell.

    But I can think of at least some ways that will make them survive:
    If A sees two white stickers, he can immediately answer...
  10. Thread: Riddle Thread

    by Snafuist
    Replies
    108
    Views
    69,941

    Bonus Riddle

    I already had, but it's good to see you join. :)

    There are a few questions remaining:

    Do the dwarves know in advance the value of n, i.e. the total number of dwarves?
    Do the dwarves know in...
  11. Thread: Riddle Thread

    by Snafuist
    Replies
    108
    Views
    69,941

    Riddle #7: two smallest elements

    Right!

    It may sound silly, but I feel happy now.

    Greets,
    Philip
  12. Thread: Riddle Thread

    by Snafuist
    Replies
    108
    Views
    69,941

    Riddle #7: two smallest elements

    As there are infinitely many natural numbers, the two orderings ... < 2 < 1 and 1 < 2 < ... are distinct because they have different properties (there's a clear difference between successor and...
  13. Thread: Riddle Thread

    by Snafuist
    Replies
    108
    Views
    69,941

    Yes, the order has to be total and strict. Note...

    Yes, the order has to be total and strict. Note that an element without a specific predecessor is not necessarily a smallest element (although a smallest element certainly doesn't have a...
  14. Thread: Riddle Thread

    by Snafuist
    Replies
    108
    Views
    69,941

    Riddle #7: two smallest elements

    The natural numbers are usually ordered in the following way:

    1 < 2 < 3 < 4 < ...

    There is exactly one element (the first) which has no predecessor. Note that we are free to invent our own...
  15. Thread: Riddle Thread

    by Snafuist
    Replies
    108
    Views
    69,941

    Riddle #6: natural languages

    For those who don't see it right away, here's the full proof:

    Suppose that "barish" is barish. Then it denotes a property that it has itself, hence it is fooish. Contradiction.
    Suppose that...
  16. Thread: Riddle Thread

    by Snafuist
    Replies
    108
    Views
    69,941

    Riddle #4: if-statement considered harmful

    Maybe. This used to be true for CS students at my university (that's why I knew about it). Now, the corresponding lecture isn't mandatory anymore. It seems to me that the focus has shifted from logic...
  17. Thread: Riddle Thread

    by Snafuist
    Replies
    108
    Views
    69,941

    Riddle #4: if-statement considered harmful

    I can see some ugly bit twiddling here. Any volunteers? :))



    Nothing easier than that if you know that double negation doesn't change the value:
    a OR b == !(!a AND !b)

    I once had to show...
  18. Thread: Riddle Thread

    by Snafuist
    Replies
    108
    Views
    69,941

    Riddle #6: natural languages

    I introduce two new adjectives fooish and barish.

    A word is fooish if it denotes a property that it has itself.
    A word is barish if it doesn't.

    Examples for fooish words:
    - "short" is a short...
  19. Thread: Riddle Thread

    by Snafuist
    Replies
    108
    Views
    69,941

    Riddle #5: more dwarfs

    Right!

    Can someone else explain it?

    Greets,
    Philip
  20. Thread: Riddle Thread

    by Snafuist
    Replies
    108
    Views
    69,941

    Riddle #3: three dwarfs, two paths, one life

    And I was inspired by this: Labyrinth Puzzle.
  21. Thread: Riddle Thread

    by Snafuist
    Replies
    108
    Views
    69,941

    Riddle #4: if-statement considered harmful

    Yes.



    return (a >b)?1:(a<b)?-1:0;


    Nice try.
  22. Thread: Riddle Thread

    by Snafuist
    Replies
    108
    Views
    69,941

    Riddle #3: three dwarfs, two paths, one life

    I love this solution. My little brother suggested killing the dwarves until one of them decides to tell the truth anyway, but this solution suffers in a similar way.

    And after all, a 50% chance is...
  23. Thread: Riddle Thread

    by Snafuist
    Replies
    108
    Views
    69,941

    Riddle #4: if-statement considered harmful

    Oops, I skipped #4, so here it is.

    Consider the following program:



    int cmp(int a, int b)
    {
    if(a > b) {
    return 1;
  24. Thread: Riddle Thread

    by Snafuist
    Replies
    108
    Views
    69,941

    Riddle #3: three dwarfs, two paths, one life

    Right. I already had several discussions about that. The problem arises due to the inexactness of most natural languages. The most obvious solution is to ask a more concise (and more awful) question....
  25. Thread: Riddle Thread

    by Snafuist
    Replies
    108
    Views
    69,941

    Riddle #5: more dwarfs

    There are seven dwarfs, each one wearing a unique hat. A wind blows off the hats. The dwarfs start running after their hats and each dwarf puts on the first hat that he manages to catch. Eventually...
Results 1 to 25 of 38
Page 1 of 2 1 2