# subset

(definition)

**Definition:**
A *set* S_{1} is a subset of another set S_{2} if every element in S_{1} is in S_{2}. S_{2} may have exactly the same elements as S_{1}.

**Formal Definition:** S_{1} ⊆ S_{2} iff ∀ s, s ∈ S_{1} → s ∈ S_{2}.

**Specialization** (... is a kind of me.)

*proper subset*, *combination*.

**See also**
*superset*.

*Note:
If S*_{1} is a subset of S_{2}, S_{2} is a superset of S_{1}.

* A combination is a subset with exactly n elements.*

Author: PR

## Implementation

generating subsets (Fortran, Mathematica, and Pascal)

Go to the
Dictionary of Algorithms and Data
Structures home page.

If you have suggestions, corrections, or comments, please get in touch
with Paul Black.

Entry modified 2 March 2015.

HTML page formatted Fri Feb 23 10:06:08 2018.

Cite this as:

Patrick Rodgers, "subset", in
*Dictionary of Algorithms and Data Structures* [online], Vreda Pieterse and Paul E. Black, eds. 2 March 2015. (accessed TODAY)
Available from: https://www.nist.gov/dads/HTML/subset.html