We present the first construction for sorting and counting networks of arbitrary width that requires both small depth and small constant factors in the depth expression. Let ω be the product ω = p0 · p1 ⋯ pn-1, whose factors are not necessarily prime. We present a novel network construction of width ω and depth O(n2) = O(log2 ω), using comparators (or balancers) of width less than or equal to max(Pi). This construction is practical in the sense that the asymptotic notation does not hide any large constants. An interesting aspect of this construction is that it establishes a family of sorting and counting networks of width ω, one for each distinct factorization of ω. A factorization in which max(pi) is large and n is small yields a network that trades small depth for large comparators (or balancers), and a factorization where max(pi) is small and n is large makes the opposite tradeoff.
ASJC Scopus subject areas
- Theoretical Computer Science
- Computational Theory and Mathematics