Professional Documents
Culture Documents
Lecture Notes Weeks 1 & 2 Foundations of Conputer Science FIRST SEM
Lecture Notes Weeks 1 & 2 Foundations of Conputer Science FIRST SEM
SCIENCE
NOTES
FOUNDATIONS OF COMPUTER SCIENCE
GIFTY OKYERE ANTI (MRS)
School of Informatics, Engineering & Technology
Regent University College of Science &
Technology
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.
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
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
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
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
SCIENCE NOTES
FOUNDATIONS OF COMPUTER
GIFTY OKYERE ANTI (MRS)
addition.
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
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
SCIENCE NOTES
FOUNDATIONS OF COMPUTER
GIFTY OKYERE ANTI (MRS)
in the 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.
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
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