Integer Intervals
An integer interval is a range of whole numbers defined by two endpoints. These endpoints can be included in the interval or excluded, leading to different types of intervals. For example, the interval 1, 2, 3, 4 includes the numbers 1 through 4, while the interval (1, 4) excludes the endpoints, meaning it includes only the numbers 2 and 3.
Intervals can be classified as closed, open, or half-open. A closed interval, like [1, 4], includes both endpoints, while an open interval, like (1, 4), does not. A half-open interval, such as [1, 4), includes one endpoint but not the other.