Finding the celebrity group

Problem Given the group of people in party find the group of celebrities Suppose we have N people and there might be a group of celebrities inside. Every person knows every celebrity and every celebrity knows only every other celebrity. If you are given the function of Knows(x,y) which returns true if x knows y, false otherwise. identify the group of celebrities. This problem is to identify a group of celebrities, and it is not identifying the only celebrity among the people, such as http://k2code. [Read More]

The Celebrity Problem

Problem In a party of N people, only one person is known to everyone. Such a person may be present in the party, if yes, (s)he doesn’t know anyone in the party. We can only ask questions like “does A know B? “. Find the stranger (celebrity) in minimum number of questions. Solution We can describe the problem input as an array of numbers/characters representing persons in the party. [Read More]