Chapter 4 Mathematical Data Types82
4.1.1 Some Popular Sets
Mathematicians have devised special symbols to represent some common sets.
symbol set elements
; the empty set none
N nonnegative integers f0;1;2;3;:::g
Z integers f:::; 3; 2; 1;0;1;2;3;:::g
Q rational numbers^12 ; ^53 ; 16;etc.
R real numbers ; e; 9;
p
2;etc.
C complex numbers i;^192 ;
p
2 2i;etc.
A superscript “C” restricts a set to its positive elements; for example,RCdenotes
the set of positive real numbers. Similarly,Z denotes the set of negative integers.
4.1.2 Comparing and Combining Sets
The expressionST indicates that setSis asubsetof setT, which means that
every element ofSis also an element ofT. For example,NZbecause every
nonnegative integer is an integer;QRbecause every rational number is a real
number, butC6Rbecause not every complex number is a real number.
As a memory trick, think of the “” symbol as like the “” sign with the smaller
set or number on the left hand side. Notice that just asnnfor any numbern,
alsoSSfor any setS.
There is also a relation,, on sets like the “less than” relation<on numbers.
ST means thatSis a subset ofT, but the two arenotequal. So just asn 6 < n
for every numbern, alsoA6A, for every setA. “ST” is read as “Sis astrict
subsetofT.”
There are several basic ways to combine sets. For example, suppose
XWWDf1;2;3g;
YWWDf2;3;4g:
Definition 4.1.1.
Theunionof setsAandB, denotedA[B, includes exactly the elements
appearing inAorBor both. That is,
x 2 A[B IFF x 2 AORx 2 B:
SoX[YDf1;2;3;4g.