Download presentation
Presentation is loading. Please wait.
Published byЕвгения Бедрина Modified over 5 years ago
1
Exercise 2.3 Use Theorem 2.1 to prove that R(BIT) <= 7/4 - 3/4l for both the dynamic and static list models. For dynamic lists, l is the maximum number of items present in the list at any point in time. Solution: Theorem 2.1: Let σ be the request sequence of n accesses. Then E[BIT(σ)] <= 7OPT(σ)/4 - 3n/4. The above holds true for both dynamic and static lists.
2
For dynamic lists, BIT needs to handle insertion of a new item in the list.
In general, the insertion is equivalent to the first access of the new item in a list of a bigger size. Thus, BIT inserts an item in the list, randomly initializes the bit of the new item, then moves it to the front if its bit is 1. The analysis applied for Theorem 2.1 to accesses show that an insertion would result in the same expected cost as an access. Note: For a deletion, inversions with the deleted item disappear, so potential function decreases even more than during an access.
3
Now, with a maximum of l items in the list and n accesses, OPT(σ) <= nl.
Hence, E[BIT(σ)] <= 7OPT(σ)/4 - 3n/4 <= (7/4 - 3/4l)OPT(σ) which proves that R(BIT) <= 7/4 - 3/4l.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.