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
bezimeni [28]
3 years ago
7

Let T(n) denote the running time for the Sort-and-Count algorithm (below). Sort-and-Count(L) { if list L has one element return

0 and the list L Divide the list into two halves A and B (r1, A) = Sort-and-Count(A) (r2, B) = Sort-and-Count(B) (r3, L) = Merge-and-Count(A, B) r = r1+r2+r3 return r and the sorted list L } Assuming that Merge-And-Count(A,B) runs in time Al+IB| what is the recurrence for T(n)? T(n) = 2T(n/2)+1 T(n)=(n/2) + n T(n) = 2T(n-1) + 1 T(n) = Tỉn/2)+1 - T(n) = 2T(n/2) + n T(n) = 2T(n/2)+log n
Computers and Technology
1 answer:
butalik [34]3 years ago
7 0

Answer:

The answer is "\bold{T(n) = 2T(\frac{n}{2}) + n}"

Explanation:

Given:

The Merge-And-Count of (A,B) runs in time |Al+IB|

T(n) recurrence=?

Calculating the value of the recurrence:

\to  T(n) = T(\frac{n}{2}) + T(\frac{n}{2}) + f(|A| + |B|)\\\\  \therefore f(|A| + |B|) = n\\\\ \to T(n) = 2T(\frac{n}{2}) + n

You might be interested in
What is the purpose of the operating systems management function
PIT_PIT [208]
The purpose of the operating systems is to provide an interface between the user and hardware. It's mange all resources, for example; memory, processors, and disk space. It's also mange how to file and store data in a computer system.
3 0
4 years ago
What is the most important thing you should avoid when you store files and folders?
iVinArrow [24]
Getting hacked by someone
4 0
3 years ago
What is used to give credit to the source from which information is obtained?
Sati [7]
The Answer is (A) because a citation gives credit to the sources from which your information was obtained. Linkage has nothing to do with it... Plagiarism is the exact opposite of that.... And a format is just a way something is in order or arranged.
8 0
3 years ago
When an object is falling because of gravity, the following formulacan be used to determine the distance the object falls in asp
ser-zykov [4K]

Answer:

True

Explanation:

When an object is falling under the influence of gravity, the distance of fall as a function of time is given by:

D(t)=ut + 1/2 * a * t^2

Where

u = initial velocity of the object ( = 0 in this case as the object is falling only under gravity),

a = acceleration of the falling object = g = 9.8 m/s^2 which represents the acceleration due to gravity.

Simplifying,

D(t) = 1/2 * g * t^2

6 0
3 years ago
What must you do before formatting a paragraph?
pshichka [43]
Hello,

A paragraph in Word is any text that ends with a hard return. You insert a hard return anytime you press the Enter key. Paragraph formatting letsyou control the appearance if individual paragraphs. For example,you can change the alignment of text from left to center or the spacing between lines form single to double :)
5 0
4 years ago
Read 2 more answers
Other questions:
  • What type of video games do you prefer buying?
    14·1 answer
  • This is not based on homework but I have a question. I am currently using a gtx 960 with a 6 core amd processor. Does anyone kno
    6·1 answer
  • A laptop computer communicates with a router wirelessly, by means of radio signals. the router is connected by cable directly to
    10·1 answer
  • Name all mario kart games in order
    15·2 answers
  • Write a program in python to accept three numbers and print the largest of the three
    10·1 answer
  • When creating envelopes, how will you adjust the layout?
    10·2 answers
  • The names of the governing body or organizationds that creates rules for information technology and information communication te
    9·1 answer
  • Strong linkages to customers and suppliers decrease switching costs. true or false
    15·1 answer
  • The _____ describes how data actually moves from an application on one computer to an application on another networked computer.
    9·1 answer
  • Below you will find the requirements to identify the Account Diversity Grade of a user. Read the requirements carefully and iden
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!