Pick a "c" and "n" for the problem below.
f(n) = 2nlgn, g(n) = n^2-n
My answer is below, but I am not sure if I am correct. I've been trying to figure out this same problem for a while. The real solution is at the bottom, but I don't know how 2nlgn turned into 2n^2.Any help or suggestions is appreciated.
f(n) = 2nlgn, g(n) = n^2-n
2nlgn <= cn^2-n
2nlgn/n^2 + n/n^2 <= cn^2/n^2
2nlgn/n^2 + 1/n <= c
1 <= 1
c = 1, n = 1
Real solution:
2n lg n <= 2nn <= 2n^2 <= 3(n^2-n) n >= 3