# Is 1+lgi=lg(i+i)? I've been studying Sedgewick's "Algorithms" book and in proof of one proposition he writes the following: the property is preserved because 1+lg i=lg(i+i)<=lg(i+j)=lg k

Is $1+\mathrm{lg}i=\mathrm{lg}\left(i+i\right)$?
I've been studying Sedgewick's "Algorithms" book and in proof of one proposition he writes the following:
the property is preserved because
$1+\mathrm{lg}i=\mathrm{lg}\left(i+i\right)\le \mathrm{lg}\left(i+j\right)=\mathrm{lg}k$
I cannot wrap my brain around the first part of this inequation, namely $1+\mathrm{lg}i=\mathrm{lg}\left(i+i\right)$. Can anyone offer an explanation? Thanks in advance!
You can still ask an expert for help

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

The $\mathrm{l}\mathrm{g}$ function is the logarithm to the base $2$ (or binary logarithm), that is, $\mathrm{l}\mathrm{g}\phantom{\rule{thinmathspace}{0ex}}2=1$. Thus
$\mathrm{l}\mathrm{g}\phantom{\rule{thinmathspace}{0ex}}\left(i+i\right)=\mathrm{l}\mathrm{g}\left(2i\right)=\mathrm{l}\mathrm{g}\phantom{\rule{thinmathspace}{0ex}}2+\mathrm{l}\mathrm{g}\phantom{\rule{thinmathspace}{0ex}}i=1+\mathrm{l}\mathrm{g}\phantom{\rule{thinmathspace}{0ex}}i$
By the way, the $\mathrm{l}\mathrm{g}$ function can also be defined by $\mathrm{l}\mathrm{g}\phantom{\rule{thinmathspace}{0ex}}\left(x\right)=\frac{\mathrm{log}x}{\mathrm{log}2}$.