Thursday, December 2, 2010

Celebrity twitters

In a n twitter set, a celebrity is defined as someone who is followed by everyone, but who follows no one. You need to identify the celebrities by asking to twitters the question: "do you know person x?" The answer will be yes/no. Find the celebrity by asking only O(n) questions.

Hint: how many information can you infer with one question?

1 comment:

  1. I'm thinking about stealing some of your puzzles here and use them against students ;)

    Ciao!

    ReplyDelete