Why it matters

Sorting networks enable parallel + hardware. Understanding shapes parallel.

Advertisement

The architecture

Sequence of comparators (compare + swap).

Fixed structure irrespective of input.

Depth vs size trade-off.

Sorting network structureFixed comparatorscompare-swap opsDepthparallel stepsSizetotal comparatorsBitonic + Batcher common; AKS optimal but impractical; hardware + SIMD sort
Sorting networks.
Advertisement

How it works end to end

Bitonic: O(n log^2 n) size, O(log^2 n) depth.

Batcher's merge-exchange.

AKS O(n log n) theoretical.

SIMD implementations.