Mathematics for Computing

Authors Avatar

IN1004 Mathematics for Computing

Lecturer: Dr. Peter W.H. Smith

1. Set Theory

1.1 Introduction

A set is one of the most fundamental cornerstones of mathematics. It is a well-defined collection of objects. These objects are called elements and are said to be members of the set. Well-defined implies that we are able to determine whether it is the set under scrutiny. Thus we avoid sets based on opinion, e.g. the set of all great football players.

1.2 Notation and Set membership

Capital letters, A,B,C… are used to represent sets and lowercase letters are used to represent elements. For a set A, we write x ∈ Α if x is an element of A;  y  Α indicates that y is not a member of A.

A set can be designated by listing its elements within set braces. For example, if A is the set consisting of the first five positive integers, then we write A = {1,2,3,4,5}. In this example, 2 ∈A but 6 ∉A.

Another standard notation for this set is A = {x | x is an integer and 1 ≤ x ≤ 5}. The vertical line | within the set may be read as “such that”, the symbols {x |…} are read “the set of all x such that…” The properties following | help us to determine the elements of the set that is being described.

Note: The notation {x | 1 ≤ x ≤ 5} is not an adequate description of the set A unless we have agreed in advance that the elements under consideration are integers. When such an agreement is adopted, we say that we are specifying a universe, or universe of discourse which is usually denoted by U . We then only select elements of U to form our sets. In this particular problem, if U denoted the set of all integers, or the set of all positive integers, then {x | 1 ≤ x ≤ 5} adequately describes A. If U is the set of all real numbers, then {x | 1 ≤ x ≤ 5} would contain all of the real numbers between 1 and 5 inclusively. If U consisted of only even integers, then the only members of {x | 1 ≤ x ≤ 5} would be 2 and 4.

Examples

For U = {1,2,3,…}, the set of positive integers, let

  1. A = {1,4,9,16,25,36,49,64,81} = {x2 | x U, x2 <100} = {x2 | x U  x2 <100}.
  2. B = {1,4,9,16} = {y2 | y U, y2 <20}
  3. C = {2,4,6,8,…} = {2k | k U

1.3 Cardinality of Sets and Subsets

Join now!

Sets A and B are examples of finite sets, whereas C is an infinite set.  For any finite set A, |A| denotes the number of elements in A and is referred to as the cardinality, or size of A. In the example above |A| = 9 and |B| = 4.

If C, D are sets from a universe U, C is a subset of D, written C ⊆ D, or D ⊇ C, if every element of C is an element of D. Additionally, if D contains an element that is not in C, then C is called a proper subset of D, denoted C ⊂ D or D ⊃ ...

This is a preview of the whole essay