2 ms·
The common useage in mathematics is in analysis and topology, to specify subsets of the real numbers. Remembering that open and closed are jargon terms in topol
by alan-crowe 16y ago
The common useage in mathematics is in analysis and topology, to specify subsets of the real numbers. Remembering that open and closed are jargon terms in topology:
(a,b) is an open set and contains exactly those x such that a is less than x and x is less than b.
[a,b] is a closed set and contains exactly those x such that a is less than or equal to x and x is less than or equal to b
For example, one might be thinking about the interval [0,pi] but the function 1/sin x has singularities at both ends of the interval. It is only defined on (0,pi). Notice that 1/x is defined on (0,pi]. It is sometimes convenient to mix up open=exclusive=() and closed=inclusive=[].
These conventions can be carried over into computer science in the obvious way [0,3) = {0,1,2} while (0,3] = {1,2,3} but the motivation is different. In computer science we are more concerned how smoothly our subranges chain together. For example
[0,r)+[r,s)+[s,t) = [0,t)
while
[0,r]+[r+1,s]+[s+1,t] = [0,t]