78 reputation
16
bio website
location
age 31
visits member for 1 year, 8 months
seen Jan 15 at 13:15

I am a programmer. My primary skills are Java but comfortable writing scripts in shell and perl. I am interested in areas related to analysis and designing of software systems. I like to listen to music and love travelling.


Mar
4
awarded  Notable Question
Nov
19
awarded  Popular Question
Aug
30
awarded  Popular Question
Feb
10
awarded  Popular Question
Jan
7
comment How to write junit test case for the program
Thanks for the posts. I was looking exactly for this.
Jan
6
asked How to write junit test case for the program
Jan
2
comment finding the time complexity of the following program
No. I am a beginner to learning Algorithm analysis.
Jan
2
comment finding the time complexity of the following program
I understand the above program and the derivation for the above modified version. I wanted to know how to derive the time complexity with regards to the implementation using recursion.
Jan
2
asked finding the time complexity of the following program
Nov
20
awarded  Commentator
Nov
20
comment need explanation on amortization in algorithm
I have not understood the proof of the theorem. Please help me in understanding the proof of the above theorem.
Nov
20
comment need explanation on amortization in algorithm
or since the beginning of the series. Thus the running time of all the clear operations is O(summation from j=0 till k-1 of (ij (i subscript j) -i j-1 (i subscript j-1)) A summation such as this is known as telescopic sum, for all terms other than the first and the last cancel each other. That is, this summation is O(ik-1 - i-1), which os O(n). All the remaining operations of the series take O(1) time each. Thus we conclude that a series of n operations performed on an initially empty array takes O(n) time.
Nov
20
comment need explanation on amortization in algorithm
Theorem: A series of n operations on an initially empty array takes O(n) time: Proof: Let Mo.... Mn-1 be the series of operations performed on array S and Mio..... Mik-1 be the clear operations within the series. We have 0 <= io < .... <ik-1 <= n-1. Let us also define i-1 (i subscript -1). The running time of operation Mij (a clear operation) is O (ij (i subscript j) - ij-1 (i subscript (j-1))), because at most ij - ij-1-1 elements could have been added into the table (using the add operation) since the previous clear operation Mij-1 (M subscript i subscript j-1)
Nov
20
comment need explanation on amortization in algorithm
Hi Monster Truck, I could not get a code for explanation but could get a theorem. Could you please explain me what the autor is trying to explain. Quote from the book:
Nov
19
comment need explanation on amortization in algorithm
This is not clear. for example if n=5, and we ignore the outer algorithm running time, if we run the clear function first time it takes O(5). At this point the the array is empty. ow can we run the clear function again on the empty array. It should be O(5) when n =5. After the first run, the array is already cleared.
Nov
19
comment need explanation on amortization in algorithm
hey, how is it 9. when n=3, clear operation takes 3 operations. At this point of time, the array will become empty. why will it start for n=2 again?
Nov
19
comment need explanation on amortization in algorithm
This is what i am not clear. If clearing the array once will take O(1) when n =1, then when there are n times its should be O(n). Hope I am clear on this.
Nov
18
asked need explanation on amortization in algorithm
Nov
16
comment Big Oh notation does not mention constant value
Thanks for clear explanation. This is what i was precisely looking for. Thanks once again.
Nov
15
comment Big Oh notation does not mention constant value
Hi, Good explanation. I still have few doubts. 1. We cannot make the 6n+4 as O(4) since there is a variable value 'n'. Is this the answer? 2. while simplification you chose c=7 and correspondingly calculated n0 to 4. What made to decide c=7 and not less than 7? because based on the value of c the n0 will change.