logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Michele PerezPhilosophy
(4/5)

926 Answers

Hire Me
expert
Saleem KhanFinance
(5/5)

808 Answers

Hire Me
expert
rahul kumarOthers
(/5)

650 Answers

Hire Me
expert
Kyle BaileyFinance
(4/5)

917 Answers

Hire Me
Mathematics

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

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

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