Search

Filter

  • Advanced Filters:

  • to
  • Specific Data Sources:

    All Edit

    Select All  |  Select None

Reset filters

EXERCISES AND PROBLEMS: Try to solve the Skyline problem Submitted by Ray Polivka Suppose you are given a series of rectangular boxes laid along the positive x axis. Each box is defined by 3 integer numbers; a left x value, a height along the y axis, and a right x value. For example one triple might be (1 11 5), meaning that the box extends horizontally from x=1 to x=5, with a height on the y axis of 11 units. The rectangular boxes may overlap or intersect as well as stand alone. For example, the three boxes represented by (1 11 5), (2 6 7) and (3 13 9) represent two intersecting boxes, (1 11 5) (3 13 9) and one completely subsumed one (2 6 7). You are expected to create a function called Skyline, which will produce the outline of the boxes, eliminating hidden boxes and intersections. The result should be, essentially, a skyline. The result should be a simple vector consisting of the left-most starting x value, followed by the associated height, followed in turn by the x value, with its associated height. This continues alternating x values and y heights until the sky outline is completed. You may assume that the left x values (the starting values for each box in its triplet) are given in ascending order. Test Case (see Figure 1): Let an LHR vector be (1 11 5) (2 6 7) (3 13 9) (12 7 16) (14 3 25) (19 18 22) The skyline result should be: (1 11 3 13 9 0 12 7 16 3 19 18 22 3 25) Note: This problem has been modeled after problem 105 in Vol. 1, from the problem set archive of the Universidad de Valladolid at the following web url: http://acm.uva.es/problemset Problems in this library are collected from different local, regional and final ACM contests. Problem 105 comes originally from Internet Duke. Solutions, stating clearly which language and version has been used, should be sent to: polivka@acm.org In future issues of APL Quote Quad, selected correct solutions submitted and the names of their authors will be published. y Figure 1: the problem to be solved x September 2004, Volume 34, Number 4

Page 1 of 1

Page 1 of 1

Toggle back to continuous viewing mode

/lp/association-for-computing-machinery/exercises-and-problems-try-to-solve-the-skyline-problem-cPetmyJ8Ya
Welcome to DeepDyve! Rent Premier Research Articles and Save Up to 90%

Learn more

Free Article

Bookmark

Exercises and problems: try to solve the skyline problem

Polivka, Ray
ACM SIGAPL APL Quote Quad , Volume 34 (4)
Association for Computing MachinerySep 1, 2004

More Info

More Like This Article

View All dataSource[]=actageo&dataSource[]=aspet&dataSource[]=aaos&dataSource[]=aacc&dataSource[]=aacr&dataSource[]=aea&dataSource[]=aip&dataSource[]=ajnr&dataSource[]=ams&dataSource[]=aps_physical&dataSource[]=appi_book&dataSource[]=appi_journal&dataSource[]=apha&dataSource[]=asip&dataSource[]=asm&dataSource[]=asn&dataSource[]=aspb&dataSource[]=avs&dataSource[]=annual_reviews&dataSource[]=arxiv&dataSource[]=acm&dataSource[]=berghahn&dataSource[]=cabi&dataSource[]=clinical_trials&dataSource[]=dailymed&dataSource[]=degruyter&dataSource[]=du_press&dataSource[]=esa&dataSource[]=eu_press&dataSource[]=elsevier&dataSource[]=emerald&dataSource[]=ejtr&dataSource[]=emea&dataSource[]=epo&dataSource[]=faseb&dataSource[]=gsa&dataSource[]=health_affairs&dataSource[]=hindawi&dataSource[]=imanager&dataSource[]=imedpub&dataSource[]=informa_healthcare&dataSource[]=informs&dataSource[]=iop&dataSource[]=iucr&dataSource[]=iospress&dataSource[]=jbjs&dataSource[]=leftcoast&dataSource[]=lu_press&dataSource[]=mesharpe&dataSource[]=mary_ann_liebert&dataSource[]=medline&dataSource[]=mit_press&dataSource[]=nature&dataSource[]=oxford&dataSource[]=pier_professional&dataSource[]=pnas&dataSource[]=portlandpress&dataSource[]=psyc_articles&dataSource[]=psyc_books&dataSource[]=psyc_critiques&dataSource[]=plos_journal&dataSource[]=pubmed_central&dataSource[]=rsna&dataSource[]=rockefeller&dataSource[]=rcn&dataSource[]=ria&dataSource[]=rsc&dataSource[]=sage&dataSource[]=spie&dataSource[]=springer_journal&dataSource[]=springer&dataSource[]=taylor_francis&dataSource[]=aps&dataSource[]=the_scientist&dataSource[]=uc_press&dataSource[]=uspto_abstract&dataSource[]=wiley&dataSource[]=pct

Browse: Subject Areas | Journals | Publishers

Sign Up for a DeepDyve Account

Bookmark an Article

To bookmark an article, please log in first, or sign up for a DeepDyve account if you don't already have one.

OK

Subscribe to Journal Email Alerts

To subscribe to email alerts, please log in first, or sign up for a DeepDyve account if you don't already have one.

OK

Thank you for renting with DeepDyve

Your PayPal account has been charged $2.99. You now have access to the full text of this article. A rental receipt has also been sent to your email address.

Your credit card has been charged $2.99. You now have access to the full text of this article. A rental receipt has also been sent to your email address.

OK

New! You can now keep track of new articles from ACM SIGAPL APL Quote Quad on your personalized homepage! Learn more

PDF Download — Not Available

Thanks for your interest in purchasing the PDF. Your request has been noted and we will work with our publisher partner to discuss enabling this feature.

In the meantime, you can get the PDF by visiting the publisher site.

Thank you for purchasing with DeepDyve

Your PayPal account has been charged $.

Your credit card has been charged $.

You can now download this article. A purchase receipt has also been sent to your email address.

Download This Article or I'm done with my download

Print Page — Not Available

Thanks for your interest in printing individual pages. Your request has been noted and we will work with our publisher partner to discuss enabling this feature.

In the meantime, you can get the PDF by visiting the publisher site.

Thank you for printing with DeepDyve

Your PayPal account has been charged $0.

Your credit card has been charged $0.

You can now print this article. A purchase receipt has also been sent to your email address.

Print the Selected Pages or I'm done with my printing

Please refresh to generate a new download link

Your article download link has expired. Please refresh this page to obtain a new download link and try again.

Follow a Journal

To get new article updates from a journal on your personalized homepage, please log in first, or sign up for a DeepDyve account if you don't already have one.

OK