patternMinor
Asymptotics of a recurrence defined with two variables
Viewed 0 times
withrecurrencetwovariablesasymptoticsdefined
Problem
What is the asymptotic behaviour, in Θ notation, of the smallest function that for any $n_1$ and $n_2$ satisfies the following:
$$t(n_1+n_2)≥t(n_1)+t(n_2)+c·\log_2(1+n_2)$$
where $n_1≥n_2≥1$ and $t(1)=1$
I tried to see what happens if $n_1 = n_2$:
$$t(2n)≥t(n)+t(n)+c·\log_2(1+n)$$
$$t(n)≥2t(n/2)+c·\log_2(1+n/2)$$
Also if $n_2=1$:
$$t(n+1)≥t(n)+t(1)+c·\log_2(2)$$
$$t(n)≥t(n-1)+1+c$$
But I am not sure where to go next, or if this is a correct approach.
$$t(n_1+n_2)≥t(n_1)+t(n_2)+c·\log_2(1+n_2)$$
where $n_1≥n_2≥1$ and $t(1)=1$
I tried to see what happens if $n_1 = n_2$:
$$t(2n)≥t(n)+t(n)+c·\log_2(1+n)$$
$$t(n)≥2t(n/2)+c·\log_2(1+n/2)$$
Also if $n_2=1$:
$$t(n+1)≥t(n)+t(1)+c·\log_2(2)$$
$$t(n)≥t(n-1)+1+c$$
But I am not sure where to go next, or if this is a correct approach.
Solution
Interesting recurrence. Let's take a crack at this. Just a heads up, this answer is a bit wordy/explicit.
Clearly the first issue/difficulty is that we're trying to define this in terms of two variables ($n_1, n_2$). This seems hard so let's go ahead and redefine this relation:
$$t(n_1 + n_2) \geq t(n_1) + t(n_2) + c \log_2(1 + n_2)$$
Let $\alpha$ be a constant such that $0 0$. Constant $d$ will be defined momentarily.
Induction step for Lower Bound
$$
\begin{align}
t(n) & = t(n') + t(n - n') + c \log_2(1 + n - n')\\
& \geq t(n') + t(n - n') + c \log_2(1)\\
& = an' + an - an' + 0\\
& = an
\end{align}
$$
Induction step for Upper Bound
$$
\begin{align}
t(n) &= t(n') + t(n - n') + c \log_2(1 + n - n')\\
&\leq t(n') + t(n - n') + c \log_2 n\\
&= bn' - c\log_2n' + d + b(n-n') - c\log_2(n-n') + d + c \log_2 n\\
&= bn + 2d - c\log_2n' - c\log_2(n-n') + c \log_2 n\\
&= bn + 2d - c\log_2(n'(n-n')) + c \log_2 n\\
&= bn + 2d - c\log_2(\alpha n(n- \alpha n)) + c \log_2 n\\
&= bn + 2d - c\log_2(n^2 \alpha (1- \alpha )) + c \log_2 n\\
&= bn + 2d - 2c\log_2 n - c\log_2( \alpha (1- \alpha )) + c \log_2 n\\
&= bn - c \log_2 n + 2d - c\log_2( \alpha (1- \alpha ))
\end{align}
$$
Now we can define $d$ in terms of constants $c$ and $\alpha$.
$$ d = c\log_2( \alpha (1- \alpha ))$$
Therefore
$$t(n) \leq bn - c \log_2 n + d$$
Clearly $an \leq t(n) \leq bn$. It's worth noting this is because $d$ will always be negative.
Now we can conclude
$$t(n_1 + n_2) = \Theta(n_1 + n_2)$$
Clearly the first issue/difficulty is that we're trying to define this in terms of two variables ($n_1, n_2$). This seems hard so let's go ahead and redefine this relation:
$$t(n_1 + n_2) \geq t(n_1) + t(n_2) + c \log_2(1 + n_2)$$
Let $\alpha$ be a constant such that $0 0$. Constant $d$ will be defined momentarily.
Induction step for Lower Bound
$$
\begin{align}
t(n) & = t(n') + t(n - n') + c \log_2(1 + n - n')\\
& \geq t(n') + t(n - n') + c \log_2(1)\\
& = an' + an - an' + 0\\
& = an
\end{align}
$$
Induction step for Upper Bound
$$
\begin{align}
t(n) &= t(n') + t(n - n') + c \log_2(1 + n - n')\\
&\leq t(n') + t(n - n') + c \log_2 n\\
&= bn' - c\log_2n' + d + b(n-n') - c\log_2(n-n') + d + c \log_2 n\\
&= bn + 2d - c\log_2n' - c\log_2(n-n') + c \log_2 n\\
&= bn + 2d - c\log_2(n'(n-n')) + c \log_2 n\\
&= bn + 2d - c\log_2(\alpha n(n- \alpha n)) + c \log_2 n\\
&= bn + 2d - c\log_2(n^2 \alpha (1- \alpha )) + c \log_2 n\\
&= bn + 2d - 2c\log_2 n - c\log_2( \alpha (1- \alpha )) + c \log_2 n\\
&= bn - c \log_2 n + 2d - c\log_2( \alpha (1- \alpha ))
\end{align}
$$
Now we can define $d$ in terms of constants $c$ and $\alpha$.
$$ d = c\log_2( \alpha (1- \alpha ))$$
Therefore
$$t(n) \leq bn - c \log_2 n + d$$
Clearly $an \leq t(n) \leq bn$. It's worth noting this is because $d$ will always be negative.
Now we can conclude
$$t(n_1 + n_2) = \Theta(n_1 + n_2)$$
Context
StackExchange Computer Science Q#75008, answer score: 2
Revisions (0)
No revisions yet.