Re: On the complexity of determining whether n numbers are distinct
- From: "eKo1" <berndlosert@xxxxxxxxxxxx>
- Date: 25 Sep 2006 22:44:14 -0700
eKo1 wrote:
eKo1 wrote:
Suppose you have n coins, all of which look exactly the same. You are
given a balance scale and are asked to determine if the coins are all
distinct, i.e. they all weigh differently. What is the minimum amount
of times the balance will be used to solve the problem?
If I weigh two coins at a time, the decision tree for this problem will
have a height h = C(n, 2) so in the worse case, the balance would be
used C(n, 2) times which is proportional to n^2. This is certainly not
n lg n. Hmm....
Nevermind. Every time I weigh two coins, say a and b, either a > b, a <
b or a = b. That means each internal node in the decision tree has 3
children.
I drew a decision tree for n = 3 for this problem and a decision tree
for sorting n = 3 numbers and they look exactly the same except that
the internal nodes on the sorting decision tree only have two children
as opposed to three. I must figure out a way to show that both trees
have the same height. Perhaps a proof by induction is in order. I'll
think about this a bit and post some results tomorrow.
.
- Follow-Ups:
- References:
- On the complexity of determining whether n numbers are distinct
- From: eKo1
- Re: On the complexity of determining whether n numbers are distinct
- From: Googmeister
- Re: On the complexity of determining whether n numbers are distinct
- From: eKo1
- Re: On the complexity of determining whether n numbers are distinct
- From: Googmeister
- Re: On the complexity of determining whether n numbers are distinct
- From: eKo1
- Re: On the complexity of determining whether n numbers are distinct
- From: eKo1
- On the complexity of determining whether n numbers are distinct
- Prev by Date: Re: On the complexity of determining whether n numbers are distinct
- Next by Date: Re: How to compute "A1 x. .. x An subset B" fast if B is fixed? Reduced maximal set of Cartesian products.
- Previous by thread: Re: On the complexity of determining whether n numbers are distinct
- Next by thread: Re: On the complexity of determining whether n numbers are distinct
- Index(es):
Relevant Pages
|