Celebrity Cliques In Optimal Time

A party P P is a set of distinct people with a relation knows \text{knows} .

A non-empty subset C C of P P is a celebrity clique if everyone in the clique is known by everyone in the party, but the members of the clique only know each other. Formally,

x P , y C : : x knows y ( y knows x x C ) . \forall x \in P, y \in C :: x \text{ knows } y \wedge (y \text{ knows } x \implies x \in C).

You wish to design an algorithm which takes in the number of people ( n n ), and the matrix that describes the knows \text{knows} relation and determines if there is a celebrity clique in the party.

Which of the following is the sharpest lower bound?


Inspired by Richard Bird's Pearls of Functional Programming
Ω ( n ) \Omega(n) Ω ( n 2 ) \Omega(n^2) Ω ( 2 n ) \Omega(2^n) Ω ( n n ) \Omega(n^n)

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

To show that Ω ( n ) \Omega(n) is not a sharp enough lower bound, we notice that Ω ( n 2 ) \Omega(n^2) can be achieved. And to show that the others are not lower bounds, we could come up with an explicit quadratic time algorithm to solve the problem.

Suppose there was an algorithm better than Ω ( n 2 ) \Omega(n^2) , this means that this program is not inspecting at least one of the entries of the knows \text{knows} matrix. We'll show that without inspecting this entry, there cannot be any conclusion drawn about the celebrity clique at all.

  • To begin with assume that all entries in the matrix are True . This means that the entire party is a celebrity clique.
  • Now, change k n o w s x y knows_{xy} to False . Now, y y is not a celebrity since x x does not know him. But everyone else, still knows y y , which means they are not celebrities either. At this point, only x x could be a celebrity. But unless, x x and y y are the only people in the party, there is someone else that x x knows, in which case there are no celebrities.

Hence, the algorithm can never tell if there is a celebrity clique without inspecting all of the entries (at least once).

Why is the lower bound described using Ω \Omega notation instead of O O notation?

Christopher Boo - 4 years, 9 months ago

Log in to reply

Umm, I guess O O notation describes upper bounds rather than lower bounds, right?

Agnishom Chattopadhyay - 4 years, 9 months ago

Log in to reply

Whoops, my bad.

Christopher Boo - 4 years, 9 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...