I am studying quick-sort and analysis its expectation.
The following is quick sort's recurrence.
$$ T(n) = \left\{ \begin{array}{ccc} T(0) + T(n-1)+\Theta(n),\ \ if\ \ 0:n-1\ \ split\\ T(1) + T(n-2)+\Theta(n),\ \ if\ \ 1:n-2\ \ split\\ .\\.\\.\\ T(n-1) + T(0)+\Theta(n),\ \ if\ \ n-1:0\ \ split\\ \end{array} \right. $$
and my text book shortened the equations above like this: $$ X_k = \left\{ \begin{array}{align} 1,\ \ if\ \ Partition\ generates\ a\ k:n-k-1\ split\\ 0,\ \ otherwise \end{array} \right.\\ \therefore T(n)=\sum_{k=0}^{n-1}X_k\left(T(k)+T(n-k-1)+\Theta(n)\right) $$
What is difference between next two? $$\sum_{k=0}^{n-1}X_k\left(T(k)+T(n-k-1)+\Theta(n)\right)\\\sum_{k=0}^{n-1}\left(T(k)+T(n-k-1)+\Theta(n)\right)$$
I think that the right equation is the following: $$ T(n)=T(k)+T(n-k-1)+\Theta(n),\ where\ k\in\{0, 1, 2, \cdot\cdot\cdot, n-1\} $$