{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lecture08 - CSE 421 Algorithms Richard Anderson Lecture 8...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CSE 421 Algorithms Richard Anderson Lecture 8 Optimal Caching Dijkstra’s algorithm Today’s Lecture • Optimal Caching (Section 4.3) • Dijkstra’s Algorithm (Section 4.4) Optimal Caching • Caching problem: – Maintain collection of items in local memory – Minimize number of items fetched Caching example A, B, C, D, A, E, B, A, D, A, C, B, D, A Optimal Caching • If you know the sequence of requests, what is the optimal replacement pattern? • Note – it is rare to know what the requests are in advance – but we still might want to do this: – Some specific applications, the sequence is known – Competitive analysis, compare performance on an online algorithm with an optimal offline algorithm Farthest in the future algorithm • Discard element used farthest in the future A, B, C, A, C, D, C, B, C, A, D Correctness Proof • Sketch • Start with Optimal Solution O • Convert to Farthest in the Future Solution F-F • Look at the first place where they differ • Convert O to evict F-F element – There are some technicalities here to ensure the caches have the same configuration . . . Single Source Shortest Path...
View Full Document

{[ snackBarMessage ]}

Page1 / 19

Lecture08 - CSE 421 Algorithms Richard Anderson Lecture 8...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon bookmark
Ask a homework question - tutors are online