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
AlekseyPX
4 years ago
13

You need to sort a file of n GB file stored on a hard-drive. Your RAM contains only 5GB. You have a lightning-fast CPU, but writ

ing or reading from the disk (a single I/O operation) is slow. So we estimate the number of I/O, and ignore CPU time. For simplicity, assume your disk is partition into blocks, each of size 1GB. In each I/O operation, you could read or write one block. The input file occupies the blocks b_1 ellipsis b_n. Explain how to sort the file, using O(nlogn) I/O operations. You could assume that your hard-drive contains n blocks of free space f_1, f_2, ellipsis, f_n Ignore caching issues.
Engineering
1 answer:
ale4655 [162]4 years ago
8 0

Answer:

It is given that:

  • There are "n" GB data need to be sorted.
  • The data is divided into blocks "n" blocks each of 1 GB.
  • Thus data need to be sorted based on the block contents.
  • There are n" blocks each of 1 GB is free on the hard-disk.

Steps to follow to perform the sorting of the data stored In the hard-drive:

  • Divide the blocks to be sorted into set of five blocks, here divide the blocks into n/2
  • sets.
  • 5 GB RAM can access the data fast and perform the sort of the each 2 block sets.
  • Now each of the 2 block sets are sorted based on the block number.
  • Take adjacent two sorted individual 2-blocks from the hard disk and perform the sort operation on the combined block and make them sorted.
  • Continue the merging of individually sorted blocks from 2, 4, 8, 16.  n/2.
  • After "log n " merge operations the blocks will be sorted.

Explanation of complexity of the procedure:

  • The data is divided into chunks of 5 block sets.
  • Each set need to be sorted individually, and 5 GB ram can handle the sorting or each two blocks, thus it will take 2 I/O operations in each block sort.
  • There are "n/2" blocks will be there with 2 I/0 operations each collectively it will take n I/O operations.
  • The merging of the sorted blocks will take "log_{2}n" operations.
  • The comparison and copying operation may have to be performed at each merging stage.
  • Thus total I/O operation required will be "n*logn".

You might be interested in
Substances A and B have retention times of 16.63 and 17.63 min, respectively, on a 30 cm column. An unretained species passes th
Svet_ta [14]

Answer:

The time required to elute the two species is 53.3727 min

Explanation:

Given data:

tA = retention time of A=16.63 min

tB=retention time of B=17.63 min

WA=peak of A=1.11 min

WB=peak of B=1.21 min

The mathematical expression for the resolution is:

Re_{s} =\frac{2(t_{B}-t_{A})}{W_{A}+W_{B} } =\frac{2*(17.63-16.63)}{1.11+1.21} =0.8621

The mathematical expression for the time to elute the two species is:

\frac{t_{2}}{t_{1}} =(\frac{Re_{B} }{Re_{s} } )^{2}

Here

ReB = 1.5

t_{2} =t_{1} *(\frac{Re_{B} }{Re_{s} } )^{2} =17.63*(\frac{1.5}{0.8621} )^{2} =53.3727min

6 0
3 years ago
explain each of the following kinds of rockets: Solid-Fuel Rocket, Liquid-Fuel Rocket, Ion Rocket and Plasma Rocket.
Rudik [331]

Answer:

ur answer friend

Explanation:

answer

<em>S</em><em>o</em><em>l</em><em>i</em><em>d</em><em>-</em><em>F</em><em>u</em><em>e</em><em>l</em><em> </em><em>R</em><em>o</em><em>c</em><em>k</em><em>e</em><em>t</em><em> </em><em>-</em><em> </em>a solid-propellant rocket or solid rocket is a rocket with a rocket engine that uses solid propellants. The earliest rockets were solid-fuel rockets powered by gunpowder; they were used in warfare by the Chinese, Indians, Mongols and Persians, as early as 13th century.

<em>L</em><em>i</em><em>q</em><em>u</em><em>i</em><em>d</em><em>-</em><em>F</em><em>u</em><em>e</em><em>l</em><em> </em><em>R</em><em>o</em><em>c</em><em>k</em><em>e</em><em>t</em><em> </em><em>-</em><em> </em>a liquid-propellant rocket or liquid rocket utilizes a rocket engine that use liqiud propellants. An inert gas stored in a tank at a high pressure is sometimes used instead of pumps in simpler small engines to force the propellants into the combustion chamber.

<em>I</em><em>o</em><em>n</em><em> </em><em>R</em><em>o</em><em>c</em><em>k</em><em>e</em><em>t</em><em> </em><em>-</em><em> </em>an ion thruster or ion drive is a form of electric propulsion used for spacecraft propulsion. It creates thrust by accelerating ions using electricity. The Deep Space 1 spacecraft, powered by an ion thruster, changed velocity by 4.3 km/s ( 9600 mph ) while consuming less than 74 kg ( 163 lb ) of xenon.

<em>P</em><em>l</em><em>a</em><em>s</em><em>m</em><em>a</em><em> </em><em>R</em><em>o</em><em>c</em><em>k</em><em>e</em><em>t</em><em> </em><em>-</em><em> </em>in this type of rocket, a combination of electric and magnetic fields are used to break down the atoms and molecules of a propellant gas into a collection of particles that have either a positive charge (ions) or a negative charge (electrons). In other words, the propellant gas becomes a plasma.

I think its helpful to you

Please mark as brainliest answer

5 0
3 years ago
1. Present the pros and cons of an employer participating in the OSHA Voluntary Protection Program (VPP) or the Star Program. Ba
algol13

Answer:

kohjhfg do gm gm gm tm yl tm yk 9k umm yk to gm I'm y dm b do di Cy do do do do di du t6

3 0
2 years ago
Read 2 more answers
Type the correct answer in the box. Spell the word correctly. What is the best option possible for Gary to create an effective p
tresset_1 [31]

Answer:

Computer Aided Design (CAD)

Explanation:

The computer-aided design, CAD, tools are design and technical documentation technology, that makes use of an automated drafting process of drafting, rather than a manual drafting process.

Computer-aided design programs include CAD programs with 2D and/or 3D capability such as AutoCAD LT, AutoCAD, and SmartDraw which are common construction documentation drafting application with which concepts and ideas can be created and visualized

Therefore, we have;

He would use <u>Computer-Aided-Design (CAD)</u> tools to create accurate and uniform technical drawings for his device.

8 0
3 years ago
An inductor is connected to a voltage source and it is found that it has a time constant, t. When a 10-ohm resistor is placed in
prisoha [69]

Answer:

A) 30 mH

B ) 10-ohm

Explanation:

resistor = 10-ohm

Inductor = 30mH ( l )

L = inductance

R = resistance

r = internal resistance

values of the original Inductors

Note : inductor = constant time (t)  case 1

inductor + 10-ohm resistor connected in series = constant time ( t/2) case2

inductor + 10-ohm resistor + 30 mH inductance in series = constant time (t) case3

<em>From the above cases</em>

case 1 = time constant ( t ) = L / R

case 2 = Req = R + r hence time constant  t / 2  = L / R + r  therefore

t = \frac{2L}{R+r}

case 3 = Leq = L + l , Req = R + r .  constant time ( t )

hence Z = \frac{L + l}{R + r} = t

A) Inductance

To calculate inductance equate case 1 to case 3

\frac{L}{R} = \frac{L + l}{R + r} =   L / 10 = (L + 30) / ( 10 + 10 )

= 20 L = 10 L + 300 mH

   10L = 300 m H

therefore L = 30 mH

B ) The internal resistance

equate case 1 to case 2

\frac{L}{R} = \frac{2L}{R + r}

R + r = 2 R  therefore  ( r = R )   therefore internal resistance = 10-ohm

6 0
3 years ago
Other questions:
  • Main technologies used in atms vending machines game consoles and microwave ovens
    6·1 answer
  • Which of the following vehicles has no emissions?
    9·1 answer
  • I WILL GIVE 20 POINTS!!
    11·2 answers
  • The lattice constant of a simple cubic primitive cell is 5.28 Å. Determine the distancebetween the nearest parallel ( a ) (100),
    13·1 answer
  • How can I solve 23.5 million Nona meters to millimeters using no calculator because I have to show my work
    15·2 answers
  • Define the Artist class in Artist.py with a constructor to initialize an artist's information. The constructor should by default
    7·1 answer
  • How can we calculate the speed of the output gear in a simple gear train? Explain with the help of an example.
    7·1 answer
  • How much does it cost to replace a roof on a 2,200 square foot house.
    10·1 answer
  • Question is written in following attached screenshot.
    10·1 answer
  • What is the name of this piece?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!