1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
mamaluj [8]
2 years ago
6

. In the select algorithm that finds the median we divide the input elements into groups of 5. Will the algorithm work in linear

time if we divide it into groups of 7? How about 3? Explain your answer--- the asymptotic run time in either case.
Computers and Technology
1 answer:
8090 [49]2 years ago
5 0

Answer:

we have that it grows more quickly than linear.

Explanation:

It will still work if they are divided into groups of 77, because we will still know that the median of medians is less than at least 44 elements from half of the \lceil n / 7 \rceil⌈n/7⌉ groups, so, it is greater than roughly 4n / 144n/14 of the elements.

Similarly, it is less than roughly 4n / 144n/14 of the elements. So, we are never calling it recursively on more than 10n / 1410n/14 elements. T(n) \le T(n / 7) + T(10n / 14) + O(n)T(n)≤T(n/7)+T(10n/14)+O(n). So, we can show by substitution this is linear.

We guess T(n) < cnT(n)<cn for n < kn<k. Then, for m \ge km≥k,

\begin{aligned} T(m) & \le T(m / 7) + T(10m / 14) + O(m) \\ & \le cm(1 / 7 + 10 / 14) + O(m), \end{aligned}

T(m)

​

 

≤T(m/7)+T(10m/14)+O(m)

≤cm(1/7+10/14)+O(m),

​

therefore, as long as we have that the constant hidden in the big-Oh notation is less than c / 7c/7, we have the desired result.

Suppose now that we use groups of size 33 instead. So, For similar reasons, we have that the recurrence we are able to get is T(n) = T(\lceil n / 3 \rceil) + T(4n / 6) + O(n) \ge T(n / 3) + T(2n / 3) + O(n)T(n)=T(⌈n/3⌉)+T(4n/6)+O(n)≥T(n/3)+T(2n/3)+O(n) So, we will show it is \ge cn \lg n≥cnlgn.

\begin{aligned} T(m) & \ge c(m / 3)\lg (m / 3) + c(2m / 3) \lg (2m / 3) + O(m) \\ & \ge cm\lg m + O(m), \end{aligned}

T(m)

​

 

≥c(m/3)lg(m/3)+c(2m/3)lg(2m/3)+O(m)

≥cmlgm+O(m),

​

therefore, we have that it grows more quickly than linear.

You might be interested in
Technician A says that the reserve rating of a battery is the amount of steady current that a fully charged battery can supply f
Andre45 [30]

Answer:

Neither A nor B

Explanation:

<em>Reserve capacity</em> is the number of minutes that a new, fully charged battery can discharge continuously and maintain a terminal voltage equal to or greater than 1.75 volts per cell.

<em>An ampere-hour </em>is an electric charge unit and its abbreviation is Ah.

It measures the amount of electric charge flowing through a battery in the case that amount supplies a current of 1 amp for 1 hour.

5 0
2 years ago
The operating cost of driving include
blagie [28]
And what is the question?
4 0
2 years ago
What is it called when there are an equal number of characters on either side of the horizontal center of the page?
Naddika [18.5K]

Answer: the term is known as Align Justified

Explanation:

In typesetting and page layout, alignment or range is the setting of text flow or image placement relative to a page, column, table cell, or tab. The type alignment setting is sometimes referred to as text alignment, text justification, or type justification.

5 0
2 years ago
The source Host A is going to send 5KB (5120byte) of data to the destination Host B over an established TCP connection, which ha
NISA [10]

Answer:

the answer is d have a nice day

Explanation: i got a 100

3 0
2 years ago
you just bought a new hard drive for your computer you plan to use this as a secondary hard drive to store all um a files once i
mihalych1998 [28]
Well, you need to partition your hard drive. Partitioning your hard drive designates usable space on your hdd.

And you need to format your hard drive. Formatting installs a file system on to your hard drive, it allows the operating system to read, write and overall understand the data stored on the disk. Without it, an OS cannot keep track of file locations, nor can it typically identify already used sectors (space) on a hdd. 
However, neither of these two concepts are tests.  
7 0
3 years ago
Other questions:
  • What does limited access to a document mean?
    14·2 answers
  • ________ are found on the motherboard and are used to attach your hard disk.
    6·1 answer
  • When you use a script to create all of the tables for a database, you must start with the tables that don't have _______________
    15·1 answer
  • 1. Do you consider Facebook, MySpace, and LinkedIn forms of disruptive or sustaining technology? Why?
    15·1 answer
  • The equation x + y2-4x+2y=b describes a circle.
    8·1 answer
  • As defined by the National Institute of Standards and Technology​ (NIST), "________ is a model for enabling​ ubiquitous, conveni
    11·1 answer
  • According to the video, what kinds of projects would Computer Programmers be most likely to work on? Check all that apply.
    13·2 answers
  • Make a list of five primary raw materials, for each one, indicate and industrial material that is created from it
    10·2 answers
  • Choose all stages of the information processing cycle.
    12·2 answers
  • Which of the following statements is true of San serif fonts?
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!