Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 17

YOUTH International University

Unit 11: Math for Computing

Assignment 1: Importance of Math in the field of computing

Naing Htet Oo

Level 4 (25th batch)


Table of Contents
Activity 01...............................................................................................................................3
Part (1) P-1......................................................................................................................................3
Part (2) P-2......................................................................................................................................6

Activity 02.............................................................................................................................11
Part (1) P-3.....................................................................................................................................11
Part (2) P-4....................................................................................................................................13
Activity 01
Part (1) P-1

1.(a)

Given:

Numbers of boys=25

Number of girls=19

If the group was divided into the greatest number of teams possible with the same number of
boys on each team and the same number of girls are:

Factors of 25=1,5,25

Factors of 19=1,19

Since the GCD is 1, the only common factor is 1.

25
Number of boys= = 25
1

19
Number of girls= = 19
1

As an outcome, only one team with all 25 boys and 19 girls could be formed.
(b)

(i) To find the GCD of a=828 and b=114 using the Euclidean algorithm:

a = 828, b= 114

828
= 7 with a reminder of 30.
114

114
= 3 with a reminder of 24.
30

30
= 1 with reminder of 6.
24

24
= 4 with no reminder.
6

Since b become 0 the last reminder is 6.

That why Great Common Divisor (GCD) of 828 and 144 is 6.

(ii) We may use the reverse insertion method to determine the values of s and t that fulfil the
equation in the context of the Euclidean Algorithm and the formula d = sa + tb.

From part (i) we know that GCD (828, 114)= 6.

Using the formula d=sa +tb, we have:

6=sa + tb

6= 24-18 x 1

6= 24(90- 24 x 3) x 1= 24 x 4 -90

6= (114 - 90 x 1) x 1 +90 x (-1) = 114 – 90 + 90 x (-1)

6= (828 – 114 x7) x 1+(114 -90 x 1) x(-7) = 828 x 1 + 114 x (-7)

s = 4, t = - 29
828 ×114 828 x 114
(iii) LCM (828,114) = = = 566352
GCD(828,114) 6
2. We need to find the greatest common factor (GCD) of 24 and 30:
The factor of 24 are: 1,2,3,4,6,8,12,24

The factors of 30 are: 1,2,3,5,6,10,15,30

Using the Euclidean algorithm to find the GCD of 24 and 30:

30=1 x 24 + 6

24= 4 x 6+0

Since the remainder is 0, The GCD of 24 and 3 is 6

The largest tile Sin Thi Yar can use is the size of GCD, which is 6 inches. This means she
can use 6 inch square tiles to evenly cover the entire game board without any left over space.
Part (2) P-2
3. First term of the geometric sequence: a

Common difference of the arithmetic sequence: d

First term of the arithmetic sequence: b

Common difference of the arithmetic sequence: d

Given information
a=4
b=2
ar^2 = b + 2d
we need to find r and d, and the first four terms of both sequences.
Finding r and d

We can use the third term equation to find r and d:


ar^2 = b + 2d
4r^2 = 2 + 2d
2r^2 = 1 + d
r=d is given in the question, substituting r=d in the equation above:
2r^2 = 1 + r
2r^2-r-1 =0

By solving this equation gives us two possible values for r: r=1 or r= -1/2 , since r is the
common ratio of geometric sequence, it must be positive, so r=1/2
By substituting r=1/2 into equation above, we can solve for d:
2r^2 = 1 + d
2(1/4) = 1 + d
d= -1/2
the common ratio of the geometric sequence is r= ½ and the common difference of the arithmetic
sequence is d= - ½

Finding the four terms of the sequences


Geometric sequence: a, ar, ar^2, ar^3
First term: a=4
Common ratio: r= ½
First four terms: 4, 2, 1, ½
Arithmetic sequence: b, b+d, b+2d, b+3d
First term: b=2
Common difference: d= - ½
First four terms: 2, 3/2, 1, -½
Therefore, the first four terms of the geometric sequence are 4, 2, 1 and ½ , while the fist four
terms of the arithmetic sequence are 2, 3/2, 1 and -½ .

4(a).Given:
AP u2= a+(n-1)d
u7 = a+(7-1)d
=a+6d
u3= a+2d
u1=a
u3
u7 , u3 ,u 1 is a GP =
u7
u1
u3
a+2 d a
=
a+6 d a+2 d
(a+2d) (a+2d) = a(a+6d)
2
(a+ 2 d) = a 2+6ad
4ad + 4d 2=6ad
2
4 d =6ad-4ad=2ad
2 ad
d= = a/2
4d
Therefore d= a/2
(b). u7 =3
a+6d=3
a
a+6× =3
2
4a=3
a=3/4
3
d= 4 = ¾ x ½ = 3/8
2
Ap = Sn= n/2 [2a+(n-1)d]
Sn=n/2[2x3/4+(n-1)3/8] Sn= n/2 [ 3/2 + 3n-3/8]
2
a (1−r )
GP Sn=
1−r
=3 ¿ ¿
1
3[1− ]
2
n
1
= = 6[1- n]
1 2
2
Ap Sn -GP Sn ≥ 200
n 3 3 n−3
[ + ]−6 ¿ ]≥ 200
2 2 8
2
3n 6n 1
+ −6− n ≥ 200
4 16 2
2
6 n −3 n 6
−6− n ≥ 200
16 2
n≈ 36
5.Given:

P=1000000 (borrowed money)

r=0.15 (15% interest rate)

n=1 (interest rate compounded annually)

t=10 (Years)

Finding how much money will owe the bank by the period of 10 years by Geometric rule:

A= P׿

A=1000000 ׿

A=1000000 × 4.17724841875 = 4,177,248.42

Therefore, after 10 years you bank will owe the approximately 4,177,248.42
Activity 02
Part (1) P-3
1.a: Student takes all the courses in one semester.
b: Student does a job.
Given:
P(a) = 0.75
P(a∩b) =0.045
We want to find: P(b|a)
We can use the conditional probability formula:
P (a ∩b)
P(b|a)=
P( a)
0.045
P(b|a)=
0.75
3
P(b|a)=
50
Therefore, the probability of that the student does a job, given that he/she has taken all the
3
courses in that semester is .
50
2. Total number of balls (T)= 6blue(B) + 5green(G) + 4red(R) =15 balls
a. Probability of that they are all blue:
P(BBB) = P(B) x P(B) x P(B)
6 5 4 120
= + + ¿ =0.04395
15 14 13 2730
b. Probability of that two are blue and one is green:
P(BBG) =P(B) x P(B) x P(G)
6 5 5 150
¿ + + = = 0.05495
15 14 13 2730
c. Probability of that there is one of each color:
P(BGR) = P(B) x P(G) x P(R)
6 5 4 120
= × × = =0.04395
15 14 13 2730
There are BGR, BRG, GBR, GRB, RBG, RGB so that probability that there is one each
other color = 0.2637
5.To solve this problem using Bays’ theory:
A= quality score A=70%
B= quality score B=18%
C= quality score C=12%
F= Component failed.
P(A)= 0.70
P(B)= 0.18
P(C)= 0.12
P(F|A)= 0.02
P(F|B)=0.10
P(F|C)=0.18
We want to find probability of receiving quality score B given that the component failed.
P(B|F)
By Bayes’ theory:
P ( F∨B)× P(B)
P(B|F) =
P(F)
Finding P(F) by using the law of total probability:
P(F) = P(F|A)× P( A )+ P (F∨B)× P(B)+ P (F∨C)× P(C)
By given values:
P(F) = 0.02 × 0.70+0.10 ×0.18+ 0.18 ×0.12
P(F) = 0.028 + 0.018 + 0.0216 = 0.0676
Substitute P(F) to Bayes’ theory:
0.10 ×0.18
P(B|F) = = 0.2672
0.0676
Converting this probability to a percentage rounded to a decimal place:
P(B|F) = 26.72%
Therefore, by using Bayes’ theory, the probability that a component received a quality
score of B given that it failed is 26.72%.
Part (2) P-4
4(a). The value of K

Given: X=1,2,3,4,5.

P(X=1) + P(X=2) + P(X=3) + P(X=4) + P(X=5) = 1

1 1 1 1
+ + K + + =1
3 8 4 5

8+3+15 K +6+ 4
Combine the fractions: =1
24

21+ K = 24

Solve for K:

15K = 3

3
K=
15

1
K=
5

1
Therefore, the value of K is .
5

(b). Find: P (x ≤ 3 ¿

1 1 1
P(X≤ 3 ¿= + +
3 8 5

40+15+ 24
=
120

79
= = 0.6583
120

Therefore, P(x≤ 3 ¿=0.6583


(c). Find: E [ x ]

1 1 1 1
E[x] = 1. +2. +3. K + 4. +5.
3 8 4 5

1 2 4 5
E[x] = + +3 K + +
3 8 4 5

16
E[x] = +3K +2
12

4
E[x] = +3K +2
3

1
Substitute the value of K =
5

4 1
E[x]= + 3. +2
3 5

4 3
E[x]= + +2
3 5

15 12 40
E[x]= + +
20 20 20

15+12+40
E[x]=
20

67
E[x]= = 3.35.
20

5.Let X represent the variation of the blue and red dice scores. As a result, the probability

outcome for two fair cubic dice is 36.

Red Dice
1 2 3 4 5 6

1 0 -1 -2 -3 -4 -5

Blue 2 1 0 -1 -2 -3 -4
Dice

3 2 1 0 -1 -2 -3

4 3 2 1 0 -1 -2

5 4 3 2 1 0 -1

6 5 4 3 2 1 0

(a). The probability of distribution of X = (-5,-4,-3,-2,-1,0,1,2,3,4,5)

X Probability of X

-5 1/36

-4 2/36

-3 3/36

-2 4/36

-1 5/36

0 6/36

1 5/36

2 4/36

3 3/36

4 2/36

5 1/36

(b). E[X]=(-5
1 1 1 1 1 1 1 1 1 1 1
× ¿+(−4 × )+(−3 × )+(−2 × )+(−1 × )+(0 × )+(1× )+(2 × )+(3 × )+(4 × )+(5 ×
36 36 36 36 36 36 36 36 36 36 36
−5−8−9−8−5+ 0+5+8+ 9+8+5 0
E[X]= = =0
36 36

(c). Var [ X ]=E ¿] σ √ Var [ X ]

First, let’s calculate Var[X]:

2 1 2 1 2 1
Var[X] = (−5 ) × + (-4¿ × + (-3¿ × +¿
36 36 36

270
Var[X] = = 7.5
36

Next, calculate the standard deviation:


σ √ Var [ X ]=√ 7.5=2.74
6. F(x) = { 9 e−3 x if x ≥ 0
Expected value of E(x)=?
E(x) = { ∞ x × 9 e−3 x dx
=9¿)dx
−1 −3 x 1 −3 x
=9[ x e − e ¿ {∞
3 9
1
= 9 [ 0- (- )]
9
=1
The variance Var [X]:
Var [X]= E[ X 2 ] – (E[X]¿2
E[ X 2 ] can be calculated as:
E[ X 2 ]= { ∞ x2(9 e−3 xdx
1 −3 x 1 −3x ∞
1 −3 x−¿ 9 (2 x−2)e −2(
27
)e ¿ 0 ¿
=9[- 2x +1) - e
3
1 2 2
=9[0- (- + − )]
3 9 27
1 2 2
=9[0+ − + ]
3 9 27
9−6 +2
=9( )
27
5
=9×
27
45
= =1.6667
27
Standard deviation (σ =√ v ( x )
=√ 1.6667 = 1.3

You might also like