language-icon Old Web
English
Sign In

Set (abstract data type)

In computer science, a set is an abstract data type that can store unique values, without any particular order. It is a computer implementation of the mathematical concept of a finite set. Unlike most other collection types, rather than retrieving a specific element from a set, one typically tests a value for membership in a set. In computer science, a set is an abstract data type that can store unique values, without any particular order. It is a computer implementation of the mathematical concept of a finite set. Unlike most other collection types, rather than retrieving a specific element from a set, one typically tests a value for membership in a set. Some set data structures are designed for static or frozen sets that do not change after they are constructed. Static sets allow only query operations on their elements — such as checking whether a given value is in the set, or enumerating the values in some arbitrary order. Other variants, called dynamic or mutable sets, allow also the insertion and deletion of elements from the set. A multiset is a special kind of set in which an element can figure several times. In type theory, sets are generally identified with their indicator function (characteristic function): accordingly, a set of values of type A {displaystyle A} may be denoted by 2 A {displaystyle 2^{A}} or P ( A ) {displaystyle {mathcal {P}}(A)} . (Subtypes and subsets may be modeled by refinement types, and quotient sets may be replaced by setoids.) The characteristic function F {displaystyle F} of a set S {displaystyle S} is defined as: In theory, many other abstract data structures can be viewed as set structures with additional operations and/or additional axioms imposed on the standard operations. For example, an abstract heap can be viewed as a set structure with a min(S) operation that returns the element of smallest value. One may define the operations of the algebra of sets: Typical operations that may be provided by a static set structure S are:

[ "K-approximation of k-hitting set", "Programming language", "Bounded set", "Status set", "Result set", "Directed set", "Information set" ]
Parent Topic
Child Topic
    No Parent Topic