Assignment - The Skyline Problem

Assignment Help Python Programming
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

Reference no: EM132392796

Questions Cloud

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?

Reviews

len2392796

10/25/2019 3:14:37 AM

I am attaching the Assignment that I need help with. Please look at the file "ADA assignment" for the details. This should be done in PYTHON. Also, please find attached "input.txt" and "output.txt" files. The code should read the input from the input.txt file and create an output file exactly like the above attached file output.txt. Also while writing the code, please make sure that you follow all the instructions very carefully.

Write a Review

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd