0% found this document useful (0 votes)
18 views

DMS-Unit-1 Fundamental Structures and Basic Logic

Uploaded by

yamaja3036
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

DMS-Unit-1 Fundamental Structures and Basic Logic

Uploaded by

yamaja3036
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Discrete mathematics

Discrete [individually separate and distinct] mathematics is the branch of mathematics dealing with objects
that can consider only distinct, separated values. The term discrete objects include large variety of items such
as people, books, and computers and so on.

*UNIT 1+ Fundamental Structures and Basic Logic

Set
A set is an unordered collection of different elements. A set can be written explicitly by listing its elements
using set bracket.
Some Example of Sets
 A set of all positive integers
 A set of all the states in India
Let‟s say we have a set of Natural Numbers then it will have all the natural numbers as its member and the
collection of the numbers is well defined that they are natural numbers. A set is always denoted by a capital
letter.

For Example, a set of Natural Numbers is given by

N = {1, 2, 3, 4…..}.
Membership

The notation used to describe membership is the symbol "∈ ". This symbol is used to indicate that an element
belongs to a set. For example, if we have a set A = {1, 2, 3}, we can say that 1 ∈ A, which means that 1 is an
element of the set A.
Elements of a Set
The objects contained by a set are called the elements of the set. For Example, in the set of Natural
Numbers 1, 2, 3, etc are the objects contained by the set, hence they are called the elements of the set of
Natural Numbers. We can also say that 1 belongs to set N. It is represented as 1 ∈ N, where ∈ is the symbol of
belongs to.
Examples of Sets
Set of Natural Numbers: N = {1, 2, 3, 4….}
Set of Even Numbers: E = {2, 4, 6, 8…}
Set of Integers: Z = {…, -4, -3, -2, -1, 0, 1, 2,….}

Cardinality of a Set
The number of elements present in a set is called the Cardinal Number of a Set. For Example,
let‟s say P is a set of the first five prime numbers given by
P = {2, 3, 5, 7, 11}, then the Cardinal Number of set P is 5.
The Cardinal Number of Set P is represented by n(P) or |P| = 5.
Cardinality of a set S, denoted by |S|, is the number of elements of the set. The number is also referred as the
cardinal number. If a set has an infinite number of elements, its cardinality is ∞
. Example − |{1,4,3,5}|=4,|{1,2,3,4,5,…}|=∞
If there are two sets X and Y,

 |X|=|Y| denotes two sets X and Y having same cardinality. It occurs when the number of elements in X is exactly
equal to the number of elements in Y. In this case, there exists a bijective function ‘f’ from X to Y.
 |X|≤|Y| denotes that set X’s cardinality is less than or equal to set Y’s cardinality. It occurs when number of
elements in X is less than or equal to that of Y. Here, there exists an injective function ‘f’ from X to Y.
 |X|<|Y| denotes that set X’s cardinality is less than set Y’s cardinality. It occurs when number of elements in X is
less than that of Y. Here, the function ‘f’ from X to Y is injective function but not bijective.
 If |X|≤|Y| and |X|≥|Y| then |X|=|Y|. The sets X and Y are commonly referred as equivalent sets.

Equality of two sets:


The notation used to describe equality of two sets is the symbol "=". This symbol is used to
indicate that two sets have exactly the same elements.
For example, if we have two sets A = {1, 2, 3} and B = {3, 2, 1}, we can say that A = B, which
means that both sets have the same elements.
Some Standard Sets used in Set Theory
 Set of Natural Numbers is denoted by N
Set of natural numbers, N= ,1, 2, 3, ...-
 Set of Whole Numbers(defined as positive integers including zero) is denoted by W
Set of whole numbers, W = {0, 1, 2, 3, ...}
 Set of Integers is denoted by Z Set of integers, ℤ = {..., -3, -2, -1, 0, 1, 2, 3, ...}
 Set of Rational Numbers(A fraction with non-zero denominators) is denoted by Q
 Set of Irrational Numbers(numbers cannot be expressed as the ratio of two integers) is denoted by P
Examples of irrational numbers are pi(π=3⋅14159265…), √2, √5
 Set of Real Numbers is denoted by R
Real numbers are numbers that include both rational and irrational numbers. Rational numbers such as
integers (-2, 0, 1), fractions(1/2, 2.5) and irrational numbers such as √3, π(22/7), etc., are all real numbers.

Representation of Sets
Sets are primarily represented in two forms

1) Roster Form
In the Roster Form of the set, the elements are placed inside braces {} and are separated by
commas. Let‟s say we have a set of the first five prime numbers then it will be represented by
P = {2, 3, 5, 7, 11}.
Here the set P is an example of a finite set as the number of elements is finite, however, we can come
across a set that has infinite elements then in that case the roster form is represented in the manner that some
elements are placed followed by dots to represent infinity inside the braces.
Let‟s say we have to represent a set of Natural Numbers in Roster Form then its Roster Form is given as N =
{1, 2, 3, 4…..}.

2) Set Builder Form


In Set Builder Form, a rule or a statement describing the common characteristics of all the elements is
written instead of writing the elements directly inside the braces.
For Example, a set of all the prime numbers less than or equal to 10 is given as
P = {p : p is a prime number ≤ 10}.
In another example, the set of Natural Numbers in set builder form is given as
N = {n : n is a natural number}.
Types of Sets
There are different types of sets categorized on various parameters. The different types of sets
are explained below:

Empty Set
A set that has no elements inside it is called an Empty Set. It is represented by Φ or {}.
For Example A = {x : x ∈ N and 2 < x < 3}.
Here, between 2 and 3, no natural number exists, hence A is an Empty Set. Empty Sets are also known as Null
Sets.

Singleton Set
A set that has only one element inside it is called a Singleton Set.
For Example, B = {x : x ∈ N and 2 < x < 4} = {3}.
Here between 2 and 3 only one element exists, hence B is called a Singleton Set.

Finite Set
A set that has a fixed or finite number of elements inside it is called a Finite Set.
For Example A = {x : x is an even number less than 10} then A = {2, 4, 6, 8}.
Here A has 4 elements, hence A is a finite set. The number of elements present in a finite set is called the
Cardinal Number of a finite set. It is given as n(A) = 4.

Infinite Set
A set that has an indefinite or infinite number of elements inside it is called a Finite Set.
For Example A = {x : x is an even number } then A = {2, 4, 6, 8……}. Here A has unlimited elements, hence
A is an infinite set.

Equivalent Sets
If the number of elements present in two sets is equal i.e. the cardinal number of two finite sets is the same
then they are called Equivalent Sets.
For Example, A = {x : x is an even number up to 10} = {2, 4, 6, 8, 10} and
B = {y : y is an odd number less than 10} = {1, 3, 5, 7, 9}.
Here, the cardinal number of set A is n(A) = 5 and that of B is given as n(B) = 5 then we see that n(A) =
n(B). Hence A and B are equivalent sets.

Equal Sets
If the number of elements and also the elements of two sets are the same irrespective of the order then the
two sets are called equal sets.
For Example, if set A = {2, 4, 6, 8} and B ={8, 4, 6, 2}
then we see that number of elements in both sets A and B is 4 i.e. same and the elements are also the same
although the order is different. Hence, A and B are Equal Sets. Equal Sets are represented as A = B.

Unequal Sets
If at least any one element of one set differs from the elements of another set then the two sets are said to
be unequal sets.

For Example, if set A = {2, 4, 6, 8} and B = {4, 6, 8, 10}


then set A and B are unequal sets as 2 is present in set A but not in B and 10 is present in set B but not in A.
Hence, one element differs between them thus making them unequal. However, the cardinal number is the
same therefore they are equivalent sets.
Overlapping Sets
If at least any one element of the two sets are the same then the two sets are said to be overlapping sets.
For Example, if set A = {1, 2, 3} and set B = {3, 4, 5} then we see that 3 is the common element between set
A and set B hence, set A and set B are Overlapping Sets.

Disjoint Sets
If none of the elements between two sets are common then they are called the Disjoint Sets i.e., for two sets
A and B if A. For Example, set A = {1, 2, 3} and set B = {4, 5, 6} then we observe that there is no common
element between set A and set B hence, set A and B are Disjoint Sets.

Apart from the above-mentioned sets, there are other sets called, Subsets, Supersets, Universal Sets, and
Power Sets.

Subsets
If A and B are two sets such that every element of set A is present in set B then A is called the subset of B. It
is represented as A ⊆ B and read as „A is a subset of B‟. Mathematically it is expressed as
A ⊆ B iff
a ∈A⇒ a ∈ B
If A is not a subset of B we write it as A ⊄ B.
For Example, if A = {1, 2} and B = {1, 2, 3} then we see that all the elements of A are present in B, hence A ⊆
B.
There are two kinds of subset Proper Subset and Improper Subset.

Proper Subset
If a subset doesn‟t contain all the elements of the set or has fewer elements than the original set then it is
called the proper subset.
For example, in set A = {1, 2} and B = {1, 2, 3},
The subset A doesn‟t contain all the elements of the original set B, hence A is a proper subset of B. It is
represented as A ⊂ B. Empty set is a proper subset of a given set as it has no elements.

Improper Subset
If a subset contains all the elements that are present in the original set then it is called an Improper Subset.
For Example, if set A = {1, 2, 3, 4} and set B = {1, 2, 3, 4} then A is the improper subset of set B. It is
mathematically expressed as A ⊆ B. Thus we deduce that two sets are equal iff A ⊆ B and B ⊆ A. It should be
noted that an empty set is an improper subset of itself.

Some Important Results on Subset


 Every set is a subset of itself
 An empty Set is a subset of every set.
 The number of possible subsets for a given finite set with „n‟ number of elements is equal to 2n.
Superset
If all the elements of set A are present in set B then set B is called the Superset of set A. It is represented as
B ⊇ A.
Let‟s say if A = {2, 3, 4} and B = {1, 2, 3, 4} then we see that all elements of set A are present in set B, hence
B ⊇ A.
If a superset has more elements than its subset then it is called a proper or strict superset. A Proper Superset
is represented as B ⊃ A.
Some of the Properties of Supersets are mentioned below:
 Every set is a superset of itself.
 Every set is a superset of an empty set.
 Total number of possible supersets for a given subset is infinite
 If B is a superset of A then A is a subset of B
Universal Set
The set that contains all the sets in it is called a Universal Set.
Let‟s say set A = {1, 2, 3}, set B = {4, 5}, and set C = {6, 7} then
Universal Set is given as U = {1, 2, 3, 4, 5, 6, 7}.
Another Example of a Universal Set is U = {Set of All Living Beings} then which includes both floras and faunas. Flora
and fauna are the subsets of Universal Sets U.

Power Set
 A set that contains all the subsets as its element is called the Power Set. The power set is a set which includes all
the subsets including the empty set and the original set itself.
 It is usually denoted by P. Power set is a type of sets, whose cardinality depends on the number of subsets
formed for a given set.
 If the given set has n elements, then its Power Set will contain 2n elements. It also represents the cardinality of
the power set.
 For Example, if set A = {1, 3, 5} then its subsets are {Φ}, {1}, {2}, {3}, {1, 3}, {3, 5}, {1, 5} and {1, 3, 5}
then its Power Set is given as
P(A) = {{Φ}, {1}, {2}, {3}, {1, 3}, {3, 5}, {1, 5}, {1, 3, 5}}.
Set Theory Symbols:
There are various symbols that are used in Sets Theory. The symbol and their explanation are tabulated below:

Symbol Explanation
{} Set
x∈A x is an element of set A
x∉A x is not an element of set A
∃ or ∄ There exist or there doesn‟t exist
Φ Empty Set
A=B Equal Sets
n(A) Cardinal Number of Set A
P(A) Power Set
A⊆B A is a subset of B
A⊂B A is the Proper subset of B
A⊈B A is not a subset of B
B⊇A B is the superset of A
B⊃A B is a proper superset of A
B⊉A B is not a superset of A
A∪B A union B
A∩B A intersection B
A‟ Complement of Set A

Sets Operation/Combination of set


The sets undergo various operations which include their union of sets, the intersection of sets, the difference of sets,
the complement of sets, and the Cartesian Product of Sets. We will learn them briefly below:
Union of Sets
Union of Sets basically refers to uniting two sets and writing their elements in a single set without repeating
elements if common elements are present.
The union of sets is given by A ∪ B.
For Example if Set A = {2, 4} and Set B = {4, 6} then
A ∪ B = {2, 4} ∪ {4, 6} = {2, 4, 6}

Intersection of Sets
Intersection of sets refers to finding the common elements between two sets.
It is given by A ∩ B.
For Example if set A = {2, 4} and B = {4, 6} then
A ∩ B = {2, 4} ∩ {4, 6} = {4}.
Difference of Sets
Difference of Sets refers to the deletion of common elements of two sets and writing down the remaining
elements of two sets.
It is represented as A – B.
For Example if et A = {2, 4} and B = {4, 6} then
A – B = {2, 6}

Complement of Set
 Compliment of Set refers to the set of elements from the universal set excluding the elements of the set of
which we are finding the compliment.
 If x is a set, then the complement of x (denoted by x‟) is the set of all things not in it. It is also represented
as x.
Example: U = {1,2,3,4,5,6,7,8} and A = {1,2,5,6}
Then, complement of A will be;
A‟ = {3,4,7,8}.

Cartesian product of Sets


 Cartesian Product of Sets refers to the product between the elements of two sets in ordered pair. It is given
as A ✕ B.
 For Example If A = {1, 2, 3} and B = {3, 4}, find the Cartesian product of A and B.
A ✕ B = = {(1, 3), (1, 4), (2, 3), (2, 4), (3, 3), (3, 4)}

Example 2: If P = {5, 6}, find the set P × P × P.


Solution:
P × P × P = {5, 6} × {5, 6} × {5, 6}
= {(5, 5, 5), (5, 5, 6), (5, 6, 5), (5, 6, 6), (6, 5, 5), (6, 5, 6), (6, 6, 5), (6, 6, 6)}

Venn Diagram
 Venn diagram is a technique for representing the relation between two sets with the help of circles, generally
intersecting.
 Venn diagrams are the diagrams that are used to represent the sets, relation between the sets and operation
performed on them, in a pictorial way.
 Venn diagram, introduced by John Venn (1834-1883), uses circles (overlapping, intersecting and non-
intersecting), to denote the relationship between sets. A Venn diagram is also called a set diagram or a logic
diagram showing different set operations such as the intersection of sets, union of sets and difference of sets.
 For Example, two circles intersecting with each other with the common area merged into them represent the
union of sets, and two intersecting circles with a common area highlighted represents the intersection of sets
while two circles separated from each other represents the two disjoint sets. A rectangular box surrounding
the circle represents the universal set. The Venn diagrams for various operations of sets are listed below:
Examples on set

Example 2:

Propositional Logic
 A proposition is a collection of declarative statements that has either a truth value "true” or a truth
value "false". A propositional consists of propositional variables and connectives.
 We denote the propositional variables by capital letters (A, B, etc). The connectives connect the
propositional variables.
Some examples of Propositions are given below −
 "Man is Mortal", it returns truth value “TRUE”
 "12 + 9 = 3 – 2", it returns truth value “FALSE”
The following is not a Proposition −
 "A is less than 2". It is because unless we give a specific value of A, we cannot say whether the statement is true
or false.

Logical connectives
In propositional logic generally we use five connectives which are −
1. OR (∨) 2. AND (∧) 3. Negation/ NOT (¬) 4. Implication / if-then (→)
5. If and only if (⇔)
OR (∨)

The OR operation of two propositions A and B (written as A∨B) is true if at least any of the propositional
variable A or B is true.The truth table is as follows −

A B AVB
True True True
True False True
False True True
False False False

AND (∧)

The AND operation of two propositions A and B (written as A∧B) is true if both the propositional variable A
and B is true. The truth table is as follows −

A B A∧ B
True True True
True False False
False True False
False False False

Negation (¬)

The negation of a proposition A (written as ¬A) is false when A is true and is true when A is false.The truth table
is as follows −

A ¬A
True False
False True

Implication / if-then (→)

An implication A→B is the proposition “if A, then B”. It is false if A is true and B is false. The rest cases are
true. The truth table is as follows −

A B A→B
True True True
True False False
False True True
False False True

If and only if (⇔)

A⇔B is bi-conditional logical connective which is true when p and q are same, i.e. both are false or both are
true. The truth table is as follows −

A B A⇔B
True True True
True False False
False True False
False False True
Q: Construct Truth table for [(p⟶ q) ∧ ¬ q]⟶ ¬p

Tautology
 A proposition P is a tautology if it is true under all circumstances.
 It is an assertion of Propositional Logic that is true in all situations; that is, it is true for all possible values of
its variables
 The simple examples of tautology are;
* Either Mohan will go home or Mohan will not go home.
* He is healthy or he is not healthy
Example: Prove that the statement (p⟶q) ↔(∼q⟶∼p) is a tautology.

p q p→q ~q ~p ~q⟶∼p (p→q)⟷( ~q⟶~p)


T T T F F T T
T F F T F F T
F T T F T T T
F F T T T T T

As the final column contains all T's, so it is a tautology.

Q: Prove that p⟶q and ¬ q⟶ ¬p are logically equivalent using truth table.
Contradiction
 A statement that is always false is known as a contradiction.
 It is an assertion of Propositional Logic that is false in all situations; that is, it is false for all possible values of
its variables.
Example: Show that the statement p ∧∼p is a contradiction.
p ∼p p ∧∼p
T F F
F T F

Since, the last column contains all F's, so it's a contradiction .

Normal Forms
 A (P1, P2, ... , Pn) is a statements formula then the construction of the truth table may not be practical always.
The problem of finding whether a given statement is tautology or contradiction or satisfiable in a finite number
of steps is called the Decision Problem.
 For Decision Problem, construction of truth table may not be practical always. We consider an alternate
procedure known as the reduction to normal forms.

Types of Normal form


1. Disjunctive Normal form (DNF)
 A statement form which consist of disjunction between conjunction is called DNF.
 The symbol for disjunction is ∨, which is also written as "v" or the word "or".

Examples: 1. (pq)  r
2. (p ∧ ~ q) ∨ (q ∧ r) ∨ (~ p ∧ q ∧~ r)
2. Conjunction Normal form (CNF)
 A statement form which consist of conjunction between disjunction is called CNF.
 The symbol used to represent conjunction is the logical AND operator, often denoted by the symbol "∧"
Examples: 1. (~p ∨ q) (~p ∨ r)

2. (~p ∨ q) ∧ (q ∨ r) ∧ (~ p ∨ q ∨ ~ r)
Q1: Let p and q be the propositions “Swimming at the New Jersey shore is allowed” and “Sharks have
been spotted near the shore,” respectively. Express each of these compound propositions as an
English sentence.
a) ¬q b) p ∧ q c) ¬p ∨ q d) p →¬q e) ¬q → p f ) ¬p →¬q g) p ↔¬q h) ¬p ∧ (p∨ ¬q)
Solution:
a) The proposition ¬q as an English sentence is "Sharks have not been spotted near the shore"

b) The proposition p ∧ q as an English sentence is "Swimming at the New Jersey shore is allowed
and sharks have been spotted near the shore"

c) The proposition ¬p ∨ q as an English sentence is "Swimming at the New Jersey shore is not
allowed or sharks have been spotted near the shore"

d) The proposition p →¬q as an English sentence is "If swimming at the New Jersey shore is
allowed then sharks have not been spotted near the shore"

e) The proposition ¬q → p as an English sentence is "If sharks have not been spotted near the shore
then swimming at the New Jersey shore is allowed"

f ) The proposition ¬p →¬q as an English sentence is "If swimming at the New Jersey shore is not
allowed then sharks have not been spotted near the shore"

g) The proposition p ↔¬q as an English sentence is "Swimming at the New Jersey shore is allowed if
and only if sharks have not been spotted near the shore"

h) The proposition ¬p ∧ (p∨ ¬q) as an English sentence is "Swimming at the New Jersey shore is not
allowed, and swimming at the New Jersey shore is allowed or sharks have not been spotted near the
shore"

Q2: Use De Morgan’s laws to find the negation of each of the following statements.
(a) Kwame will take a job in industry or go to graduate school.
(b) Yoshiko knows Java and calculus.
(c) James is young and strong.
(d) Rita will move to Oregon or Washington.

Solution:
Let's break the sentences if we encounter conjunctions(and) or disjunctions(or) into 2 propositional
statements namely (p & q) as follows:-
(a) p=Kwame will take a job in industry; q= Kwame will go to graduate school
(b) p=Yoshiko knows Java; q = Yoshiko knows Calculus
(c) p=James is young; q=James is strong.
(d) p=Rita will move to Oregon; q=Rita will move to Washington
Now, to find the negation of the sentences,we first combine p & q using connectives(conjunctions or
disjunctions) and then apply DeMorgan's law:-
Predicate Logic
 Predicate is a sentence that contains one or more variables. A predicate becomes a proposition when
the variables are substituted with specific values.

eg: Ram is bachelor. Sham is bachelor.


Then p(x): x is bachelor.
Where, x is predicate variable and p(x) is propositional function.

Examples:

Quantifiers
 The variable of predicates is quantified by quantifiers.
 Quantifiers are words that refer to quantities such as ”some” or ”all” and tell for how many
elements a given predicate is true.
 Quantifiers allow us to talk about all objects or the existence of some object
There are two quantifiers in first-order logic:
1. Universal quantifier
2. Existential quantifier
Examples:
Logical Equivalences involving Quantifiers
Two logical statements involving predicates and quantifiers are considered equivalent if and only if they
have the same truth value no matter which predicates are substituted into these statements irrespective of
the domain used for the variables in the propositions.

Q: Transcribe the following into logical notation. Let the universe of discourse be the real numbers.
i. For any value of x, x2 is non-negative.

( ∀x∈R)P(x2>0)

ii. For every value of x, there is some value of y such that x.y = 1.
(∀x∈R ∃y∈R) P(x.y=0)

iii. There are positive values of x and y such that x .y > 0.


(∃x ∃y) P((x>0)(y>0) → (x.y>0)

iv. For every real numbers x and y, if x is positive and y is negative then xy is negative.
(∀x ∀y) P((x>0)(y<0) → (xy<0)

v. There is a value of x such that if y is positive, then x + y is negative.


(∃x ∃y) P((y>0) → (x+y<0)
Principle of mathematical induction
o Mathematical induction is one of the techniques which can be used to prove variety of mathematical statements
which are formulated in terms of n, where n is a positive integer.
o Let P(n) be a given statement involving the natural number n such that
1. The statement is true for n = 1, i.e., P(1) is true (or true for any fixed natural number) and
2. If the statement is true for n = k (where k is a particular but arbitrary natural number), then the statement is also true
for n = k + 1, i.e, truth of P(k) implies the truth of P(k + 1). Then P(n) is true for all natural numbers n.

Example: Prove statement by using the Principle of Mathematical Induction for all n ∈ N, that
1 + 3 + 5 + ... + (2n – 1) = n2
Solution:
Let the given statement P(n) be defined as
P(n) : 1 + 3 + 5 +...+ (2n – 1) = n2, for n ∈ N.
Note that P(1) is true, since
P(1) : 1 = 12
Assume that P(k) is true for some k ∈ N, i.e.,
P(k) : 1 + 3 + 5 + ... + (2k – 1) =k2
Now, to prove that P(k + 1) is true, we have
1 + 3 + 5 + ... +(2k – 1) + (2*k + 1+-1) =k2 + (2k + 1)
1 + 3 + 5 + ... +(2k – 1) + (2k + 1) =k2 + 2k + 1
= (k + 1)2
Thus, P(k + 1) is true, whenever P(k) is true.
Hence, by the Principle of Mathematical Induction, P(n) is true for all n ∈ N.
Q: Prove statement by using the Principle of Mathematical Induction for all n ∈ N, that
1 + 2 + 3 + ... + n = n(n+1)/2

Well-ordering principle
 The well-ordering principle states that every non-empty set of positive integers has a least element. This means
that given any set of positive integers, there is always a smallest number in that set.
 To understand this principle better, let's look at an example. Consider the set of positive integers {1, 2, 3, 4, ...}.
This set is well-ordered because it has a smallest element, which is 1. Every other element in the set is greater than
1, so 1 is the least element.
 Now let's consider the set of positive even integers {2, 4, 6, 8, ...}. This set is also well-ordered because it has a
smallest element, which is 2. Every other element in the set is greater than 2, so 2 is the least element.
Recursive definition
 Recursive Function is a function that repeats or uses its own previous term to calculate subsequent
terms and thus forms a sequence of terms.
 For any recursively defined function, it has two parts. The first part is the definition of the smallest
argument and the second part is the definition of the nth term. The smallest argument is usually denoted
by f(0) or f(1) and the nth argument is denoted by f(n).
Let the sequence be 5, 7, 9, 11
The recursive formula for the given sequence is given by
f(0)= 5
f(n) = f(n-1)+2
Now, we can check the sequence terms using the recursive formula as follows:
f(0)= 5
f(1) = f(0)+2
f(1)= 5+2 = 7
f(2) = f(1)+2
f(2)= 7+2 =9
f(3)= f(2)+2
f(3)= 9+2 = 11
In this way, we can find the next term in the sequence with the help of the recursive function formula.

The Division Algorithm


The division algorithm states that for any integer a and any positive integer b, there exist there
exist unique integers q and r such that

For example,
o if a is 36 and b is 13, then q = 2 and r = 10 (since 36 = 2.13 + 10).
o Likewise if a is -63 and b is 20, then q = -4 and r = 17 (since -63 = -4.20 + 17).
o Finally, if a is 24 and b is -15, then q = -1 and r = 9 (since 24 = -1.(-15) + 9).
Observations:

 In the Division Algorithm it is required that ‘b’, the divisor, be a positive integer.
 If the remainder is equal to zero then the division of ‘a’ by ‘b’ is exact (or equivalently ‘a’ divides
evenly into b). In this case both d and q are factors of ‘b’.
 If the remainder is different than zero then there must be a remainder (r) that must 0 ≤ r <b. In this
case, ‘a’ does not divide evenly into b. Therefore, d is not a factor of ‘a’.
 As a consequence of the previous statement any statement of the form ‘a’ = b*q + 1 indicates that b
does not divide ‘a’.
Greatest Common Divisor (GCD)
 Suppose a & b are integers and not both are zero. An integer d is called a common devisor of a & b if d
divides both a & b.
 1 is common devisor of both a & b.
 Any common devisor of both a & b can‟t be greater than both a & b.
 It is denoted by gcd(a,b).
Eg 1. gcd(12,18)
The common devisor are:

The greatest common devisor is(+6), therefore gcd(12,18)=6


Eg 2. gcd(12,-18)=6
Euclidean algorithm:

The Euclidean algorithm is a way to find the greatest common divisor of two positive integers, a and
b. The computations for a=210 and b=45 are:

 Divide 210 by 45, and get the result 4 with remainder 30, so 210=4*45+30.
 Divide 45 by 30, and get the result 1 with remainder 15, so 45=1*30+15.
 Divide 30 by 15, and get the result 2 with remainder 0, so 30=2*15+0.
 The greatest common divisor of 210 and 45 is 15.

 The Fundamental Theorem of Arithmetic


 Every composite number can be expressed (factorized) as a product of primes, and this factorization
is unique, apart from the order in which the prime factors occur. This is called Fundamental
Theorem of Arithmetic.
 This theorem says that every composite number can be rewritten as the product of prime numbers in a
“unique” way, except for the order in which primes occur .
 Fundamental Theorem of Arithmetic states that every integer greater than 1 is either a prime number
or can be expressed in the form of primes. In other words, all the natural numbers can be expressed in
the form of the product of its prime factors. The prime factors are the numbers which are divisible by
1 and itself only.
 Therefore, every natural number can be expressed in the form of the product of the power of its
primes. This statement is known as the Fundamental Theorem of Arithmetic, unique
factorization theorem or the unique-prime-factorization theorem.

Example: Factorize the number “4072”

Factorize the number “16048”

You might also like