Discrete Mathematics with Applications 4th Edition

Published by Cengage Learning
ISBN 10: 0-49539-132-8
ISBN 13: 978-0-49539-132-6

Chapter 11 - Analysis of Algorithm Efficiency - Exercise Set 11.4 - Page 764: 41


Quantities of the form $kn + kn\log_2n$ for positive integers $k_1 \cdot k_2$ and $n$ arise in the analysis of the merge sort algorithm in computer science. Show that for any positive integer $k$, $k_1n+k_2n\log_2n$ is $\Theta(n\log_2n)$. For $n>1$ and for positive integers $k_1,k_2$: $k_2n\log_2n \leq k_1n+k_2n\log_2n$. For $n>1$ and for positive integers $k_1,k_2$: $k_1n \leq k_1n\log_2n$ (by statement 11.4.13) Add $k_2n\log_2n$ to both sides: $k_1n + k_2n\log_2n \leq k_1n\log_2n + k_2n\log_2n = (k_1+k_2)\log_2n$. Because all terms are positive: $k_2|n\log_2n| \leq |k_1n + k_2n\log_2n| \leq (k_1+k_2)|\log_2n|$. Hence for $A=k_1, B=(k_1 + k_2), h=1$, $A|n\log_2n| \leq |k_1n + k_2n\log_2n| \leq B|\log_2n|$ for all $n>h$. Thus $k_1n+k_2n\log_2n$ is $\Theta(n\log_2n)$

Work Step by Step

Recall the definition of $\Theta$-notation: $f(x)$ is $\Theta(g(x))$ iff there exist positive real numbers A, B, k, such that $A|g(x)| \leq |f(x)| \leq B|g(x)|$ for all $x>k$. Statement 11.4.13: For all real numbers $b$ with $b>1$ and for all sufficiently large real numbers $x$: $x \leq x\log_bx \leq x^2$.
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.