Reference no: EM132392796
Assignment - The Skyline Problem
The goal of this assignment is to improve your understanding of divide-and-conquer algorithms. In this assignment, we are "overspecifying" the requirements to minimize confusion and to have a uniform grading criteria.
The Skyline Problem - Given a set of (rectangular) buildings B arranged in order from left to right in a city as described below, your solution should output a list of tuples of x-coordinates and heights that would correspond to the outer shape S (rectangular strips) of the Skyline buildings. A rectangular strip is represented as a pair (h, l) where h is the height of a strip and l is the x coordinate of the left side of a strip.
A building Bi is represented as a triplet (Hi, Lxi, Rxi), where Hi is the height of the building, and Lxi and Rxi are the left and right x-coordinates (0 < Lxi < Rxi). Assume that all the numbers used are non-negative integers (i.e., N including 0 as appropriate).
Write a O(n logn) program for finding the skyline of n-buildings.
Input: Absolute paths to the input and output files
Output: OuterShape S
Define the function: OuterShape(inputFile, outputFile).
Please make sure that you follow all the below instructions very carefully:
1. The Skyline Problem must use Divide and Conquer Approach using a MERGE SORT LOGIC to count inversions. Please donor use Priority Lists approach. I want it with merge sort logic.
2. Write a O(n logn) program for finding the skyline of n-buildings.
3. The code should be done in PYTHON.
4. Note: Define the function: OuterShape(inputFile, outputFile).
Attachment:- Assignment Files.rar
What is karli charitable contribution
: What is Karli's charitable contribution deduction for the year assuming both are qualified charities?
|
What is the price of a 5?-year
: What is the price of a 5?-year, 8% coupon? rate, $1,000 face value bond that pays interest annually if the yield to maturity on similar bonds is 7%??
|
What is the yield to maturity of the? bonds
: Man-zeer Inc.,? (a Kramer/Costanza joint? venture) bonds are currently trading at ?$385.18. The bonds have a face value of $1,000?, a coupon rate
|
What price did each of the bonds? sell
: The yield to maturity on the bond was 5.25?%. At what price did each of the bonds? sell?
|
Assignment - The Skyline Problem
: Assignment - The Skyline Problem. Given a set of (rectangular) buildings B. Write a O(n logn) program for finding the skyline of n-buildings
|
What is the coupon rate of the? bond
: The bond pays annual coupons and the next coupon is due in one year. What is the coupon rate of the? bond?
|
What is the yield to maturity of the? bonds
: Springfield Nuclear Energy Inc. bonds are currently trading at ?$584.82 The bonds have a face value of ?$1,000?, a coupon rate of 1?% with coupons paid?
|
What is the most that you would pay for investment
: What is the most that you would pay for an investment that promises to pay $20,691.00 a year forever with the first payment starting one year from now?
|
What is the loan amount
: If the stated annual rate is 11.31% and quarterly payments are $555.00 , what is the loan amount?
|