View Feed
Coffee Room
Discuss anything here - everything that you wish to discuss with fellow engineers.
12921 Members
Join this group to post and comment.
qwerty123 • Apr 30, 2012

solve the recurrence problem with detail(time complexity)

solve the recurrence problem with detail(time complexity)

T(n)=T(n-1)+1/n, if n>1
= 1 otherwise
simplycoder • Apr 30, 2012
To solve this,

put n=n-1
finally it will result in
1/n+1/(n-1)+1/(n-2)+... +1/3+...

For an infinite series, this can be approximated for ln
put n= n-1
and so on
solve the total it will give sum of nth terms in harmonic series
approximately sum of n terms in harmonic series is ln(n)+.5772156649...
timecomplextiy is O(ln(n))
qwerty123 • Apr 30, 2012
hi, this problem uses log n series ....i can evalute only up to sum of n term ...........thanx for reply to this question........i already posted one question .......... average paged m/y access time question........till anyone cant solve the problem?....u solve the problem
qwerty123 • Apr 30, 2012
Suppose the cache and main memory access times are 100 ns and 1200 ns respectively. The cache is used for paging and the hit ratio of finding the page table entry in the cache is 98%, what is the effective paged memory access time?

(A) 240 ns (B) 220 ns(C) 250 ns (D) 1200 ns

Share this content on your social channels -