Download as pdf or txt
Download as pdf or txt
You are on page 1of 36

FOUNDATIONS OF COMPUTER

SCIENCE

NOTES
FOUNDATIONS OF COMPUTER SCIENCE
GIFTY OKYERE ANTI (MRS)
School of Informatics, Engineering & Technology
Regent University College of Science &
Technology

GIFTY O. ANTI (MRS.)


GIFTY OKYERE ANTI (MRS)
FOUNDATIONS OF COMPUTER
SCIENCE NOTES
REVIEW / RPK
GREEK LETTERS
Greek letters are mostly used as symbols for constants, special
functions, and also conventionally for variables representing certain
quantities in most mathematical science related areas. The following
is a list of some letters.

SCIENCE NOTES
FOUNDATIONS OF COMPUTER
GIFTY OKYERE ANTI (MRS)
e α , alpha e Π, π , pi
e β , beta e ρ , rho
e γ , gamma e Σ , σ , sigma
e ∆, δ, delta e φ , phi F-ee
e s , epsilon Ep-si-lon e χ , chi
Kh-ee
e η , eta eh-ta
e ψ, psi P-see

e λ , lambda e ω, omega
LOGIC
Logical operators are used with logical values to infer on the
Truth Value of a condition.
If we have two statements p and q having a Truth Value
each,
e Conditional: p =⇒ q

SCIENCE NOTES
FOUNDATIONS OF COMPUTER
GIFTY OKYERE ANTI (MRS)
e Biconditional: p ⇐⇒ q (if and only if)
e Universal Quantifier: ∀(for all)
e Existential Quantifier: ∃ (there exist)
e Unique Existential Quantifier ∃! (there exist a unique)
SETS
Recall: A set is a collection of elements or members. We
denote members of a set by lowercase letters and a set as a
capital letter.

e So for a set A with a member x we write x ∈ A.

SCIENCE NOTES
FOUNDATIONS OF COMPUTER
GIFTY OKYERE ANTI (MRS)
Suppose x is not a member of A we write it as x ∈/A.
Example
If A = N then 2 ∈ A and −2 ∈/A

e A set with no members is called a null set/ empty set.


Symbol for an empty set is ∅= {}.

e Sets are described by listing their members between


braces. For the set X containing natural numbers
between 1 and 7 is represented as X = {2, 3, 4, 5, 6}
CONT’D SETS

e We can write X in aset-builder notationas


X = {x : x ∈ N and 1 < x < 7}.

SCIENCE NOTES
FOUNDATIONS OF COMPUTER
GIFTY OKYERE ANTI (MRS)
This can be read as ‘X is the set of all x such that x is
a member of the set of Natural numbers and x lies in
the interval 1 and 7
e If any member of a set A is also a member of a set B,
then we say that A ⊂ B. Also if 2 sets have the same
members, then we say that A = B
UNIONS & INTERSECTIONS OF INTERVALS

Suppose A and B are sets, then


e the union of A and B denoted as A ∪ B is the set whose
elements belong to either A or B.

SCIENCE NOTES
FOUNDATIONS OF COMPUTER
GIFTY OKYERE ANTI (MRS)
e the intersection of A and B denoted as A ∩ B is the set
whose elements belong to both A and B.

Example
1. {x : 0 < x < 3} ∪ {x : 2 < x < 6} = {x : 0 < x < 6}
2. {x : 0 < x < 3} ∩ {x : 2 < x < 6} = ∅
3. {x : x < 1} ∩ {x : x ≥ 0} = {x : 0 ≤ x < 1}
4. {x : 0 < x < 3} ∩ {x : 3 ≤ x < 6} = ∅
ASSIGNMENT 1
1. What are the similarities and differences
between the following:

SCIENCE NOTES
FOUNDATIONS OF COMPUTER
GIFTY OKYERE ANTI (MRS)
(a) Natural numbers and Whole numbers
(b) Rational and Irrational Numbers
Real Numbers

SCIENCE NOTES
FOUNDATIONS OF COMPUTER
GIFTY OKYERE ANTI (MRS)
The Number System
Real Numbers
Definitions
Categories of Real Numbers
Properties of Real Numbers
Uniqueness of Identity
Uniqueness of Inverse
REAL NUMBERS
DEFINITIONS

e Truth value: an attribute (True/False) assigned to a


statement.

SCIENCE NOTES
FOUNDATIONS OF COMPUTER
GIFTY OKYERE ANTI (MRS)
e Proposition: a statement whose truth value is yet to
be determined.
e Axiom: a proposition that is taken to be true, normally
for further proofs.
e Theorem: A proven statement determined by logical
deductions from axioms.
e Proof: This is a demonstration of a logical deduction
leading from the axioms which evaluates the truth value
of a proposition
CATEGORIES OF REAL
NUMBERS

SCIENCE NOTES
FOUNDATIONS OF COMPUTER
GIFTY OKYERE ANTI (MRS)
1.Natural numbers ( N): {0,1,2,3,4,. . . }
2.Integers ( Z): {. . . -4,-3,-2,-1, 0,1,2,3,4,. . . }
3.Rational ( Q): { mn |m, n ∈ Z, n = ƒ 0
4.Irrational ( H): {x |x ∈ R and x ∈/Q}}
PROPERTIES OF REAL
NUMBERS

Let R be the set of Real Numbers having two binary


operations on x + y and x ·y . Where we have the two
operations in an expression, multiplication precedes

SCIENCE NOTES
FOUNDATIONS OF COMPUTER
GIFTY OKYERE ANTI (MRS)
addition.

 Consider the axioms:


1. Closure: ∀a, b ∈ R, a + b ∈ R, a ·b ∈R
2. Commutativity: ∀a, b ∈ R, a + b = b + a, a ·b = b ·a

3. Associativity: ∀a, b, c ∈ R, a + (b + c) = (a + b) + c,
(ab)c = a(bc)
4. Distributive: ∀a, b, c ∈ R, a ·(b + c) = a ·c + b ·a
CONT’D PROPERTIES OF REAL
NUMBERS

Identity and Inverse Axioms

SCIENCE NOTES
FOUNDATIONS OF COMPUTER
GIFTY OKYERE ANTI (MRS)
1.5Additive Identity: ∀a∈ R, ∃ 0 ∈ R, s.t a + 0 = a
1.6Multiplicative Identity: ∀a∈ R, ∃ 1 ∈ R, s.t a ·1 = a
1.7Additive Inverse: ∀a∈ R, ∃ b ∈ R, s.t a + b = 0
1.8Multiplicative Inverse: ∀a∈ R, ∃ b ∈ R, s.t a ·b = 1
GIFTY OKYERE ANTI (MRS)
FOUNDATIONS OF COMPUTER
SCIENCE NOTES
GIFTY OKYERE ANTI (MRS)
FOUNDATIONS OF COMPUTER
SCIENCE NOTES
GIFTY OKYERE ANTI (MRS)
FOUNDATIONS OF COMPUTER
SCIENCE NOTES
GIFTY OKYERE ANTI (MRS)
FOUNDATIONS OF COMPUTER
SCIENCE NOTES
GIFTY OKYERE ANTI (MRS)
FOUNDATIONS OF COMPUTER
SCIENCE NOTES
GIFTY OKYERE ANTI (MRS)
FOUNDATIONS OF COMPUTER
SCIENCE NOTES
SCIENCE NOTES
FOUNDATIONS OF COMPUTER
GIFTY OKYERE ANTI (MRS)
Singleton of empty set equals
singleton of zero

Thus, nothing belongs to the set of Von Neumann natural


numbers unless it can be constructed using the preceding rules
i.e. Zero is a natural number

SCIENCE NOTES
FOUNDATIONS OF COMPUTER
GIFTY OKYERE ANTI (MRS)
in the natural numbers.

i.e. any natural numbers.

i.e. If the successor of two natural numbers is the same, then the two original
numbers are the same.

If a set contains zero and the successor of every number is in the set, then the
set contains the natural numbers
GIFTY OKYERE ANTI (MRS)
FOUNDATIONS OF COMPUTER
SCIENCE NOTES
GIFTY OKYERE ANTI (MRS)
FOUNDATIONS OF COMPUTER
SCIENCE NOTES
GIFTY OKYERE ANTI (MRS)
FOUNDATIONS OF COMPUTER
SCIENCE NOTES
GIFTY OKYERE ANTI (MRS)
FOUNDATIONS OF COMPUTER
SCIENCE NOTES
GIFTY OKYERE ANTI (MRS)
FOUNDATIONS OF COMPUTER
SCIENCE NOTES
GIFTY OKYERE ANTI (MRS)
FOUNDATIONS OF COMPUTER
SCIENCE NOTES
i.e. if…then …statement

SCIENCE NOTES
FOUNDATIONS OF COMPUTER
GIFTY OKYERE ANTI (MRS)
Thus, if x is a positive integer,…..1,2,3,… then there exist a positive integer n,
such that nx > or equal to y
GIFTY OKYERE ANTI (MRS)
FOUNDATIONS OF COMPUTER
SCIENCE NOTES
SCIENCE NOTES
FOUNDATIONS OF COMPUTER
GIFTY OKYERE ANTI (MRS)
Thus, between any two real numbers, there exist a rational number.

TRANSITIVE PROPERTY OF EQUALITY ON Q


 If a = b and c = b then a = c
SCIENCE NOTES
FOUNDATIONS OF COMPUTER
GIFTY OKYERE ANTI (MRS)
3. Rational x Irrational = Irrational
4. Irrational x Irrational OR Irrational + Irrational = Irrational
SOME PROOFS ON IRRATIONAL NUMBERS
Prove that is an irrational number.
Thus, is not equal to a , where b 0
b
(use proof by contradiction)
Let be rational, thus, = a ; a & b have no common factors
b
2 = (a/b)2 = a2 / b2

SCIENCE NOTES
FOUNDATIONS OF COMPUTER
GIFTY OKYERE ANTI (MRS)
2b2 = a2 (Here any of the theorems/ explanations below could be used)
1) divisibility theorem on prime numbers ……if p prime, divides a2 (p|a2 ), then
p also divides a (p|a). Hence, 2|a2 2|a since 2 is prime.
Thus, a can be 2k , where k > 0. Now substitute a=2k in the above equation.
2) Prime factorization theorem (extension) ……every square number has an
even number of prime factors. Since every integer can be expressed as a
product of primes (prime factorization theorem). Hence, for 2b2 = a2 , a2 must
have even number of primes factors. From the equation, 2 is one of the primes hence the
number of prime factors left must be odd so that when we add the 2 as one prime factor,
the total will be even. However, b2 , a square number also has even prime factors hence
2b2 gives an add number of prime factors. Hence there’s a contradiction.
3) If p is a multiple of a2 then it is also a multiple of a.
ASSIGNMENT 2

1. Proof the uniqueness of the additive and


multiplicative identities and inverses.

SCIENCE NOTES
FOUNDATIONS OF COMPUTER
GIFTY OKYERE ANTI (MRS)
2. Prove that , 3 , 2+ and + are
irrational numbers.
FOR FURTHER READING

D. S. Malik, M. K. Sen
Discrete Mathematical Structures: Theory &
Applications.
Melvyn B. Nathanson

SCIENCE NOTES
FOUNDATIONS OF COMPUTER
GIFTY OKYERE ANTI (MRS)
Elementary Methods in Number Theory.
Springer
James J. Tattersall
Elementary Number Theory in Nine Chapters.
Jan Mikusinsinski, Piotr Mikusinsinski
An Introduction to Analysis.
Titu Andreescu, Dorin Andrica, Zumming Feng
104 Number Theory Problems.
Birkhauser Boston
UNIQUENESS OF
IDENTITY
1.Additive Identity Proof
Proof.
Suppose ˆ0∈ R is another additive identity.
This implies

SCIENCE NOTES
FOUNDATIONS OF COMPUTER
GIFTY OKYERE ANTI (MRS)
2.Same procedure goes for Multiplicative Identity Proof of
Uniqueness
GIFTY OKYERE ANTI (MRS)
FOUNDATIONS OF COMPUTER
SCIENCE NOTES

You might also like