sorting circuit along with odd-even merging circuit, Computer Networking

Assignment Help:

As we previously know, the merge sort algorithm needs two circuits, i.e. one for merging and second for sorting the sequences. Thus, the sorting circuit has been derived from the above-discussed merging circuit. The useful steps followed by the circuit are given below:

i) The given input series of length n is separated into two sub-sequences of length n/2 each.

ii) The two sub series are recursively sorted.

iii) The two sorted sub series are merged (n/2,n/2) using a merging circuit in order to finally get the sorted series of length n.

Now, let us take an instance for sorting the n numbers say 4,2,10,12 8,7,6,9. The circuit of sorting + merging given series is illustrated in Figure.

Analysis of Merge Sort

i)          The width of the sorting + merging circuit is equivalent to the maximum number of devices needs in a stage is O (n/2). As in the above figure the maximum number of devices for a given stage is 4 which is n/2or8/2.

ii)      The circuit has two sorting circuits for sorting series of length n/2 and after that one merging circuit for merging of the two sorted sub series (see stage 4th in the above figure). Let the functions Tm and Ts denote the time complexity of merging and sorting in terms of its depth.

The Ts can be calculated as follows: Ts (n) =Ts (n/2) + Tm (n/2) Ts (n) =Ts (n/2) + log (n/2),

Thus, Ts (n) is equal to O(log2 n).

640_Sorting + Merging Circuit.png

                                                                   Sorting + Merging Circuit


Related Discussions:- sorting circuit along with odd-even merging circuit

How two adjacent layers communicate in a layered network, How two adjacent ...

How two adjacent layers communicate in a layered network? (or What do you mean by Service Access Point?) In layered network, each layer has lots of entities and entities of lay

Calculate output voltage amplitude from the circuit, Question The circu...

Question The circuit in the figure is driven by a 9 mV amplitude signal generator with an output impedance of 2 kW. What is the output voltage amplitude from the circuit in the

Database management, today, what is the most common or mostly encountered p...

today, what is the most common or mostly encountered problem in terms of database management system?

Calculate the total latency, a) Consider that a host is sending a frame of ...

a) Consider that a host is sending a frame of 1200 bytes to another host found 20 Kilometers away. (Assume that switching delay is negligible) i) Calculate the total latency (

Vpn technology - point to point , VPN Technology For an organization  ...

VPN Technology For an organization  VPN  technology  uses some main  techniques for privacy a.Encryption /Authentication b.Tunnelling c.Fire walls

What is crc and checksum, What is CRC and Checksum CRC (Cyclic redudan...

What is CRC and Checksum CRC (Cyclic redudancy check) CRC, is the most powerful of the redundancy checking methods, is based on binary division. Checksum Checksum

Topology, bus topology disadvantage?

bus topology disadvantage?

Packet switching, Suppose there are exactly five packet switches (Figure 4)...

Suppose there are exactly five packet switches (Figure 4) between a sending host and a receiving host connected by a virtual circuit line (shown as dotted line in figure 4). The tr

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd