Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

One of the best known methods for external sorting on tapes is the polyphase sort.

Principle: The basic strategy of this sort is to distribute ordered initial runs of predetermined size on the available tapes and then to repeatedly merge these runs in multiple phases in which each phase has a predetermined number of merges before a new target tape is selected.

To distribute the initial runs a Fibonacci distribution is adopted. After the distribution of the runs according to Fibonacci distribution, the merging procedure is continued until the tape with the least number of run lists is empty. When this occurs the remaining working tapes are logically rotated such that the newly emptied tape becomes the new target tape and the old target tape then becomes one of the working tapes to be merged. The sort ends when all runs are merged into one.

Let the number of tapes be T and p = T - 1. The Fibonacci distribution for p = 3 is given.

Level

s
Tape
Total number of runs
1
2
3
1
0
0
1
1
2
1
1
1
3
3
1
2
2
5
4
2
3
4
9
5
4
6
7
17
6
7
11
13
31
7
13
20
24
57
8
24
37
44
105
9
44
68
81
193
Algorithm:

1. Let A be the list of N unsorted elements and R be the number of runs.

2. Let T1, T2, T3 and T4 be the tapes on which sorting is done.

3. Split the list A into R=N runs so that each run has only one element.

4. If R is not equal to perfect Fibonacci distribution then add dummy records to bring up perfect Fibonacci distribution.

5. Distribute the records in the remaining tapes according to the Fibonacci distribution.

6. Merge 3 runs, one from each tape and put into next empty tape.

7. Repeat step 6 till a single run is generated.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9612811

Have any Question?


Related Questions in Computer Engineering

Software engineering software architecture questioncan

(Software engineering (Software Architecture) question) Can someone explain how a system's decomposition into components is driven by the system's features/requirements. Also, how can this decomposition be used to determ ...

Question whether in a scholarly or practitioner setting

Question: Whether in a scholarly or practitioner setting, good research and data analysis should have the benefit of peer feedback. For this Discussion, you will post your response to the hypothesis test, along with the ...

Decision support systems vary greatly in application and

Decision support systems vary greatly in application and complexity, but they all share specific features. A typical Decision support systems has four components: data management, model management, knowledge management a ...

Question suppose you are given a turing machine m not

Question : Suppose you are given a Turing machine M (not necessarily a decider), a string w, and a magic genie. You can ask the magic genie whether a certain Turing machine halts on a certain input string, and the genie ...

What is equi-marginal principle why does it have to be true

What is Equi-marginal principle? Why does it have to be true at interior optimum?

Question a series of information frames with a mean length

Question : A series of information frames with a mean length of 1000 bits is to be transmitted across a data link 4000km long at a data rate of 2Mbps. If the link has a velocity of propagation of 2 *10 8 ms -1 and a BER ...

Why are standards needed in data communication and

Why are standards needed in data communication and networking? What are the advantages and disadvantages of standards? How do standards fit in with regulations at the federal, manufacturing, and organizational levels? Gi ...

Question unless otherwise stated answer in complete

Question: Unless otherwise stated, answer in complete sentences, and be sure to use correct English spelling and grammar. Sources must be cited in APA format. Your response should be four (4) pages in length; refer to th ...

Question you work for a multi-state company with three

Question: You work for a multi-state company with three sites in three different states, 1,000 employees, an ERP application with a backend database, and two datacenters. Prepare a 2 Page Disaster Recovery and Business C ...

Assignmentnbspon information systems audit and

Assignment  on Information Systems audit and controls Assignment purpose: Elaborate on the different types of control that are applied in a hospital (Preventive, detective and corrective control). Evaluate the logical an ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As