I have trouble understanding how to calculate the depth of a sorting network on $n$ inputs.
For example, in case of selection sort, we have:
$\qquad \displaystyle D(n)=D(n-1)+2\\\qquad D(2)=1$
which leads to
$\qquad \displaystyle D(n)=2n-3=\Theta(n)$
I have confirmed that the depth of selection sort is equal to $2n-3$ by hand, but I can't understand how the recurrence $D(n)=D(n-1)+2$ is derived.
