Come up with a divide and conquer algorithm for the followingscenario: You are studying different ty

Come up with a divide and conquer algorithm for the followingscenario: You are studying different types of rocks on an island. Thereare MANY different types of rocks, but we are guaranteed that ofthe “N” rocks on the island, there exists a majority type. Morespecifically, we are guaranteed that there exists a quantitystrictly greater than N/2 rocks of a single type. We have access to a method called isTheSame(rock1, rock2)returning true if the rocks are of the same type, false otherwise.We must use this method in the following problem as our sole meansfor comparison between two rocks. As an example of desiredfunctionality: If rock type A is in fact the majority and in somearray we have rocks 1,4,5,6, qualifying as typeA we can return anyone of those rocks’ numbers at the end of the algorithm to indicatethat this rock’s type is indeed the majority. The task is as follows: a) Design a deterministic divide and conquer algorithm that usesO(nlog(n) calls to isTheSame that returns a rock the belongs to themajority type. Explain in english and provide pseudocode for thisalgorithm. b) Explain why we make O(nlog(n)) calls to isTheSame. c) Prove using induction why this algorithm is correct includinga hypothesis, base case, inductive step and conclusion. . . .

 

Save your time - order a paper!

Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlines

Order Paper Now

“Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!”

The post Come up with a divide and conquer algorithm for the followingscenario: You are studying different ty appeared first on Nursing Assignment.

 

“Are you looking for this answer? We can Help click Order Now”

The post Come up with a divide and conquer algorithm for the followingscenario: You are studying different ty first appeared on Nursing Essays Writers.