Discrete Maths Flashcards
(126 cards)
Natural numbers
Counting numbers
e.g. 0,1,2,3,4,5,…
Denoted by ‘N’
Prime numbers
A natural number is prime if it has exactly two distinct factors. Itself, and 1
Integers
Whole numbers. All natural numbers as well as negatives.
e.g. …,-3,-2,-1,0,1,2,3,…
Denoted by ‘Z’
Rational numbers
Numbers which can be expressed as a decimal fraction.
e.g. 1/2, 3/4, 1/4… - Not pi, 2^0.5
Denoted by ‘Q’ (quotient)
Irrational numbers
Opposite of rational, can’t be expresseed as decimal fraction.
e.g. pi, 2^0.5 (root 2)…
Real numbers
Numbers which are not imaginary (All numbers we would use to quantify)
Denoted by ‘R’
Set, members and elements
A set is defined in terms of its members. It is the result of considering certain elements together (e.g. set of natural numbers). An element can be any entity of any kind
The set of odd numbers less than 10
1,3,5,7,9
What does ‘x ∈ A’ mean?
The element x is a member of the set A
∈ with a diagonal line through it means ‘is not a member of’
Equality of sets
When 2 sets have the exact same elements.
P: The set of odd numbers between 2 and 8
Q: The set of prime factors of 105
For both, the elements are 3,5,7, hence P=Q.
The exact definition is:
‘X = Y ’ means that, for every x, x ∈ X if and only if x ∈ Y
In other words, two sets are equal so long as every element is either a member of both of them
or a member of neither of them
The null set
A set with no members,
e.g. P = The set of unicorns in the London zoo.
Q = The set of prime numbers between 114 and 126.
P=Q so there is only one set with no members, the null set.
Denoted by ‘∅’
Subsets
The set of prime numbers between 10 and 100 is part of the set of odd numbers between 10 and 100. A part of a set in this sence is called a ‘subset’.
‘X ⊆ Y ’ means that X is a subset of Y
The exact definition is:
‘X ⊆ Y ’ means that for any element x, if x ∈ X then x ∈ Y .
Proper subsets
The subsets of a set include the set itself (X ⊆ X), but if we have a subset not equal to the set itself, it is a proper subset, e.g. X ⊂ Y
‘X ⊂ Y ’ means that X ⊆ Y and X != Y
This means that ‘X ⊆ Y ’ is equivalent to ‘X ⊂ Y or X = Y ’.
Defining sets
We use the template {x | . . . } to denote the set of all elements x such that . . .
For example, the set of odd numbers between 10 and 20 would be represented as
{x | x is odd and 10 < x < 20}
Alternatively you could just write {11,13,15,17,19}
{x | x ∈ S and x has φ} = {x ∈ S | x has φ}.
Intersection
X ∩ Y = {x | x ∈ X and x ∈ Y }
Elements which are members of both listed sets are in the intersection (∩) of the 2.
{2, 4, 6, 8, 10} ∩ {2, 3, 4, 5, 6} = {2, 4, 6}.
Rules from intersection definition
- X ∩ Y ⊆ …
- X ⊆ Y if and only if X ∩ Y = …
- X ∩ ∅ = …
- X ∩ X = …
- X ∩ Y = Y ∩ … (i.e., ∩ is a commutative operation)
- X ∩ (Y ∩ Z) = (X ∩ Y ) ∩ … (i.e., ∩ is an associative operation)
- X ∩ Y ⊆ X
- X ⊆ Y if and only if X ∩ Y = X.
- X ∩ ∅ = ∅.
- X ∩ X = X
- X ∩ Y = Y ∩ X (i.e., ∩ is a commutative operation)
- X ∩ (Y ∩ Z) = (X ∩ Y ) ∩ Z (i.e., ∩ is an associative operation)
Union
Any element of either set.
X ∪ Y = {x | x ∈ X or x ∈ Y }
{2, 4, 6, 8, 10} ∪ {2, 3, 4, 5, 6} = {2, 3, 4, 5, 6, 8, 10}
More the 2 sets - format
B = A1 ∩ A2 ∩ A3 ∩ A4 ∩ A5
or B = ^5 ∩ i = 1 Ai
Disjoint sets
Disjoint sets have no intersection (mutually exclusive)
X and Y are disjoint if and only if X ∩ Y = ∅.
Pairwise disjoint
Any 2 of 3+ sets are disjoint
X ∩ Y = X ∩ Z = Y ∩ Z = ∅
If 2 of the sets are not disjoint, the sets are not pairwise disjoint
Union and intersection can be used together. Answer card has example
‘So long as the next card drawn is either a king or an ace, and also either a club or a diamond,
then I shall win.’ In other words, I shall win if the next card is in the set
(K ∪ A) ∩ (C ∪ D)
Distributive laws
Like multiplying out brackets
X ∩ (Y ∪ Z) = (X ∩ Y ) ∪ (X ∩ Z)
X ∪ (Y ∩ Z) = (X ∪ Y ) ∩ (X ∪ Z)
Set difference
D = {x | x drives a car}
L = {x | x has a valid licence}
To find law breakers we want members of set D who are not members off set L, and this is denoted D \ L
X \ Y = {x | x ∈ X and x /∈ Y }
{2, 4, 6, 8, 10} \ {2, 3, 4, 5, 6} = {8, 10}
Proofs from definition of difference
- X \ Y ⊆ X
- (X \ Y ) ∩ Y = ∅
- X \ Y = ∅ if and only if X ⊆ Y
- X \ (Y ∩ Z) = (X \ Y ) ∪ (X \ Z)
- X \ (Y ∪ Z) = (X \ Y ) ∩ (X \ Z)