Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help with parts a-b! (5 pts.) Searching for fake coins. There are n coins c1,c2,,cn at most two of which are fake. The genuine

Please help with parts a-b!

image text in transcribed

(5 pts.) Searching for fake coins. There are n coins c1,c2,,cn at most two of which are fake. The genuine coins weigh the same and so do the fake coins, but the fake coins are lighter than the genuine ones. Your goal is to use a weighing scale (shown below) to determine all the fake coins in O(logn) weighings. Here's a simple procedure when n=3 : First, compare c1 and c2. There are three possibilities: they weigh the same, c1 is heavier than c2 or c1 is lighter than c2. Next, compare c1 and c3. Again, there are three possibilities. The table below summarizes the conclusion based on the outcomes of the two weighings. Basically, the lighter coin(s) has to be a fake coin(s). We've shown that two weighings suffice to identify fake coins in a group of three coins. a. (1.5 pt.) When n=9, describe a similar procedure that would identify all the fake coins using at most six weighings. b. (3.5 pts.) Create a general procedure for identifying fake coins when n3 using O(logn) weighings. Make sure you justify why the number of weighings is O(logn). NOTES: (i) You are allowed to put more than one coin on each side of the scale. (ii) For clarity, briefly describe your procedure using words and then present the steps like code

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introductory Relational Database Design For Business With Microsoft Access

Authors: Jonathan Eckstein, Bonnie R. Schultz

1st Edition

1119329418, 978-1119329411

More Books

Students also viewed these Databases questions

Question

1. Discuss the four components of language.

Answered: 1 week ago

Question

a. How many different groups were represented?

Answered: 1 week ago