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]
3 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]3 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
What is the output of the code? (CHECK IMAGE)
PIT_PIT [208]

Answer:

689

Explanation:

8 0
3 years ago
This is tech question related to mobile and PC.
love history [14]

I am guessing the bluetooth process is same as usb proccess. So when i transfered a video via usb and took out the usb (for apple phone), there <u>was</u> a file but when i clicked it it said that the phone isn't plugged in

4 0
3 years ago
18
agasfer [191]

Answer:

Plagiarism; meaning

Explanation:

plagiarism is presenting someone else's work or ideas as your own with or without their consent by incorporating it into your work without full acknowledgement.

7 0
3 years ago
List out the input and output device .​
Dmitry [639]

Computer - Input Devices

Keyboard.

Mouse.

Joy Stick.

Light pen.

Track Ball.

Scanner.

Graphic Tablet.

Microphone.

Computer - Output Devices

Monitor.

Printer.

Headphones.

Computer Speakers.

Projector.

GPS.

Sound Card.

Video Card.

5 0
3 years ago
Read 2 more answers
Fill in the blanks Pasaline could ----- and ------- very easily.​
Artemon [7]

Answer:

<h2>Hot you too friend's house and be safe and have a great time to take care of the following is not a characteristic it was a circle whose equation o</h2>
6 0
3 years ago
Other questions:
  • Smartphones can have virtual keyboards or physical keyboards. What are 3 advantages and disadvantages to each one?
    13·1 answer
  • If you bury a story on digg what have you done?
    7·2 answers
  • Consider the following 32 bit binary representation of the value using IEEE 754 single precision floating point representation.
    15·1 answer
  • When would an absolute cell reference be most helpful?
    12·2 answers
  • What are the advantages of using the internet as theinfrastructure for electronic commerce and electronicbusiness?
    6·1 answer
  • Task 1: Alex has created the following code using Scratch and expected it to move backwards and forwards across the screen. Howe
    13·1 answer
  • The action displayed in the status bar while pointing-
    7·1 answer
  • Which company introduce the first Minicomputer in 1960.​
    8·2 answers
  • What is a "Top-Level Domain Name"?
    12·1 answer
  • "The constructor signature is defined as the constructor __________ followed by the __________. (3 points)
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!