Assignment-2 (4 August 2015)

The objective of this assignment is to appreciate divide and conquer strategy

Suppose you are given a large number of gold coins containing one fake coin. All the coins have equal weight, with the fake one being lighter. Suppose you are given a weighing balance with two pans (but no weights). Design an efficient solution to locate the fake coin.

You are given a list of identical numbers with only one being different. Apply your solution to the lists below and print the size of the input along with the number of comparisons taken by your program.

test files