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

nyle2k8431

nyle2k8431

Answered question

2022-11-20

Is 1 + lg i = 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
I cannot wrap my brain around the first part of this inequation, namely 1 + lg i = lg ( i + i ). Can anyone offer an explanation? Thanks in advance!

Answer & Explanation

Biardiask3zd

Biardiask3zd

Beginner2022-11-21Added 16 answers

The l g function is the logarithm to the base 2 (or binary logarithm), that is, l g 2 = 1. Thus
l g ( i + i ) = l g ( 2 i ) = l g 2 + l g i = 1 + l g i
By the way, the l g function can also be defined by l g ( x ) = log x log 2 .

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?