










































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A comprehensive study on the application of mathematics in information technology, focusing on number theory, diophantine equations, geometric progressions, and probability theory. Topics covered include the euclidean algorithm, diophantine equations, geometric progressions, and the sum of infinite terms, as well as the multiplicative inverse, bayes' theorem, and the probability of having a virus. The document also covers continuous random variables, linear algebra, and optimization problems.
Typology: Study notes
1 / 82
This page cannot be seen from the preview
Don't miss anything!











































































Unit 14: Math For Computing
Info Myanmar University
ThinZar Phyo Wai
The least common multiple is the smallest multiple that two or more numbers which can be
exactly divided by each of the given number.
lcm ( a , b , c )= P
1
max ( a 1 ,
b 1 ,
c 1
)
2
max ( a 2 ,
b 2 ,
c 2
)
n
max ( a n,
b n,
c n
)
Example: Find the LCM of 20,50 and 60?
Solution:
lcm ( a , b , c )= P
1
max (
a
1 ,
b
1 ,
c
1
)
2
max (
a
2 ,
b
2 ,
c
2
)
n
max (
a
n,
b
n,
c
n
)
lcm
max (2,1,2)
max (1,2,1)
max ( 0,0,1)
2
2
1
Therefore, lcm (20, 50,60) = 300
Greatest Common Divisor
The Greatest Common Divisor (GCD) refers to the largest number that is a common divisor for a
given set of numbers. The GCD is useful for simplifying and comparing fractions, and solving
and simplifying equations. The equation of greatest common divisor is given below.
gcd ( a ,b , c ) = P
1
min (
a
1
,b
1
, c
1
)
2
min (
a
2
, b
2
,c
2
)
n
min (
a
n
,b
n
,c
n
)
Example: What is the greatest common divisor of 45 and 30?
Solution:
gcd ( a ,b , c ) = P
1
min (
a
1
,b
1
, c
1
)
2
min (
a
2
, b
2
,c
2
)
n
min (
a
n
,b
n
,c
n
)
gcd
min (0,1 )
min (2,1 )
min (1,1 )
0
1
1
Therefore , gcd (45,30)= 15
P1: (a) Question
P1: (a) Three traffic lights at three different crossings changes after 50 seconds, 1 minute 12
seconds and 1 minute 54 seconds respectively. There are occasions when all three traffic
lights will turn red simultaneously. If they all change simultaneously at 3:00, find the next
time when they will change simultaneously again.
P1: (a) Solution
one
= 50 sec
two
= 1 min 12 sec =( 60 + 12 ) sec = 72 sec
∴ gcd ( 2624,7472)= 16
Explanation:
Want to find gcd of (2624,7472) by using the Euclidean Algorithm, it is more efficient method to
calculate the gcd of two numbers. Euclidean Algorithm use division algorithm where we get a
quotient and remainder and the last non-zero remainder will be the gcd. In above sum, by taking
the bigger number 7472 and dividing it by smaller number 2624. 2624 multiply into the quotient
two and add the remainder 2224 and solving step by step to reach the remainder zero. Finally,
the non-zero remainder
be the result of this question.
Background Theory
Euclidean Algorithm
Euclidean Algorithm is used to find the GCD (Greatest Common Divisor) of two positive
integers a and b.
gcd ( a ,b )= sa + tb
Euclidean Algorithm using pseudo code
Here is the example of pseudo code for a Euclidean Algorithm,
c ≤ EUCLID ( a , b )
Inputs a , b : integers witha ≥ b ≥ 0 , ∧ a! = 0
Output d : gcd ( a , b )
u = a ;v = b ;
while ( v > 0 )
r = u mod v ;
u = v ; v = r ;
d = u
Example: Use Euclidean Algorithm to find GCD (111, 201)
Solution:
Therefore, GCD ( 111 , 201 )= 3
Bezout’s Theorem
Bezout’s Theorem is also called as Extended Euclidean Algorithm. It is an extension of the
Euclidean Algorithm that computes the greatest common divisor (GCD) of integers a and b.
GCD is the largest integer that divides both a and b without any remainder and also find s and t
by using back substitutions.
gcd ( a ,b )= sa + tb
gcd ( 7472,2624 )= 59 × 7472 − 168 × 2624
Compare with 7472 x + 2624 y = gcd ( 7472,2624)
∴ x = 59 , y =− 168
Explanation:
Want to find out Bezout's coefficients x and y, the first step is need to apply Euclidean
Algorithm to calculate the greatest common divisor of 7472 and 2624. By solving the problem,
use the backward substitution technique to obtain the standard form of Bezout's theorem. The
final step is comparing with the Bezout's theorem and get the values of x and y. The values of x,
y is (x=59 and y = -168), respectively.
P2: (a) Solution
Leonard is saving money ¿ buy penthoouse =250,260,270,280 , ...
a
1
a
2
− a
1
a
3
− a
2
Above sequence 250,260,270 has same common difference that is why it is an arithmetic
progression.
d = 10
a
n
= a
1
+( n − 1 ) d
a
12
The amount he save on one year = $ 360
At the end of 4 year = 4 × 12 = n = 48 months
n
n
[
2 a +( n − 1 ) d ]
48
[
]
The total amount at the end of 4 year = $ 23280
( iii ) Four year after saving money ¿ buy a car = S
48
d = 18
a =?
n
n
[
2 a +( n − 1 ) d ]
48
[
2 a +( 48 − 1 ) 18 ]
n
n
l = last term
Example: Mr. Kevin earns $400,000 per annum and his salary increases by $50,000 per
annum. Then how much does he earn at the end of the first 3 years?
Solution:
The amount earned by Mr. Kevin for the first year is, a = 4,00,000.
The increment per annum is, d = 50,000.
We have to calculate his earnings in the 3 years. So, n = 3.
Substituting these values in the AP sum formula,
n
n
[
2 a +( n − 1 ) d ]
3
[ 2 ( 400000 )+( 3 − 1 ) 50000 ]
[
]
He earned $ 1350000 ∈ 3 years.
n
a
r n
r − 1
n
n
n
log 2 n =log 1032385 n log 2 =log 1032385 n = log 1032385 log 2 ¿ ln 2
∴ Justin answered 20 questions. Explanation: In above sum, contestants are winning by answer questions. First questions for $15, second for $30, the third for $ 60. So, the sequence 15,30,60 has common ratio. It is a GP_._ By using the sum of infinite terms, we can get the number of questions correctly. Background Theory Geometric Progression Geometric Progression are ordered sets of numbers that process by multiplying or dividing each term by the same amount each time this amount is common ratio. The formula for the nth term of a geometric progression whose first term is a and common ratio is a n = a r n − 1
The sum of infinite terms when |r|<1;
n
a ( 1 − r
n
( 1 − r )
The sum of n terms when r ≠ 1;
n
a ( r
n
( r − 1 )
Example- 3 The number 2048 is which term in the following Geometric sequence 2, 8,
Solution:
a = 2 ∧ r = 4
n
th
term GP is a
n
= a r
n − 1
n − 1
n − 1
5
n − 1
5 = n − 1
n = 6
M1: Solution
(a) gcd ( 34,89 )
x = 77 × (− 34 )
x =− 2618
x ≡ 52 ( mod ) 89
∴ x = 52
( b ) E ( x ) ≡ 7 x + 12 ( mod 26 )
E ( x ) ≡ 7 x ( mod 26 )+ 12 ( mod 26 )
E ( x ) ≡ 7 x ( mod 26 )+ 12
E ( x )− 12 ≡ 7 x ( mod 26 )
Change the decrypted message(D(x))
− 1
x − 12
mod 26
≡ D ( x )
15 ( x − 12 ) ( mod 26 ) ≡ D ( x )
Enciphered message 8,16, 25, 2 to decrypted message,
D ( x )= 15 ( 8 − 12 ) mod 26 =− 60 ( mod 26 )= 18 =¿ S
D ( x )= 15 ( 16 − 12 ) mod 26 = 60 ( mod 26 ) = 8 =¿ I
D ( x )= 15 ( 25 − 12 ) mod 26 = 195 ( mod 26 )= 13 =¿ N
D ( x )= 15 ( 2 − 12 ) mod 26 =− 150 ( mod 26 )= 6 =¿ G
The decrypted message is SING.
Background Theory
Linear Congruence
The congruence of
ax ≡b ( mod m ) is called Linear Congruences modulo n.
Where; a and b are integers, m is a positive integers and x is a variable of the congruence.
Multiplicative Inverse
The Multiplicative Inverse is the inverse of the given number that can be written by x
− 1
and
another way it is also called as the reciprocal of x.
Example: What is the multiplicative inverse of 22?
The reciprocal of 22 is
− 1
So, we can calculate
The multiplicative inverse of 22 is 1.
Cryptography
Cryptography provide techniques for securing information, storing and transmitting data in a
particular form, ensuring that only the person who is intended to see the information. In
mathematics, cryptography translates hidden writing and includes two methods, Encryption and
Decryption. Encryption means secreting data message and Decryption means changing data to
original message.
The encryption formula is f ( p ) = p + 3 ( mod 26 )
The decryption formulais f
− 1
( p ) = p − 3 ( mod 26 )
Affine Encipher
Affine Encipher of each letter in an alphabet is mapped to its numeric equivalent, encrypted
using with a simple mathematical function, transformed back to a letter.
The formula of Affine Encipher is given by;
E ( x ) ≡ ( ax + b ) mod 26
Explanation:
M1(a) The gcd of (34,89) is 1. Therefore, the inverse of 34 mod 89 exists and using backward
substitution method. The next step is to compared with Bezout's theorem and the get the value
(the inverse of 34 mod 89 is-34). Substituting -34 to the equation
34 x ≡ 77 ( mod 89 ) and get the
value of x=52.