in Algorithms retagged by
412 views
0 votes
0 votes

can you please explain how 1-(1/2)^ln(n)  becomes (n-1)/n ? 

in Algorithms retagged by
412 views

3 Comments

1-$({\frac{1}{2}})^{lg n}$ = 1-$({2^{-1}})^{lg n}$ = 1-$({2})^{-lg n}$ = 1-$({2})^{{lg\; (n}^{-1})}$ =1-$({n^{-1}})^{lg 2}$ =  1-$({n^{-1}})^{1}$ = 1-$({n^{-1}})$ = 1-$\frac{1}{n}$ = $\frac{n-1}{n}$
1
1

see (1/2)log2

can be writen as... 1/ 2log2n

= 1/nlog22 = (1/n)   (nlogab <==> blogan) this is the formulae...

1
1

Thank You @Shaik Masthan  , You have answered many of my doubts, Your help is truly invaluable.

Regard

0
0

2 Answers

2 votes
2 votes
Best answer

could you post full question, just curious

selected by

1 comment

0
0
1 vote
1 vote
Here 1/2 is cancel out by 1 - 1/2

$n[1 - (1/2) ^\ log n]$

log property ::   2 ^ log n  (base 2)

                         then replace n with 2

                      = n ^ log 2 = n

So, our equestion are in form ->n[1 - ( 2^(-1) ) ^logn]

 

                        so we can write as n[1 - (n^-1)  ^ log2 ]                                                  then

                         =    $n[ 1- 1/n ]$

                        =   $n[ \frac{n-1}{n} ]$

                         = $ n - 1 $
edited by