Sorting 4 values with Min/Max components

Status
Not open for further replies.

EngIntoHW

Member
Hey,

I'm trying to prove that it's you cannot use less than 5 Min/Max components in order to sort 4 input values.

Anyone has an idea how to?

Thank you.

 

Attachments

  • Sort4.jpg
    54.6 KB · Views: 389
Can't you sort A&D and B&C and then sort the two highs and two lows?

Edit, it doesn't work so forget this.

Mike.
 
Last edited:
EngIntoHW,

It takes 1 level of sort to exchange the inputs by one position, such as from A to B. It takes 3 levels of sort to exchange the inputs 3 positions, such as from A to D. Each level except the last needs 2 units because of the 4 inputs. The last needs only one unit because only 2 inputs need to be sorted. That totals 5 units minimum.

Ratch
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…