I'm working on a homework problem that has me showing a "$\Omega(n\log k)$ lower bound on the number of comparisons needed to sort a sequence of $n$ elements, when the input sequence consists of $\frac{n}{k}$ subsequences each containing $k$ elements. Each element in a subsequence will be larger than its preceding subsequence and smaller than its succeeding subsequence."
Essentially, I just need to sort $k$ elements in each of the $\dfrac{n}{k}$ subsequences.
I realize that to do this I need to show that the maximum possible height of a binary tree $2^h \geq (k!)^{n/k}$. I did this to try and solve it (assuming we are using $\log_2x)$:
$\log(2^h) \geq \log((k!)^{n/k})$
$h \geq \dfrac{n}{k}\log(k!)$
This is as far as I got. However, my professor told me that in order to solve the problem I would need to prove that for all $k$, $k! \geq \left(\dfrac{k}{2}\right)^{k/2}$
I can obviously see why this would be true, but I don't really know how to prove it. Looking it up online I found an answer that someone posted stating:
(1)$\qquad$ $k! = k(k-1)(k-2)\ldots(2)(1)$
(2)$\qquad$ $k! \geq k(k-1)(k-2)\dots\left(\dfrac{k}{2}\right)$
(3)$\qquad$ $k! \geq k(k-1)(k-2)\ldots\left(\dfrac{k}{2}\right) \geq \left(\dfrac{k}{2}\right)\left(\dfrac{k}{2}\right)\ldots\left(\dfrac{k}{2}\right)$
(4)$\qquad \geq \left(\dfrac{k}{2}\right)\left(\dfrac{k}{2}\right)\ldots\left(\dfrac{k}{2}\right) = \left(\dfrac{k}{2}\right)^{k/2}$
For (2), half of terms are greater than $\frac{k}{2}$ and half are smaller drop all terms less than $k$
Since $\dfrac{k}{2} \geq k$ we can write (3)
From this answer I know that by plugging in $\dfrac{k}{2}$ for $k!$ in the original equation will give me the answer $\dfrac{n}{2}\log\left(\dfrac{k}{2}\right)$. But I don't understand why we dropped half of $k!$ and how we could know that $\dfrac{k}{2} \geq k$. I understand part (4) but I don't really understand the transformations taking place in between (1) and (2), and (2) and (3).
It often helps to do a small concrete example. Let us do $k=8$. We are trying to show that $8! \gt 4^4$ You have $8!=8 \cdot 7 \cdot 6 \cdot 5 \cdot 4 \cdot 3 \cdot 2 \cdot 1$ The first $4$ factors are all greater than $4$ and the last four factors are all at least. $1$ So $8!=8 \cdot 7 \cdot 6 \cdot 5 \cdot 4 \cdot 3 \cdot 2 \cdot 1\gt 4 \cdot 4 \cdot 4 \cdot 4 \cdot 1 \cdot 1 \cdot 1 \cdot 1=4^4$ The same thing is happening in the general proof. The first $\frac k2$ terms in the factorial are greater than $\frac k2$ and the last $\frac k2$ terms are at least $1$. When we replace the terms, we are decreasing the product. When we wind up with $(\frac k2)^{(\frac k2)}$ we know that is smaller than $k!$