Consider the problem of sorting the matrix n x n(i.e., rows and columns are in ascending order). I want to find the lower and upper bounds of this problem.
I found this to O(n^2 log n)be by simply sorting the elements and then outputting the first elements nas the first row, the next elements nas the second row, etc. however, I want to prove that as well Omega(n^2 log n).
Having tried smaller examples, I think I must prove that if I can solve this problem using less comparisons n^2 log(n/e), this will violate the lower bound log(m!)for comparisons needed to sort the elements m.
Any ideas on how to prove this?
source
share