You are an amazing teacher. I hope you are happy in your life.... Sending you all the positive energy i can. You are a nice person
@algorithmslabАй бұрын
Thanks!
@vsvg3 Жыл бұрын
Heyy, thanks for this! Great work!
@telan3467 Жыл бұрын
This is fantastic
@gawadahmed3722 Жыл бұрын
you are a legend!
@ShakrinJahanMozumder11 ай бұрын
Could you please give me an idea, how the base-3 counter amortized cost will be calculated here? I am getting, Ci = 2, Potential change = 2. So, amortized cost = 4. Is it okay?
@algorithmslab11 ай бұрын
This doesn't quite work, because Ci might not be constant. The first question you need to do is to define an appropriate potential function. For the binary counter it was the number of 1s, but here it has to look different (Hint: It has to involve the number of 2s. It can also involve the number of 1s.) c_i is the actual cost. Just like for the binary counter, this may vary, i.e., it is not necessarily constant. The trick then is (again like for the binary counter) to make sure to have defined the potential function in such a way, that whenever the counter has to change many digits, that then the potential drops by a similar number. This is a nice exercise.
@ShakrinJahanMozumder11 ай бұрын
Thanks!
@kimjaeyoon366 Жыл бұрын
thank u so much
@SupanthaPandit-xs6lf7 ай бұрын
Can you please provide the slides?
@algorithmslab7 ай бұрын
the slides are the second half of the following: github.com/kbuchin/slide-archive/blob/main/advanced-algorithms-2024/02-Amortized-Analysis.pdf