Write a recursive program for the fake coin problem (Chapter 4 Slide 20) using a decrease by factor 3 algorithm. Make sure your program runs for all n>2. Analyze its time and space complexity. Include details/comments to explain your code/approach as I did in Quiz 2 solution (posted under Week 6 on Blackboard).

Specifically, the program will read “input.txt” that contains the weights of coins. All the weights will be identical except one of them, which is the lighter coin that is fake. The program will find the index of that coin and output it. The challenge here is to simulate a balance scale used to find the fake coin (Chapter 4 Slide 20).

Found something interesting ?

• On-time delivery guarantee
• PhD-level professional writers
• Free Plagiarism Report

• 100% money-back guarantee
• Absolute Privacy & Confidentiality
• High Quality custom-written papers

Related Model Questions

Feel free to peruse our college and university model questions. If any our our assignment tasks interests you, click to place your order. Every paper is written by our professional essay writers from scratch to avoid plagiarism. We guarantee highest quality of work besides delivering your paper on time.

Grab your Discount!

25% Coupon Code: SAVE25
get 25% !!