From 8eb323dc1e5f9a8c7814bc8989f69ddc2e18e49e Mon Sep 17 00:00:00 2001 From: noah Date: Sun, 6 Mar 2022 20:32:55 -0600 Subject: [PATCH] README --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f65787e..6faf2f1 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,13 @@ +Problem Description from the Kleinberg and Tardos Algorithm Textbook: "Hidden surface removal is a problem in computer graphics that scarcely needs an introduction: when Woody is standing in front of Buzz, you should be able to see Woody but not Buzz; when Buzz is standing in front of Woody, . . . well, you get the idea. -The magic of hidden surface removal is that you can often compute things faster than your intuition suggests. Here's a clean geometric example to illustrate a basic speed-up that can be achieved. You are given n nonvertical lines in the plane, labeled L1, . . . , Ln , with the ith line specified by the equation y = ai x + bi . We will make the assumption that no three of the lines all meet at a single point. We say line Li is uppermost at a given x-coordinate x0 if its y-coordinate at x0 is greater than the y-coordinates of all the other lines at x0: ai x0 + bi > aj x0 + bj for all j = i. We say line Li is visible if there is some x-coordinate at which it is uppermost - intuitively, some portion of it can be seen if you look down from “y = ∞.” Give an algorithm that takes n lines as input and in O(n log n) time returns all of the ones that are visible. + +The magic of hidden surface removal is that you can often compute things faster than your intuition suggests. Here's a clean geometric example to illustrate a basic speed-up that can be achieved: + +You are given n nonvertical lines in the plane, labeled L1, . . . , Ln , with the ith line specified by the equation y = ai x + bi . We will make the assumption that no three of the lines all meet at a single point. + +We say line Li is uppermost at a given x-coordinate x0 if its y-coordinate at x0 is greater than the y-coordinates of all the other lines at x0: ai x0 + bi > aj x0 + bj for all j = i. + +We say line Li is visible if there is some x-coordinate at which it is uppermost - intuitively, some portion of it can be seen if you look down from “y = ∞.” + +Give an algorithm that takes n lines as input and in O(n log n) time returns all of the ones that are visible."