The paper I'm working on uses sets as implemented in https://docs.sympy.org/latest/modules/sets.html. A set is stored in a data structure as a sequence of intervals with open or closed bounds, so it can represent uncountable and infinite sets. What prior work can I reference for this data structure?


1 Answer 1


I'm not sure you need to reference any prior work; it's a basic enough approach. You can just say that you represent a set as a union of intervals. If you were inspired by Sympy, you could cite Sympy and that page.

  • $\begingroup$ What about algorithms on the data structure, like union and intersection and complement? $\endgroup$
    – Brent
    May 19, 2021 at 21:22
  • $\begingroup$ @Brent, those seem straightforward to me if those are the only operations you need to support. You can also look at segment trees and interval trees. Interval trees have the benefit of additionally supporting efficient stabbing queries. $\endgroup$
    – D.W.
    May 19, 2021 at 22:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.