UNIT-I1
Basic Structures, Sets, Functions, Sequences, Sums, Matrices and Relations Sets, Functions,
Sequences & Summations, Cardinality of Sets and Matrices Relations, Relations and Their
Properties, nary Relations and Their Applications, Representing Relations, Closures of
Relations, Equivalence Relations, Partial Orderings.
SETS
Set: A set is an unordered collection of distinct objects, called elements or members of the set. A
set is said to contain its elements.
The sets are denoted by uppercase letters and elements are denoted by lowercase letters.
Empty Set or Null Set: The null set (s denoted by'g'or {_ }.e.the set has no elements.
Singleton Set: A set with one element is called a singleton set.t.e.A = {1}
Subsets: The set A is a subset of B and B is a super set of A.if and only if every element of A is
also an element of B. It is denoted by A & B read as “A is a subset of the set B”
Proper Subset: If A is a proper subset of B if and only if x(x € A> x EB) A
ax(x € BA x A)istrue.
Size of a set: The number of ‘n’ distinct elements in a set A is called the size of a set is denoted
bylAl =n.
Finite Set: The number of elements in A are finite then we say that A is called finite set.
Infinite Set: A set is said to be infinite if it is not finite
Power Set: The set of all subsets of set S is called.a power set and is denoted by P(S) =2
‘Where nis the distinct elements of S.
1. What is the power set of the set {0,1,2}.
Solution: P {0, 1, 2}
(9, {0}, {1}, {2}, €0,1}, {0,2}, (1.2},{0,1,2}}
Cartesian product: Let A and B be sets.The Cartesian product of A and B is denoted by
AB Is the set of all ordered pairs (a, b), where a € Aandb € B.
Hence A x B = {(a,b)|a € A and b € BY
[Page By S.Krishna reddy2. What is the Cartesian product of A= {1,2}and B = {a,b,c}.
Solution: x B = {(1,a), (1,6), (1,c), (2,4), (2,6), (2,c)} = 6Lemxn=2x3=6
Equal Sets: If A and Bare sets, then A and B are equal if and only if vx(x€ AS XE
B).we write A = B.
Universal Set (U): In Venn diagrams the universal set. Le. we draw a rectangle to indicate the
universal set U.
Set Notation with Quantifiers:vx € SP(x)is short hand for Vx(xeS > P(x)
3xeSP(x)is short hand for 3x(xeS and P(x)
1. xeR(x? 2 0) = forevery real number x,x? = 0. The sequence of every real number
is non-negative.
2. VxeZ(x? = 1)means “There is an integer whose square is 1°.
‘Truth Set: The truth set of P(x) is denoted by {xeD|P(x)}
1. The set of integers and P(x) is |x| = 1. Then the truth set of P(x) is (1,-1}.
2. The set of integers and Q(x)is x? = 2.Then the truth set of Q(x) is @
3. The set of integers and R(x)is |x] = x-Then the truth set of R(x) is N
Cardinality
Cardinality ofa set means size of a set. It is denoted by |A|
1. A set of all odd integers less than 10./.¢.A = (1,3,5,7,9} « [A] =5
2. Cardinality of null set is “0”
Operations
Union: The union of the sets A and B, denoted byd UB, is the set that contains those elements
that are either in A or in B, or both.i. e.4 UB = (x|xeA or xeB}
1. If A= (13,5), B= (1,2,3)thn d UB = (1,2,3,5]
Intersection: The intersection of the sets A and B, denoted byA 1 B, is the set containing those
elements in both A and B. ie. NB = (x|xeA and xeB}
1. If A= (13,5), B= (1,2,3)thn An B = (1,3)
Disjoint: Two sets are called disjoint if their intersection ts the empty set.
1. If A={13,5,7,9}, B = (24,6,8,10}then ANB = @ = A,B are disjoint sets.
2|Page By S.Krishna reddyDifference: The difference of A and B, denoted by A— B,is the set containing those
elements
that are in A but not in B.'he dif ference of A and Bis called the complement of B
with respect to A.i.e.A — B = {x|xeA and x € B}
1. If A= {1,35}, B = (1,2,3}then A —B = {5}
2. Let A= {xeZ*|x > 10}then A= (1,23,4,5,6,7,8,9,10}
The compliment of Ais denoted by A or A‘ with respect toU = AS =U ~ Ai.e.
{xeU|x € A}
Note: A—B=ANB
IDENTITY LAWS
Aldentity law
; @ Domination law
AUA=4,ANA =A idempotent law
(A) =A complementation
AU B=BUA,ANB = BN A commutative law
AU (BUC) = (AUB)UGAN (BNC) = (ANB)n Cassoctative law
AU (BNC) = (AUB)N(AUC),AN (BUC) = (ANB)U(AN
C)Distributivelaw
AUB=ANB,ANB =AUBDe~— morgan'slaw
AU (ANB) = 4,AN (AUB) =A absorption law
10.AU A= U,An A= @ Complement law
re
ve
PROBLEMS
1, Provethat AUB=ANB
Solution: We know that
AUBCANB
LetxeA UB
=x AUB
=x¢Aandx€B
=>xeAandxeB
=xeAnB
3[Page By S.Krishna reddy,AnB
-AD
We know that
Letx€ ANB
=x eAandxeB
=x eAandxeR
From (1) and (2)
= AUB=ANB
2. Prove that AN BC AUB.
Solution: Suppose let x € ANB
> xeAandxeB
=>x€AorxeB
=>xEAUB
= ANBEAUB
3. Prove that A — (B.C) S (A—B) U (AC).
Solution: Suppose x € 4 — (BNC)
=> x € Aandx € (BNC)
=>x€AandxeBorxe€
> x €Aandx 8 orxe Aandxe C
=x €Aandx ¢ Borx€Aandx €C
4|Page
By S.Krishna reddy,=xe(A-B)U(A-C)
«A-(BNC)S(A-B)U(A-C)
4.1fA & B then prove that (A— C) ¢ (B-C).
Solution: Suppose x € A—C
=>xeAandxéC
+ AGB> xe Ameansx€B
=>x€BandxéC
SxEB-C
2 (A-C)S(B-C)
5. Prove that (4U B) —C = (A—C) U(B-C).
Solution: (A UB) —C
= (AUB) € by complimentary
= (ANC) U(BN C)by distributive law
= (A-C€)U(B-C) since ANB =A-B
6. Using proof by contradiction show that if a and B are any sets A 10 (B— A) = .
‘Solution: Suppose
AN(B-A)#9
AxcU|xeA 0 (B— A)
=x e€AandxeB-A>
x €Aandx€ (BNA)
=x €Aandx€BandxeA
=x eAandxeA
= Which is a contradiction.
5|Page By S.Krishna reddyOR
Let xeA 9 (B— A)
= xeA and xe(B— A)
= xeAand xeB and x @ A
= (x Aand xeA)and xeB
= eq and xeB
= xe(BN—) > xe
Hence AN (B= A) = 9
RELATIONS
Relations are derived from Cartesian product. Let A and B be two non — empty sets,
then a relation R from A to Bisa subset of AX Bie.R SAX B.
1. Let A = {1,2,3,45}and R = {(x,y)Ix yeA,y > x
= {(1,0), (1.2), (1,3), (1.4), (1,5), (2,2), (2,3), (2,4), (2,5), (3,3), (3,4), (3,5), (4.4), (4,5), (5,5)}
Note:
Let n(4) = mand n(B) = nthen the number of relations = 2”.
The number of non — empty relations = 2" — 1.
FUNCTIONS
Avtelation ‘f from a set A to a set B is called function: A > B if to each element aeA, we can
assign unique element of B.The domain of “fis A and codomain of “fis B.
Range: [f f:A— B is a fmotion then the range of “f is defined as Range= (f(a) |acA}
Ex: If A= (1,2,3},B = {a,b}. Then range of ‘f = {f(1), f(2).f(3))
Every function is a relation, However, not every relation be a funetion,
Tnjective (one to one)
A function f:4 — B is said to be one to one function. If different elements have different
images. (OR)
6|Page By S.Krishna reddyIf f(x) = f&a)then x, = x2 or If f(x,) # f(a)then x, # x
then ‘fis said to be 1-1
1. Show f (x) = 3x — 2 Is injective
Solution: f(x,) = fa) > x1 =a
TE f(@) = fr) 3 3x, -2 = 3x, —2 9 34 = 3K SMS
+ f(x)is injective,
? injective or not?
2. Is f=
Solution: If f(o)
Fa) 2 af = 33
3 tx: =m
+ f(x)is not injective.
Surjective (onto)
Let f;X > Y.f is onto if and only if vyeY, xeX such that f(x) = y(codomain = range)
L.f(x) = 5x + 2s onto for vxeR.What about VxeZ?
ad
Solution: y = f(x) >y =5x+2y-2=5e5x
¥ =Othenx=
2 f:R > Ris onto.
2 1
-gandy=1x=-Z
y=7x=landy =5,x = 5+ f:Z > Zisnot onto.
tales
a
y=7.x= Landy =5,x=2
+ f:R>Zis onto.
Bijective (one to one and onto)
A function f:A > B is said to be bijective if ‘f’ is one to one and onto. (OR)
For f:X + Y, each xeX maps to exactly one unique yeY.
Identity Function:
IE: B is said to be identity function if f(x) = xvx
T|Page By S.Krishna reddyInverse Function:
Given f:X > Y,we define the inverse as f~*:¥ + XLe.f(x) =y 9 f*Q) =x.
‘Composition of functions:
Let f:4 > B bea function and g: B > C bea function then the composition of the
function f and g denoted by gof:A > C and is defined as gof(a) = g[f(a)]
PROBLEMS
1. Find the inverse of the function f(x) = x° +1.
Solution: Let f(x) = y
extisy
exsy-1
S>x=(y-13
2 PQ) =(y- DE
2 f(x) = (x= 1)
2. Let A = {1,2,3,4}, B= (a,b, cland ¢ = {w,x,y,z}with f:A > Band g:B > C given
by f = (1,4), (2,4), 3,5), (4,6)},9 = (a,x), (by), (6 2))find gof.
Solution: Given A = {1,2,3,4},8 = {a,b,c}and C = (w,x,y,z}
f= {G,2), (2,0), (3,6), (4,0},9 = (a,x), (by), (C2)
gof() = off) = gla] =x
gof (2) = glf(2) = gla] =x
gof(3) = gl f(3)1 = gb = y
gf (4) = g[f(4)] = gle] =z
+ gof = (1.x), (2,2), 3,y),4,2)}
8|Page By S.Krishna reddy3. Consider the functions ‘f” and ‘g” defined by f(x) = x°and g(x) = x? +1
find gof, fog, f?and g’.
Solution: Given f(x) = x?and g(x) = x? +1
gof(x) = g[f(x)] = elx®] =)? +1 =x° +1
fog(x) = flg(x)] = fix? + 1] = (x? + 1)3 = x° + 3x* + 3x7 41
°
f? = fof (x) = fIF@)1 = fle] = @4)*
9? = gogx) = glo] = gk? + I= 0? +1)? +1 = x4 $2x7 42
4, Let“P and ‘g’ be two functions from R + R defined by f(x) = ax + b,
g(x) =1-x4+2x2.If fog(x) = 9x? — 9x + 3. Find the values of ‘aand'b’.
x? = Ox + 3
Solution: Given by f(x) = ax + b, g(x)
x +x? and fog(x) =
fog(x) = flg()] = fl —x +27] = a —x +27) +b
sax+ax?+b
Given fog(x) = 9x? —9x +
Equating the coef ficients of constat, x,x®on both sides, we have
a+b =3,a=9 implies b = ~6
5. Let the function f:N > N and g:Z + N be defined as follows,
f(x) = 3x +2 and g(x) =x? + 1 specify the functions
6. Let f, g,h be the functions from Z to Z defined by f(x) = x — 1, g(x) = 3x.
0,xiseven
RO = (axis odd
Determine fo(goh)(x)and (fog)oh(x)and show that
fo(goh)(x) = (fog)o(h(x).
Solution: Given f(x)
1.g(%) = 3x.h(x) =
1, xis even
fo(goh) (x) = flgh()] = fl3hx] = 3hx — 2,xis odd
9|Page By S.Krishna reddy,1, xis even
(Fogyoh(x) = f[3hx) = 3hx~1= {OFS cad
+ fo(goh)(x) = (fog)oh(x)
7.Let A = {1,2,3, 4}and'f'and'g'befunctions from A to A given by
f= {G,4), 2, 0, 3,2), 4,3)},9 = (C2), (2,3), 3,4), (4, D}
prove that f, g are inverse of each other.
Solution:
gf (1) = [FQ] = 94) = 1
gof(2) = glf(2)] = g(1) =2
gof(3) = gif(3)] = g(2) =3
gof(4) = glf(4)] = a3) = 4
« gof = 1= {(1,1), (2,2), (3,3),(4,4)} and
fog) = Flg(M) = F[2] =1
Fog(2) = fl9(2)] = f[3] =2
Fog(3) = Fl9(3)1 = f[4] = 3
fog) = fg) = /) = 4
(1.1), (2.2), (3,3), (4.4)}
8. Consider the function f:R > R defined by f(x) = 2x +S and
9:R = R be defined by g(x) = te —5).Prove that g isan inverse of f.
Solution: Given f(x) = 2x + 5.and g(x) = 3(x~5)
fou) = sual =s 5-9] = 25-9] +8 =~
10/P as By S.Krishna reddy,gofG) = olf = alex +5) =2[5-)] +5 =x
+ fog=1
af=g?
Properties of Relations
Represent of Matrix relation: A relation can be represented in terms of a matrix.
Let R:A B be a relation where A and B are finite sets containing elements
A= {a4, a9, — — ay}, B = {by, ba, — — by} -Then R can be represented by m xn
Lif (ajpbjeR
if (ab €R
iy = [m]where my =
PROBLEMS
1. Find the matrix of a relation’R’ on a set A = (1,3, 4}
where R = {(1,1), (4,3), (3,3).(4.4)}.
1jl 1 OF
Solution: Mz,3 ap 1 (
4l0 0 1
2. Find the relation R from the set A= {ay, @2, a3}, B = {by, ba, bs, bs} with the matrix
4/0 10 0
relation given byMy = @2 [: o 1 4).
alto 1 0
Solution: R = {(a;,b2),(42,b4), (az, bs), (a2, b4), (as, by), (as-b3)}
Graph of relation.
A={a,b,c,d),R = {(a,b), (b,b), (b,d), (c,b), (¢, d),(d, a), (d,c)}
Solution:
u\P By S.Krishna reddy,3. Let A= {1,2,3,4} and R be the relation on A defined y xRy iff y = 2x.
a. Write down R asa set of ordered pairs.
b. Draw the graph of R.
c. Determine the in degrees and out degrees of the vertices in the graph.
Solution: a. Given A = {1,2,3, 4}andthe relation is y = 2x
R={(1,2),(2,4)}
b. Graph
{1,2,3,4} and R be the relation on A defined by xRy iff “x divides y
a, Write down R as a set of ordered pairs.
b. Draw the graph of R.
¢. Determine the in degrees and out degrees of the vertices in the graph.
d. Determine matrix of the relation.
Solution: a. Given A = {1,2,3,4}andthe relation tsx divides y i.e. x|y Le.y = mx
R= ((1),(12), (3), 14), (2,2), (2,4), (3,3),(4.4)}
b.Graph
By S.Krishna reddyVertices i 2 3 4
In degrees hi 2 2 3
ut degrees 4 2 1 1
atta dt
tos fomie 8 é u |
aloo 0 1
8. Let A= [1,2,3,4, 6) and R be the relation on A defined by xRy iff “x is a multiple of
y.
a, Write down R as a set of ordered pairs.
b.Draw the graph of R.
eDetermine matrix of the relation,
Solution: Given A = (1,2,3,4,6}and the relation is “x is a multiple of y”
R= ((11), (2.1), (3.1), 41), 61), (2.2), (3,3), (44), (6.6), (4.2), (6.2), (6.3)}
TYPES OF RELATIONS
Rellexive:¥eA implies (x,x)eR
Symmetric:/f (x. y)eR implies (y,x)eR
Transitive: If (x, y)eRand (y,z)eRimplies (x,z)eR
‘Equivalence Relation
If the relation R satisfies reflexive, symmetry and transitive then R is called equivalence relation.
PARTIAL ORDERING RELATION,
A relation R is said to be a partial order relation if R is reflexive, anti-symmetry and transitive
Totally Ordered Relation
Let (p,<)ts a POSEt tf for every element a,beA.we have elther a < bor b
)and (p,>)is a dual of (p,<).
BP By S.Krishna reddyPOSET
A set ‘A’ with partial ordering relation ‘R' defined on A is called POSET. Denoted by [A,R]
Hasse Diagram
‘A graphical representation of a partial ordering relation in which all arrowhead are understood to
be pointing upward is known as the Hasse Diagram.
PROBLEMS
1. Let A={1,2,3,4} and R={(1,1),(1,2),(2,1),2,2),.4).4,3).G,3),(4.4)} verify that Ris an
equivalence relation.
Solution: Given A={1,2,3,4} and R={(1,1),(1,2),2.1)(22
3.4).(4,3),(3.3)(4.4)}
aReflexive:vxeA implies (,x)eR
+ Risreflexive.
bSymmetry: If (x, y)eR implies (y,x)eR
« Ris symmetry.
c.Transitive: If (x, y)eRand (y,z)eR implies (x,z)eR
» Risreflexive
+ Ris equivalence relation.
2. Let A={1.2,3,4} and R={(1,1),(1,2),(2,1),2.2).3.1).(4,1),@.3),(4.4),(1.3)} verify that R
is an equivalence relation or not.
Solution: Given A~f1,2,3.4} and R={(1,1),(1.2),(2,0).(2.2).8,1).(4.).G,3).(4,4).(13)}
aReflexive:Wxed implies (x,x)eR
+ Ris reflexive.
bSymmetry: /f (x,y)eR implies (y,x)ER
Since (4,1)eR implies (1,4) € R
+ Ris not symmetry.
+ Ris not equivalence relation,
14|P By S.Krishna reddy3. Let A=(1,2,3,4,5,6,7,8,9,10,11,12} on this set define the relation R by
(x y)eRif f (x — y) is a multiple of Swerify that R is an equivalence relation.
Solution: vxeA = (x — x) is a multiple of 5
3 (xxeR
+ Ris reflexive.
vx, yea
If Ge y)eR > (x—y) is a multiple of 5
= -(y-x)is a multiple of 5
> (y- x) isa multiple of 8
> (x)er
+ Ris symmetry.
Wx, y,Z6A
If (xy)eRand (y,z)eR
= (x—y) and (y—z) are multiple of 5
2 x-z=(x—y) + (y—2) isa multiple of 5
> (x z)eR
~ Ris transtive.
« Ris equivalence relation,
,Thand R = {(x,y)|(x — y) ts divisible by 3}in XShow
‘an equivalence relation.
that
Solution: Given X = {1,2,3,4,5, 6, 7jand R = {(x, y)|(x — y) is divisible by 3)
R= (LD, (2,2), 3,3), (44), (5,5), (6,6), (7,7), 4),
(4,1), (2,5), (5,2), (3,6), (6,3), (4,7), (7,4), (7), (7,.1)}
vexed > (x —x)is divisibleby 3
15|P By S.Krishna reddy,= (x xeR
« Ris reflexive.
vx, yeA
If Go y)eR 3 (xy) is divisibleby 3
> -(y— xis divisibleby 3
> (y— x)is divisibleby 3
> Oxer
+ Ris symmetry.
vx, y,z6A
If (x y)eRand (y,z)eR
> (x-y) and (y - 2) are divistbleby 3
3x-2=(e-y) + (y-2) isdivistbleby 3
= (a 2eR
+ Ris transtive,
+ Ris equivalence relation,
5. Check whether the relation R defined on the set = (1,2,3,4,5,6} as
R= {(a,b):b = a+ 1} isreflexive, symmetric or transit
Solution:
Given, the relation R defined on the set A = {1,2,3,
6} as R = {(a,b):b =a +1}.
The relation is not reflexive asa #a+1, for anya eA.
Also 3 =2+1 but2 +3 +1 Le. (2,3) € R but (3,2)
R,so the relation ts not symmetric.
Now, (2,3) € R, (3,4) € R but (2,4) ¢ Rsince 341 but4#241
2414
Therefore, the relation is not transitive also.
2y S.Krishna reddy6.Determine whether the Relation R in the set A= (1,2,3,4,5,6}asR
= {(x,9): vis divisible by x} is reflexive, symmetric and transitive
Solution: A= {1, 2,3, 4, 5,
R= {(x,y):yis divisible by x}
We know that any number (x) is divisible by itself.
(x ER
« Ris reflexive.
Now, (2,4) € R [as 4is divisible by 2]
But, (4,2) ¢ R. [as 2s not divisible by 4]
= Ris not symmetric.
Let (x,y),(y,2) € R.Then, yis divisible by xand zis divisible by y.
«zis divisible by x.
= (x2) ER
+. Ris transitive.
Hence, Ris reflexive and transitive but not symmetric.
7. For a fixed integer n > 1, prove that “congruent modulo n” Is an equivalence relation
on the set of all intogers.
Solution: Va, beZ
“a congruent b modulo n” = (a— b)is amultiple of n
WaeZ
If (a,aeR
> a-aisa multiple ofn
> a =a (mod n)
= (aa)eR
+ Ris reflexive.
va, beZ
If(a,b)eR > a = b(mod n)
> a-—bisamultiple ofn
> -(b—a)is.a multiple of n
> b-a isamultipleofn
By S.Krishna reddy,= b =a (modn)
> (ba)eR
+ Ris symmetry.
Va, b,ceZ
If(a,b)eR and (b, c)eR
= a =b (mod n)and b = c (modn)
= a~ bisa multiple ofn and b ~cisa multiple of n
3 a-c=(a—b) + (b-o)isa multiple of n
= ac isamultiple ofn > a= c(modn)
= (aceR
+ Ris transitive.
+ Ris equivalence relation.
8, Show that the relation ‘2 ’ is a partial ordering relation ona set of integers.
Solution:
(i) YaeR implies a ‘is a partial ordering relation on a set of integers
2y S.Krishna reddy9, In the set of real numbers, the relation < is a partial ordering relation.
Solution:
@)— WaeR implies a> a
+ Ris reflexive.
Gi) Va, beR
ifazbandbéa
+ Ris anti symmetry.
(iii) Va,b,ceR
Ifazbandb2cthenazc
+ Ris transitive.
« The relation ‘ >’ isa partial ordering relation ona set of realnumbers.
10. Show that A = {1, 2, 3}and relation R = {(1,1), (2,2), (3,3), (1,2), (2,3), (1, 3)} isa
partial ordering relation.
11. Draw the Hasse Diagram for [{1,2, 3, 4,6,9}, divisible].
Solution: Given A{1,2,3,4,6,9} and R = divisible
R
{(1.1), (1.2), 1,3), (1.4), (1.6). (1.9), (2.2), (2.4), (2.6), 3,3), (3,6), (3.9), (44), (6.6), (9,9)}
Hasse Diagram
bh
12. Let X = (2,3,6,12,24,36]and < be such that x < y of'x\y’.
Draw the Hasse diagram.
19 |? By S.Krishna reddySolution: Given X = (2,3,6,12,24,36} and R= x p(k +1) is true for all
positive intrgers k.
‘Strong Induction
Strong induction is a variant of standard induction.
However, there is a different in the inductive hypothesis.
In strong induction, we assume that all of p(1),p (2), p(3),-~---p(K) are true to prove p(ke + 1).
Proof: 1. This is where you verify that p(k,) is true.In most cases, ko
2Inductive step. This is where you assume that all of
D(k;), p(k) .».-p(Kare true. Then show that p(k + 1)is true.
Ex. Let a, be the sequnce defined by a, = 1,4, = 8 and
Ay = ayy + 2.a-zfor n 2 2 prove that ay = 3.28 + 2(—1)yneN.
Solution: We will prove by strong induction that for allneN
oy, = 3.2" + +2(-1)"——- (1)
Base step: when n = 1 implies a, = 3.2°+2(-1) =3-2=1
When n = 2 implies a, = 3.24 2(-1)? =6+2=8
Induction step:Let keN with k 2 Zand (1)is true for n =1,2,3, ,k. Then we have to prove
forn=k+1.
pgs = Ay 2. y—y = 3.2" + 2(-1)* + 2[B.2"? + 2(-1) 4],
= 3214 2(-1k +324 44(-1t
= 6.21 + 2[(-1)¥ + 2(-1)* (4)
= 3.2% 4 2{(-1)(-1)*]
22 |P By S.Krishna reddy= 3.2% + 2(-1)k*
« The statement is true by strong induction.
PROBLEMS
1. Using induction principle prove that n° + 2n is divisible by 3
Solution: Let p(n):n? + 2nis divisible by 3.
Now p(0):0 is divisible by 3.
Let assume for any k,p(k) is true. i.e.k? + 2k is divisible by 3.
Now (k +1)? + 2(k+ 1)
=k? 43k? + 3k+1+2k+2
=k? +2k+3(k62+k+1)
Since k3 + 2k is divisible by 3 and 3(k? +k + 1)is also divisible by 3
= (kK+1)° + 2(k + Dis divisible by 3ie p(k+ Dis true.
Hence p(n)is true V positive integers
2. Prove by Mathematical induction that 7"*? + 82"*1 js divisible by 57 for each positive
integer n.
Solution: Let p(n):7"*? + 82"+4 Is divisible by 57.
Now p(0):49 + 8 = 57 is divisible by 57.
Let assume for any k,p(k) is true.i.e.7? + 8?" is divisible by 57.
Now 7Et#2 4 riety
= 7eH 4 greta
= 7.7842 4 92, geet
= 7.78? 4 64,9742
= 7(7H2 4 gPkHly 4 57,074
By S.Krishna reddy,Since7(7**? + 8?*+1) is divisible by 57 and 57.8?**tis also divisible by 57
2 EHH? 4. g2Ue+4)+4js divisible by 57 i.e. p(k + is true.
Hence p(n)is true ¥ positive integers
3. Prove by Mathematical induction that 6"? + 72"*1 is divisible by 43 for each positive
integer n.
Solution: Let p(n): 6"? + 72"*1 is divisible by 43,
Now p(0):36 + 7 = 43 is divisible by 43.
Let assume for any k,p(k) ts true.i.e.6**? + 7?** is divisible by 43.
Now 642 4 720et)42
kts 4 pets
= 6.682 4 72, 72K42
= 6.61? + 49,7241
= 66H? 4 724) 4 43,7044
Since6(6**? + 7+) is divisible by 43 and 43.7?**4is also divisible by 43
2 6H? 4 720e+2)44j5 divisible by 43 ie. p(k + 1)is true,
Hence p(n)is true v positive integers
4. If f(n) = 50n* — 6n +23 then show that f(n) = O(n).
Solution: Given f (n) = 50n° — 6n +23
= |f()| = [50n5 — 6n + 23]
= [50n? —6n +23)
150n3| + |-6n| + [23]
S50n3 + 6n3 + 233
S79n? where n 21
24 |P By S.Krishna reddyne=79
F(n) = 07?)
5. Let p(n)be the statement that 1? + 2? + 3? + +n? = BENCHED for the positive
integer n,
@ What is the statement p (1)?
(ii) Show that p (1) is true, completing the basis step of the proof.
(iii) What is the induetive hypothesis?
iv) What do you need to prove in the inductive step?
(¥) Complete the inductive step, identifying where you use the inductive hypothesis.
6. Let p(n)be the statement that 1+2+3 + +n =" for the positive integer n
nines)
Solution: Let p(n): 1 +243 +n = 2
Now p(1):1 = 1(1 + 1)/2 = 1ie.LH-S.=R.HS
k(k+ 1)
= 2
Let assume for any k, p(K)is true.i.e. p(k): 1+ 2+ 3 +--.+k
(k+ I+ 141) _ (k4+1)K 42)
p(k4+1):14+2434+-.+k+(k+ 1) = 2 2
We now return to our proof. We find that adding (k + 1) both sides we have
kk+1)
LH2ES bo 4kt (RED = tet)
— kK + 1) +2k+1)
~ 2
_ ceinyck42)
~ 2
+0
Hencep(n):1+24+34--4n a > is true v positive integers
7. Let p(n)be the statement that 19+ 2° +3° +--+ n3 =" for the positive
25|P By S.Krishna reddy,integer n
Solution: Let p(n): 1° +29 +39 4-4 n? = SO
va+1)?
Now p():1? = = 1i.e.LHS.= RES
K(k +02
Let assume for any k, p(k)is true.i.e. p(k): 15 +23 + 3% +--+ ko = coe
(k+ 1k +2)?
P+ +2743 bet PH (kt) = 7
‘We now return to our proof. We find that adding (k + 1)* hoth sides we have
2 2
134294384 se Gera EOD aay
_ Rk +1)? + 4k + 1%
—aee:
_k+17 ik +4K +4]
ae
_ e+ 2%(k +2)?
-_ 4
nent 1)?
Hence p(n): 18 + 23 +38 4-43 is true V positive integers
RECURRENCE RELATIONS
A recurrence relation is an equation that recursively defines a sequence based on a rule that gives
the next term in the sequence as a function of the previous terms when one or more initial terms
are given,
1. The Fibonacci sequence is defined by using the recurrence relation
F,, = Fy + Fy-2 with initial conditions Fy = 0.F,
In the same way , we can find the next succeding forms in the sequence such as
Pp=Py+Po=1+0=1
By S.Krishna reddy,Fo +F,= 14152
SF, +h=24+1=3
Fy =F, +f, =3+2=5
Fy +Fy=5+3=8
Fo+Fs=8+5=13
Fy = Fy: + Fy Va > 2
We obtain the sequence of Fibonacci numbers by using above recurrence relation,
we have 0,1,2,3,5,8,13,21,
2. Solve the recurrence relation a,, = 4,1 + f(n)for n> 1 by substitution.
Solutio
jiven dy, = dy. + f(a)forn> 1
For n= 1,a, = ay + f(1)
For n= 2, a) =a; + f(2) = do + f(1) + f(2)
For,n = 3, dy = a + f(3) = do + f(1) + f(2) + £3)
for n= n, ay, = aq + f (1) + f(2) + FB) +
n= a+) F(8)
&
3. Suppose that a person deposits Rs.10, 000 in a saving account at a bank yielding 11%
per year with interest compounded annually. How much will be in the account after 30
years.
fr)
Solution: Let P, = the amount in the accout after'n'years.
* Pn = amount in the account after'(n — 1)'years + interest for the'n'th year.
Hence {py}satisfies the recurrence relation
By S.Krishna reddyPn = Pn—1 + Po(11%)where pp = 10,000
Dy = Po + 0.11 py = 1.11 py
P2 =P, + 0.11 py = (1.11)*po
Ps = D2 + pi(0.11) = (1.11)%p9
Pn = (1.11)"bo
Po = (1.11)?°(10,000)
= 228922.97
4. Let (a, }be a sequence that satisfies the recurrence relation ay = dy-1 — @,-2forn =
2,3,4...and suppose that ag = 3,a, = Swhat are a,and a3?
5. Find out the sequence generated by the recurrence relations below.
(Ty =2.Ty-awith Ty = 4 (4) Ty = 3.74 —4 with Ty = 3
6. Find out the recurrence relation for the following sequence
@) —-2,6,18,54,162 (li) 20,17,14,11,8, (lit) 1,3,6,10,15,21,
mnt
7. Prove that, if F,is the nth Fibonacci number, then F, =—3[(S") =
allintegers n> 0.or find the explicit formula for the Fibonacci numbers.
for
Solution: The sequence of Fibonacci numbers satisfies the recurrence relation
tn
a+ fn-2— —Cwith fo = Of;
The characteristic equation is
By S.Krishna reddyGiven initial conditions fy = 0, f,
Put
= 0in (2), we have A+B
ie. B---@)
Putn = 1in (2), we have
a9) 0
wal) 5)
aBSH
and A
1 v3)" a pavsy”
The explicit formula for the Fibonacci numbers 1s fy = =(*) -3(S)
8. Solve the recurrence relation @y — @y_4— 12¢q-2
Solution: Given the recurrence relation
47 12a,_2 = 0-— = (1) with ay = 0,a,
an —
Given recurrence, relation is a second order homogeneous recurrence relation.
The general solution of relation (1) is
Ay = ay — (2)
To obtain alt put f(n) = 0 in (1)
--(@)
‘The charecteristic equation of (L)is,
Ay — Aya — 12a,
k2-k-12=0
By S.Krishna reddy,sah = (AK® + k"B) = (A(—3)? + B(4))
GS. is ay = A(-3)" + B(4)" --- (4)
Given initial conditions are ay = 1,2,
Put n= Oin (4) we have
A+B=1--()and
Put n= 1in (4) we have
-3A +4B=2--(6)
Solving (5), (6) we get
3 4
A =yandB =F
GS. 18 dy = = (—3)" +2 (4)"
9. Solve the recurrence relation dy = 6, a4 — 9-4-2, 0
10, Solve the recurrence relation a, = 6,ay—1 — L1.dy-7 + 6.45 = 0,9 = 2,0, =
5,a, =15
11. Solve the recurrence relation ay = —3.dy_1— 3.y-2—
=2,a,=—1
12, Solve the recurrence relation, = 3.a,,1 + 2n with ay =
13. Solve the recurrence relation @y;1 = 4-aq with ag = 3.
14. Solve the recurrence relation a, = 5.4 —6.dy 2 +7".
NON-HOMOGENEOUS RECURRENCE RELATIONS
‘Non-homogeneous recurrence relations are of the form
inca + Cn-2-An-g Fo + Cpe Anke = f(nywn = k- —— (1)
Cn Antey
Where ey ¢n-1»Cn-2 ~-are real constant with ¢, # 0 and f(n)given function of n
.G.S.of (Iisa, = a” +a?) —-- (2)
Where at is the general solution of (1)with {(n) = 0 and
ais the particular solution can be calculated by the following cases.
30/P
By S.Krishna reddy,Case 1: Suppose f(n)is a polynomial of degre q and 1 is not a root of characteristic equation.
Where Ag, Ay, Ap, are constants and a,, = a® Substitute in(1)we get
1g + Ayn + Agn? +
Case 2: suppose f(n)is a polynomial of degre q and 1is aroot of multiplicity m of
characteristic equation.
Where Ao, Ai, Ay, ... are constants and a, = a? Substitute in(1)we get
ab =n™{Ay + Ayn + Agn? +++}
Case 3: suppose f(n)
= ab" where ais a constant and b is a root of multiplicity m of characteristic equation of (1)
thea
a’ = Ayb”
Case 4:
suppose f(n) = a b"where ais a constan and b is not aroot of (1) then
a? = Ayn™b™
F(a) ah
Constant Ap
n Ap + Ayn
n® Ag + Ayn + Ayn?
rn Agr”
2y S.Krishna reddyPROBLEMS
1. Solve the recurrence relation dy +4. dy-4+4.@, 2 =8 for n22
where ay = 1a,=2
---@
Solution: Given recurrence relation ay + 4.4y-4 +4. dy.
Given recurrence relation is a second order non-homogeneous recurrence relation.
‘The general solution of relation (1) is
a, = ah + ah —-(2)
To obtain ap put f(r) = 0 in (1)
y+ 4. dng + 4.n-2 = 0 ——(3)
The charecteristic equation of (1)is
R24 4k 44
ok =42,-2
«ah = (A+ Bn)k" = (4 + Bn)(—2)"--(4)
Ay---@)
(A+ Bn)(-2)" + Ag
G.s.is an
For obtaining Ag in (1)Ag + 44g + 449
ie.9Ay =
8
Gy = (A+ Bny(-2)" +5-— — ©)
Given initial conditions are ay = 1,0, = 2
Put n= 0in (6)
8
ay=1=At5
2y S.Krishna reddyG.S.of (Dis
n= (5 ~ En) 2)" +8
Solve @, +3. dy +2. dy = 0 for n > 2 using characteristic root method.
Solution: Given recurrence relation is
ay + 3.aya + 2.an-
0 ~~~ (1)This is second degree
Ins characteristic equation is r? + 3r+2= 0
oh =—Lt,
General solution is
ay = all tah,
=AC-)" + B(-2)"
3. Whatis the solution of the recurrence relation ay = @y-1 + 2.d,-2 with ag =
2anda;,=7?
By S.Krishna reddy,