Game Development Reference
In-Depth Information
If it so happens that you have a set that has no elements, then the set is said to be
empty. To designate an empty set, you can use the symbol ; : A ¼; .
Subsets and Supersets
Any collection of items can be a set. At the same time, if you have a set, you can
also create a subset . One set is a subset of another if the elements it contains are
also contained by the superset. Consider the set of prime numbers less than or
equal to 17. Designate that as set B :
B ¼f 2, 3, 5, 7, 11, 13, 17 g
Set B is a subset of set A (defined in the previous section as prime numbers less
than or equal to 47), because each element that is in set B is also in set A . The
notation you employ to denote that set B is a subset of set A is as follows:
B A
You can also designate that A is a superset of B :
A B
Expressions to Define Sets
When you define a set, you can create a list of the elements of a set, separate them
using commas, and enclose the result in opening and closing curly braces. Such
an approach to set creation suffices in many practical situations. For other
situations, you can use a form of notation that allows you to describe the con-
ditions of membership. In such situations, you make use of a vertical bar and a
few other symbols.
Consider a situation in which you want to designate any number that is an
element of set A . To accomplish this task, you use the following expression:
fa j a 2 Ag
The previous expression reads, '' a such that a is an element of set A .'' If you want
to designate numbers less than 17, you can write:
fa j a
<
17 g
Search WWH ::




Custom Search