BIM World
A Professional BIM Learning Platform


BIM Q&A: Understanding the Event Queue Size in Bentley-Ottmann’s Scanline Algorithm

BIM Q&A | What is the Spatial Size of the Event Queue in Bentley-Ottmann’s Scanline Algorithm?
I recently came across an article titled “On vertical visibility in arrangements of segments and the queue size in the Bentley-Ottmann line sweeping algorithm”. This article proves that the spatial complexity of the event queue should not exceed O(n log^2 n), though it does not clarify whether this is a tight bound.

===============

The Bentley-Ottmann algorithm, widely taught in many universities, is one of the most common scanline algorithms for detecting line segment intersections. Its time complexity is well known as O((n+k)log n), where n is the number of segments, and k is the number of intersection points.

However, the spatial complexity of the algorithm is often ambiguous, particularly regarding the event queue’s size. The event queue can potentially hold all segment endpoints and intersection events. Therefore, its space complexity is usually considered to be O(n+k).

But if k=O(n^2), meaning the number of intersections is on the order of n^2, does the event queue’s worst-case space complexity then become O(n^2)? If so, could you provide an example of such a worst-case scenario?

Brown improved the original algorithm by modifying how events are added to the event queue, optimizing its space complexity down to O(n). However, my question concerns the space complexity in the original implementation. If the event queue in the original algorithm cannot reach a worst-case size of O(n^2), then perhaps Brown’s optimization might be unnecessary.


xuebim
Follow the latest BIM developments in the architecture industry, explore innovative building technologies, and discover cutting-edge industry insights.
← Scan with WeChat
Like(0) 打赏
BIM WORLD » BIM Q&A: Understanding the Event Queue Size in Bentley-Ottmann’s Scanline Algorithm

Comment Get first!

Must log in before commenting!

 

BIM World, A Professional BIM Learning Platform

Stay updated on the latest architecture trends and share new building technologies.

Contact UsAbout Us

觉得文章有用就打赏一下小编吧

非常感谢你的打赏,我们将继续提供更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫

微信扫一扫

Account Login

By signing in, you agree toUser Agreement

Sign Up