Design odd-even transposition algorithm, Computer Engineering

Assignment Help:

Q. Design Odd-Even Transposition Algorithm?

Algorithm: Odd-Even Transposition

for I=1 to N

    {      

     If (I%2 != 0) //i.e. Odd phase

           {     

            For j=1, 3, 5, 7,..................2*n/2-1

                    {

                          Apply compare-exchange (Pj, Pj+1)      //Operation is performed in parallel

                    } 

           }              

     else // Even phase

           {     

            For j=2, 4, 6, 8..................2*(n-1)/2-1

                    {

                          Apply compare-exchange (Pj, Pj+1) //Operation is performed in parallel

                    } 

           }

     I++  

   }


Related Discussions:- Design odd-even transposition algorithm

display the contents of the file grade, a) Input names of students from th...

a) Input names of students from the user, terminated by "ZZZ", 0, 0, 0 and create a data file grades with records of the following form: Student (string), test1 (integer), test2 (i

When the get cursor command used in interactive lists, When the get cursor ...

When the get cursor command used in interactive lists? If the hidden information is not enough to uniquely recognize the selected line, the command GET CURSOR is used.  The GET

Types of e-commerce , Types E-commerce generally based on advertising, sell...

Types E-commerce generally based on advertising, selling, marketing and buying, but due to the differences in needs, e-commerce has been classified according to the parties of the

Illustarte basic flip-flops, Q. Illustarte Basic Flip-flops? Let's firs...

Q. Illustarte Basic Flip-flops? Let's first see a ordinary latch. A latch or flip-flop can be created employing two NOR or NAND gates. Figure (a) presents logic diagram for S-R

Explain a macro, Explain a macro Macro is a preprocessor directive, als...

Explain a macro Macro is a preprocessor directive, also called as macro definition takes the following general form:  #define identifier string

Slower layer to a faster layer, Given a four level hierarchical storage sys...

Given a four level hierarchical storage system consisting of: cache,  primary storage, secondary storage, and tertiary storage. Suppose the following:  programs may be executed on

Explain the major consideration of laptop computers, Explain the major cons...

Explain the major consideration of laptop One of the major considerations when buying a laptop is battery life. This can rely on a number of things though one major factor is p

Which scheduler select process from secondary storage device, Which schedu...

Which scheduler selects processes from secondary storage device? Ans. Medium term scheduler selects processes from secondary storage device.

Convert the binary number to gray code, Convert the binary number 10110 to ...

Convert the binary number 10110 to Gray code ? Ans. For changing binary number 10110 in its equivalent Gray code the rules are as, the left most bit that is MSB in Gray code is 1

Define bus, Define bus A group of lines that serves as a connecting pat...

Define bus A group of lines that serves as a connecting path for various devices is known as a bus.

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