2 – Deterministic Selection

Please find attached.

Q2 Deterministic Selection
20 Points
a) Suppose that the Selection algorithm used groups of 4 instead of 5.
Assume that the input has no duplicates. Define the representative of a group as some
arbitrary value that is larger than two elements and smaller than two elements of the group
(e.g., for 1,4,2,3, a representative could be 2.5).
State the recurrence that we would get for this variant.
Then state the total time complexity.
There is no need to show any derivations.
Useful LaTeX: $$ \frac{n}{k} $$
Enter your answer here
b) Now suppose that we use groups of 6, this time assuming that the representative of a group
is the element that is defined to be the 3rd smallest.
Again, state the recurrence and time complexity.
Enter your answer here
c) For the standard algorithm with groups of 5, describe a situation where the algorithm checks
if the median of representatives has the rank we’re looking for, even though there is no
possibility that this will be true.
Enter your answer here
d) Using groups of 5, suppose that instead of using the median of a group as a representative,
we use the smallest element within the group. Then we calculate the median of
representatives, x. How many elements are guaranteed to be larger than x, and how many will
definitely be smaller than x?
Enter your answer here

Calculate your order
275 words
Total price: $0.00

Top-quality papers guaranteed

54

100% original papers

We sell only unique pieces of writing completed according to your demands.

54

Confidential service

We use security encryption to keep your personal data protected.

54

Money-back guarantee

We can give your money back if something goes wrong with your order.

Enjoy the free features we offer to everyone

  1. Title page

    Get a free title page formatted according to the specifics of your particular style.

  2. Custom formatting

    Request us to use APA, MLA, Harvard, Chicago, or any other style for your essay.

  3. Bibliography page

    Don’t pay extra for a list of references that perfectly fits your academic needs.

  4. 24/7 support assistance

    Ask us a question anytime you need to—we don’t charge extra for supporting you!

Calculate how much your essay costs

Type of paper
Academic level
Deadline
550 words

How to place an order

  • Choose the number of pages, your academic level, and deadline
  • Push the orange button
  • Give instructions for your paper
  • Pay with PayPal or a credit card
  • Track the progress of your order
  • Approve and enjoy your custom paper

Ask experts to write you a cheap essay of excellent quality

Place an order