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

Define decoder, Define Decoder? A device or program that translates enc...

Define Decoder? A device or program that translates encoded data into its original format (e.g. it decodes the data). The term is often used in reference to MPEG-2 video and so

Client-server , We need to design and implement a secure conference system....

We need to design and implement a secure conference system. The system will allow users to connect to a conference server and to participate in a shared conversation. The conversat

Explain repeaters, Repeaters - Operate only in physical layer - Conn...

Repeaters - Operate only in physical layer - Connects two segments of the same LAN - Both segments must be of the same protocol - Only forwards frames; does not filter

What is stop-and-wait protocol, What is Stop-and-Wait Protocol? In Stop...

What is Stop-and-Wait Protocol? In Stop and wait protocol, sender sends single frame, waits unless it receives confirmation from the receiver (okay to go ahead), and then sends

Define internet network address, Q. Define internet network address? ...

Q. Define internet network address? The internet network address is additional commonly called the -IP address.? It consists of 32 bits a few of which are allocated to a hi

Write the definition of ipx and udp, Write the definition of IPX and UDP ...

Write the definition of IPX and UDP IPX: Inter-network Packet Exchange supports the transport and network layers of the OSI network model. It provides fast, unreliable, communi

How are enterprise systems different, Question : (a) How do you relate ...

Question : (a) How do you relate the subsequent terms in the context of an information system: data, information and decision-making. (b) Why do you think organisations nowa

Nfs, what is this ?

what is this ?

Command to view the configuration-register value, Recognize the command to ...

Recognize the command to view the configuration-register value Ans) show version is the command to view the configuration-register value

Print Servers, Which of the following commands will display the current pri...

Which of the following commands will display the current print jobs on a printer named Office Printer 01?

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