You are on page 1of 3

Discrete Math Introduction

Discrete Math: is the basic language for computer science

Discrete Structures: basic buildings block for becoming a computer scientist

Sets
Definition: is a collection of objects and don’t depend on order or repetition (order and
repetition don’t make any sense in Sets)

Sets Symbols
symbol of a set is a capital letter or a name and elements of a set is small letters

a ∈ S means that (a) is an element of set (S) —> S = {a, b, c}

a ∉ S means that (a) is not an element of set (S) —> S = {b, c}

U1 = a set of 1 and -1 —> U1 = {1, -1}

U0 = a set of 0 —> U0 = {0}

Z  all positive and negative integers (doesn’t include 0)


Z + all positive integers only (doesn’t include 0)
N natural numbers (including 0)
X ⊆ Y means that X is a subset of set Y or equal to it —> X = {1} and Y = {1, {1}}

A subset can be equal to the set. That a subset can contain all the elements that are
present in the set.

if X ⊆ Y and Y ⊆ X then X=Y (the sets are equal).

X ⊂ Y means that X is a subset of set Y but does not equal to it —> X={2} and Y = {1,
{2}}

X ⊄ Y means that X is not a subset of set Y —> X={5} and Y ={1, 2}

Empty set = { } or ∅
X ∪ Y means that all elements in set X is in set Y

X ∩ Y means that there is common elements between set X and set Y

Discrete Math Introduction 1


If there are no common elements between set X and set Y X ∩ Y = ∅ it means that
the are disjoint

Sets Methods
Roster Method:
EX: S = {1, 2, 3}

Note: If the set contains large number of elements use ellipses (…)

ex: X = 0< x <100 so X = {1, 2, 3, 4, …, 99}

Builder Method:
set builder method is a method used to describe the set

Written form: S = {x | x ∈ S, p(x)}

x —> is an element from S (variable)

| —> this vertical line means (such that)

p(x) —> the description of the element (properties)

EX: A = {x | x is a positive even integer, 0<x<10} —> A = {2, 4, 6, 8}

Interval Notation:
Interval Notation are used with sets of numbers only.

[1, 10]: Closed interval from 1 to 10 —> 1 ≤ x ≤ 10


(1, 10): Open interval from 1 to 10 —> 1 < x < 10
[1, 10): Closed on 1, open on 10 —> 1 ≤ x < 10
(1, ∞): Open interval from 1 to positive infinity —> 1 < x

Cardinality of sets
Cardinality of a set is number of elements in the set.

The cardinality of a set = |{ }| = 0

we use | | to define cardinality

notes: | ∅| or |{ }| = 0 and |{∅}| = 1

Discrete Math Introduction 2


Power Set
power set is all subsets that can be formed from a set

we represent power set as p(set)

power set element number or cardinality = 2 power the number of set elements (the 2 is
constant)

ex: X = {1, 2, 3} so |P(X)| = 23 = 8

This means that the power set of set X must contain 8 elements or subsets

P(X) = {{ }, {1}, {2}, {3}, {1,2}, {1,3}, {2,3}, {1, 2, 3}}

Note:∅ or { } is a subset in any power set


power set of empty set P(∅) = {∅, ∅} = {∅}

power set of {∅} P({∅}) = {∅, {∅}}

Discrete Math Introduction 3

You might also like