(data structure)
Definition: An unordered collection of values where each value occurs at most once. A group of elements with three properties: (1) all elements belong to a universe, (2) either each element is a member of the set or it is not, and (3) the elements are unordered.
Formal Definition: As an abstract data type, a set has a single query function, isIn(v, S), which tells whether an element is a member of the set or not, and two modifier functions, add(v, S) and remove(v, S). These may be defined with axiomatic semantics as follows.
The predicate isEmpty(S) may be defined with the following additional axioms.
Generalization (I am a kind of ...)
bag, abstract data type.
See also intersection, union, complement, difference, list, set cover.
If you have suggestions, corrections, or comments, please get in touch with Paul E. Black.
Entry modified Tue Jan 11 16:15:44 2005.
HTML page formatted Wed Oct 26 09:48:07 2005.
Cite this as:
Patrick Rodgers and Paul E. Black, "set", from
Dictionary of Algorithms and Data
Structures, Paul E. Black, ed.,
NIST.
http://www.nist.gov/dads/HTML/set.html