(5/5)

Hire Me
(5/5)

Hire Me
(4/5)

Hire Me
(5/5)

Hire Me

# prove that regardless of which algorithm you use to find the median of 5 elements,

INSTRUCTIONS TO CANDIDATES

Question (1): prove that regardless of which algorithm you use to find the median of 5 elements, we have to use at least 6 comparisons? comment ot question 1: Find lower bounds for the minimum number of comparisons needed to FIND THE MEDIAN of 5 elements. I mentioned that a lower bound of 5 should be easier than a lower bound of 6.

Question (2): Describe with two or three sentences (no code, no pictures, no long explanations) an algorithm that sorts 6 distinct numbers with 10 comparisons. Prove that no sorting algorithm that uses comparisons can perform this task in less than 10 comparisons.

Question (3): Describe with two or three sentences (no code, no pictures, no long explanations) an algorithm that sorts 7 distinct numbers with 13 comparisons. Prove that no sorting algorithm that uses comparisons can perform this task in less than 13 comparisons. Comments to Questions (2) and (3) You need the algorithm that sorts 5 elements with 7 comparisons, and then use at most 3 additional ones for the insertion of the 6th, for a total of 10. For (b) Use (a), and sort 6 elements with 10 comparisons; then insert the 7th with 3 more comparisons for a total of 13. No argument for the lower bounds. Hint: use decision trees.

## Related Questions

##### . The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

##### . Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

##### . The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

##### . Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

##### . The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme

Get Free Quote!

439 Experts Online