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
Sedbober [7]
3 years ago
15

Assuming that a query has a buffer holding up to 3 blocks, and each block can hold two records. Use merge-sort to sort the follo

wing records in ascending order: 10, 11, 1, 5, 90, 1, 2, 101
How many runs will be produced in the whole algorithm and what are the contents of the runs?
Engineering
1 answer:
kipiarov [429]3 years ago
5 0

Answer:

a) 5 runs will be generated.

b) Since the buffer can hold 3 records, the first 3 runs are (1, 10, 11), (1, 5, 90) and (2, 10). Then we need to reserve one block as output buffer, the algorithm can merge two runs at most at the same time. As a result, we can choose to merge the first two runs into a larger one: (1,1,5,10,11,90), which is merged with the run (2, 10) to generate the final output.

Explanation:

5 runs will be generated.

Since the buffer can hold 3 records, the first 3 runs are (1, 10, 11), (1, 5, 90) and (2, 10). Then we need to reserve one block as output buffer, the algorithm can merge two runs at most at the same time. As a result, we can choose to merge the first two runs into a larger one: (1,1,5,10,11,90), which is merged with the run (2, 10) to generate the final output.

You might be interested in
Based on your client's request, you will now create a sketch model of your designed pet toy. You will use your technical sketch
mr_godi [17]

Answer:

From this in-depth examination we aimed to draw out some of the key ... closely their business case and employ model makers to create a 3D prototype.

Explanation:

8 0
3 years ago
Which activity promotes the preservation of species
miv72 [106K]

Answer:

A

Explanation:

8 0
3 years ago
What happens when force is placed on a square/rectangle?
mart [117]

im not sure i need to see a photo and also is this science

7 0
3 years ago
Read 2 more answers
Consider a system having p processes, where each process needs a maximum of m instances of resource type R1. Given that there ar
Genrish500 [490]

Answer:

Consider a system consisting of 4 resources of same type that are share by 3 processes each of which needs at most two resources.Now we will show that the system is deadlock free.

If the system is deadlocked, it implies that each process is holding one resource and is waiting for one more. Since there are 3 processes and 4 resources, one process must be able to obtain two resources. This process requires no more resources and therefore it will return its resources when done.

Consider a system with m resources of same type being shared by n processes. Resources can be requested and released by processes only on at a time. The system is deadlock free if and only if The sum of all max needs is < m+n .

We can understand the notion of a deadlock from the following simple real-life example.To be able to write a letter one needs a letter pad and a pen. Suppose there in one letterpad and one pen on a table with two persons seated around the table. We shall identify these two persons as Mr. A and Ms. B. Both Mr. A and Ms. B are desirous of writing a letter. So both try to acquire the resources they need. Suppose Mr. A was able to get the letter pad. In the meantime, Ms. B was able to grab the pen. Note that each of them has one of the two resources they need to proceed to write a letter. If they hold on to the resource they possess and await the release of the resource by the other, then neither of them can proceed. They are deadlocked. We can transcribe this example for processes seeking resources to proceed with their execution. Consider an example in which process P1 needs three resources r1 ; r2, and r3 before it can make any further progress. Similarly, process P2 needs two resources r2 and r3 Also, let us assume that these resources are such that once granted, the permission to use is not withdrawn till the processes release these resources. The processes proceed to acquire these resources. Suppose process P1 gets resources r1 and r3 and process P2 is able to get resource r2 only. Now we have a situation in which process P1 is waiting for process P2 to release r2 before it can proceed. Similarly, process P2is waiting for process P1 to release resource r3 before it can proceed. Clearly, this situation can be recognized as a deadlock condition as neither process P1 nor process P2 can make progress. Formally, a deadlock is a condition that may involve two or more processes in a state such that each is waiting for release of a resource which is currently held by some other process.

5 0
3 years ago
If the atomic radius of copper is 0.128 nm, calculate the volume of its unit cell in cubic meters.
Alex_Xolod [135]

Answer:

Volume of face centered cubic cell=4.74531*10^{-29} m^3

Explanation:

Consider the face centered cubic cell:

1 atom at each corner of cube.

1 atom at center of each face.

Consider the one face (ABCD) as shown in attachment for calculation:

Length of the all sides of face centered cubic cell is L.

Volume of face centered cubic cell= L^3

Now Consider the figure shown in attachment:

According to Pythagoras theorem on ΔADC.

L^{2}+L^2=(4a)^2     (a is the atomic radius)

L=\frac{4a}{\sqrt{2}} (Put in the formula of Volume)

Volume of face centered cubic cell= L^3

Volume of face centered cubic cell= (\frac{4a}{\sqrt{2}})^3

Volume of face centered cubic cell= (\frac{4(0.128*10^{-9}}{\sqrt{2}})^3

Volume of face centered cubic cell=4.74531*10^{-29} m^3

3 0
4 years ago
Other questions:
  • Two plates are separated by a 1/4 in space. The lower plate is stationary; the upper plate moves at 10 ft/s. Oil (viscosity of 2
    10·1 answer
  • The longest_word function is used to compare 3 words. It should return the word with the most number of characters (and the firs
    8·1 answer
  • A 10-mm steel drill rod was heat-treated and ground. The measured hardness was found to be 290 Brinell. Estimate the endurance s
    14·1 answer
  • Given the circuit at the right in which the following values are used: R1 = 20 kΩ, R2 = 12 kΩ, C = 10 µ F, and ε = 25 V. You clo
    11·1 answer
  • A sky diver with a mass of 70 kg jumps from an aircraft. The aerodynamic drag force acting on the sky diver is known to be FD =k
    9·1 answer
  • Water vapor at a rate of 40,000 kg/h and at 8 MPa and 500 C enters an adiabatic turbine and leaves the turbine at 40 kPa as satu
    8·1 answer
  • A three-phase transformer connection has a delta-connected secondary, and one of the transformers has been center-tapped to form
    10·1 answer
  • 4.
    10·1 answer
  • Engineering includes making things that already exist, except making them better. * true or false
    8·1 answer
  • Jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!