Jump to content

please help on this algorithm


Ella90

Recommended Posts

hi I can't figure this out please help:

 

 

"Two police officers are carrying n gold coins in two bins, in a secured vehicle.
The physical characteristics of the the gold coins are the same, but while the coins in the
first bin are all the same, the ones in the second bin are different from the ones in the first
bin. At one corner, the driver suddenly brakes and the coins are all mixed up. They have
a device that can be applied to two coins and tells whether they are different or not. It is
known in advance that most of the coins (more then 50% ) are from the first bin. Find the
algorithm that the two officers should apply in order to put the coins back into the bins.
How many comparisons are necessary, in the worst case, to find at least one coin from the
first bin?
(Beware: it is possible that two coins are identical, but do not belong to the first bin.)"
I don't understand so the first bin has same coins and coins in second bin are different that first bit but different to each other too?
Edited by Ella90
Link to comment
Share on other sites

  • 4 weeks later...
  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.