I have a problem understanding how the following inequalities highlighted in red were derived for this asymptotic analysis problem. Could someone explain the nature of these inequalities and how they came to be.
The following picture has the problem and solution. The part highlighted in red is where I am having trouble understanding.
Picture of the problem and solution
Preparations
The part in the image above, above the red-marked section, is the very definition for the Big-Θ notation: "
f(n)
inΘ(g(n))
", withWe'll repeat this inequality to simplify reference when showing that it holds below:
Hence, we want to find some
c_1
,c_2
andn_0
such that(*)
holds.Solution (thoroughly explained)
Now, since
b > 0
, we can prove that(*)
holds if the follow two inequalities hold:for some positive constants
k_1
andk_2
(which relates toc_1
andc_2
ask_1^b = c_1
andk_2^b = c_2
, respectively).Showing that
(ii)
holdsWe'll begin with showing that
(ii)
holds for some positive constantk_1
. To do this, we can freely choosen_0
such thatn_0 ≥ |a|
(sincea
is just a constant).Now, with
(II)
we have showed that(ii)
holds, withk_1 = 2
andn_0
being any value larger thanabs(a)
,n_0 ≥ |a|
.Showing that
(i)
holdsNow for showing
(i)
: we start by noting that the following inequality always holds:(and is in fact equality if
a
is negative). Now, recall from above that(II)
holds for anyn_0 ≥ |a|
. Alright, lets choose to fix ourn0
at2⋅|a|
(note again: we can freely choose the constants we want to show that inequalities(*)
holds).Hence, from
(†)
:And
(I)
now is simply(i)
fork_2 = 1/2
andn_0 = 2⋅|a|
.Wrapping up
We summarize:
With
(**)
, we have showed that(*)
holds, withHence, we have showed that
f(n)
as in(+)
is inΘ(g(n))
, withg(n)
as in(++)
.Finally note that the choices of constants
c_1
,c_2
(k_1
,k_2
) andn_0
in(*)
is not-unique: there exist infinitely many ways to show that(*)
holds (if it does), or it exists none. The particular choices by the author of your solution just comes naturally in this case, but we could've chosen any number of other set of constants.