# I'm facing a question with comparison networks. Find second and third min.

a. prove that depth of a comparison network that will find values of seond and third minimum is Omega(lg n).
b. build such a network.

I need a hand here.

http://en.wikipedia.org/wiki/File:Six-wire-bubble-sorting-network.svg
LVL 10
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
Could you do it for the first minimum?
Do that and then remember that Omega(3 lg n) = Omega(lg n)
0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Author Commented:
And why is finding the first minimum is Omega(n) in network depth?
You need only n/2 comparators for that.
0
Commented:
Omega(n) = Omega(n/2) but the depth of a comparison network for the first minimum is Omega(lg n)
0
Author Commented:
ozo:
I know that the depth is Omega(lg n), I'm asked to prove that. And build such a network.
0
Author Commented:
If anybody likes to hear it, I'll be more than happy.
0
Commented:
Can you find an Omega(lg n) depth network for the first minimum?
0
Author Commented:
Yes, that's what I have found.  Attached is an example for N=8.
first-min.jpg
0
Commented:
And does TommySzalapski's hint suggest a way to modify that yo find the second and third minimum?
0
Author Commented:
No, he only pointed out that if you can do it for the first it's no problem to do the second and third. But that wasn't what I asked. I asked to do it for the minimum in the first place.

Anyway, thank you all for your time, points will be split.
0
Author Commented:
Thanks again.
0
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Math / Science

From novice to tech pro — start learning today.