# Maths For Computing: 865992

Maths For Computing

LO1 Use applied number theory in practical computing scenarios

Part 1 Number theory

GCD of two numbers :

GCD of two numbers is the largest number that when divides each of the number gives a remainder as 0. To calculate GCD of two numbers, all the common factors of the two numbers are multiplied and the resultant is the GCD.

LCM of two numbers :

LCM of two numbers is the smallest number which can be divided by each of the number, i.e. when LCM is divided by each number, it gives a remainder as 0.

Python program:

Part 2 sequences and Series

2.1  Python program:

2.2 Bouncing ball

 Bounce number (n) 0 1 2 3 Height(centimetres) 360 270 202.5 151.875

• Geometric sequence:

In a geometric sequence, each successive term (except first term) is formed by multiplying the previous term with a fixed value known as common ratio. Therefore, common ratio is the ratio between two consecutive terms.

Here, for Height(0) = 360 and Height(1) = 270
Height(1) / Height(0) = 270/360 = 0.75          —– ratio 1

for Height(2) = 202.50 and Height(1) = 270
Height(2) / Height(1) = 202.50/270 = 0.75     —– ratio 2

for Height(3) = 151.875 and Height(2) = 202.50
Height(1) / Height(0) = 151.875/202.50 = 0.75          —– ratio 3

Here, ratio1 = ratio2 = ratio3.

Therefore, the heights in the table form a geometric sequence.

• Geometric sequence:

As from part 1, common ratio (r) = 0.75

• Height of 4th bounce:

= Height(3) * r

= 151.875 * 0.75

= 113.90625

• Height of nth bounce:

= Height(0) * r(n-1)

= 360 * (0.75)(n-1)

• Height of 15th bounce:

= 360 * (0.75)(15-1)

= 360 * (0.75)14

= 6.41446128488

• Sum of all height before it is standstill.

For n, we need to find the value where height becomes 0,

Therefore,

0 = Height(0) * r(n-1)

0 = 360 * (0.75)(n-1)

0 = (0.75)(n-1)

n-1 = 49

n = 50

Therefore,

centimetres

• Python program:

LO2 Analyse events using probability theory and probability distributions

Part 1: independent trials

1.1 Probability

1. a) both will be selected.

P(A) = 1/4
P(B) = 1/3
P(A) * P(B)

1. b) only one of them will be selected.

P(A) = 1/4
P(B) = 1/3
P(A’) = 1 – 1/4 = 3/4
P(B’) = 1 – 1/3 = 2/3

P(A).P(B’) + P(B).P(A’)

1. c) None of them will be selected.

P(A’) = 3/4
P(B’) = 2/3
P(A’) * P(B’)

1.2 Probability of at least one ace of hearts out of two decks.

Out of 52 cards, only one card is ace of hearts.

Therefore,

P(Ace of hearts & Not Ace of hearts) =

P(Ace of hearts & Ace of hearts) =

P(at least one ace of hearts) = P(Ace of hearts & Not Ace of hearts) + P(Ace of hearts & Ace of hearts)

Part 2 random distributions

2.1 A fair coin is tossed 5 times.

LO3 Determine solutions of graphical examples using geometry and vector methods

Part 1 Geometry

3.1       A = (2,5)

B = (6,3)

1. Length of AB

• Midpoint of AB

1. Equation of line AB

3.2  Circle centre = (2,3)

Equation è

Part 2 Vectors

3.4       FA = 70N, North

FB = 40N, East

FR = ?

FR2 = FRx2 + FRy2

FRx  = FAx + FBx
= 0 N + 40 N
= 40 N

FRy  = FAy + FBy
= 70 N + 0 N
= 70 N

magnitude (approximately)

For direction,

3.5

F1 = 30 N

F2 = 40 N

Magnitude of resultant force, R =

Direction of resultant force, R =

Thus R is 20.47 N in magnitude and is at an angle of

LO4 Evaluate problems concerning differential and integral calculus

Part 1 Differential calculus

1. Velocity of object at any time t:

The velocity at any time is given by the derivative:

1. Object stop moving when at any point of time the velocity of the object becomes 0.

1. While calculating the velocity at any time of the object, if the resultant velocity is positive then the object is moving in the right direction and if the resultant velocity is negative then the object is moving in the left direction.

Part 2 Integral calculus

4.2.1  Area enclosed

f(x) = x2 + 1
g(x) = 2x + 4

To find the area, first we need to calculate the intersection points:

x2 + 1 = 2x + 4
x2 – 2x = 4 – 1
x2 – 2x – 3 = 0
x2 – 3x + x – 3 = 0
x(x – 3) +1 (x – 3) = 0
(x – 3)(x+1) = 0
x = 3 and x = -1

As, 2x + 4 = y

y = 10 and y = 2

The graph to find the area,

We need to find the area of the shaded region, we need to subtract the area of lower graph, f(x) = x2 + 1 from the area of the upper graph, g(x) = 2x + 4

Area of upper graph,

24

Area of lower graph,

Therefore, the area of shaded region in blue is

= Area of upper graph – Area of lower graph

= 24 – 12.67

= 11.33 units2

4.2.2 V(t) = – 0.4t2 + 2t

To find distance travelled

Distance =

Distance =

As t = 3

Therefore,

Distance =

= -3.6 + 9

= 5.4

Therefore, the distance travelled is 5.4 kms