Maths for Computing: Number Theory, Probability, Geometry & Calculus

Verified

Added on  2024/05/21

|27
|4264
|436
Homework Assignment
AI Summary
This assignment solution covers various topics in Maths for Computing, including number theory (decimal to binary conversion, GCD, LCM), sequences and series (cost estimation, depreciation), probability theory (component failure, battery selection), probability distributions (coin toss probabilities), geometry (Cartesian to polar coordinate conversion), vector methods, and calculus (differential and integral calculus). Python code examples for GCD and LCM are provided with screenshots of the output. The assignment also includes calculations and explanations for real-world problems, such as estimating the cost of boring a hole and determining the depreciation of an industrial machine. The document illustrates the application of mathematical concepts in practical computing scenarios.
tabler-icon-diamond-filled.svg

Contribute Materials

Your contribution can guide someone’s learning journey. Share your documents today.
Document Page
Maths for Computing
0
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
Table of Contents
LO1 Use applied to number theory in practical computing scenarios.............................................2
[P1] Number theory.....................................................................................................................2
[P2] sequences and Series...........................................................................................................7
M1................................................................................................................................................8
LO2 Analyze events using probability theory and probability distributions.................................10
[P3] Probability theory...............................................................................................................10
[P4] Probability Distributions.....................................................................................................13
M2..............................................................................................................................................14
LO3 Determine solutions of graphical examples using geometry and vector methods................15
[P5] Geometry...........................................................................................................................15
[P6] Vectors...............................................................................................................................21
M3..............................................................................................................................................22
LO4 Evaluate problems concerning differential and integral calculus.........................................23
[P7] Differential calculus............................................................................................................23
[P8] Integral calculus.................................................................................................................25
M4..............................................................................................................................................26
Reference:......................................................................................................................................26
1
Document Page
LO1 Use applied to number theory in practical computing scenarios
[P1] Number theory
1.1. Convert the decimal 5613.9062510 into Binary number, Binary number via octal
Department of Information Technology and Hexadecimal
Binary conversion
5613
2 5613
2 2806 1
2 1403 0
2 701 1
2 350 1
2 175 0
2 87 1
2 43 1
2 21 1
2 10 1
2 5 0
2 2 1
2 1 0
1
0.9062510
2
0.9062510*2 1. 812502 1
0.812502*2 1. 625004 1
0. 625004*2 1.2250008 1
0.250008*2 0.500016 0
0.500016*2 1. 000032 1
0.000032*2 0.000064 0
0.000064*2 0.000128 0
0.000128*2 0.000256 0
Document Page
5613.9062510 binary conversions are 1010111101101. 11101000
Binary number via octal
5613
8 5613
8 701 5
8 87 5
8 10 7
8 1 2
1
0.9062510
5613.9062510 octal conversions are 12755.72000
Octal Number binary representation is
Octal Number Binary Number Octal Number Binary Number
0 000 4 100
1 001 5 101
2 010 6 110
3 011 7 111
Octal Number Binary conversion
12755 1010111101101
72000 0.11101000
12755.72000 octal number binary conversion is (1010111101101. 11101000)2
3
0.9062510*8 7.250008 7
0.250008*8 2.000064 2
0.000064*8 0.000512 0
0.000512*8 0.004096 0
0.004096*8 0.032768 0
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
Hexadecimal conversion
5613
16 5613
16 350 D (13)
16 21 E (14)
16 1 5
1
0.9062510
16*0.9062510 14.500016 E
16*0.500016 8.000256 8
16*0.000256 0.004096 0
16*0.004096 0.065536 0
16*0.065536 1 .048576 1
5613.9062510 Hexadecimal conversions are 15ED.E8001
1.2. Demonstrate by example how you would find the GCD and the LCM of any two
numbers and provide a Python code for both algorithms. You must provide the code and a
screenshot of the output of the program.
Find GCD the given two numbers (Python code)
def findgcd(x,y):
if(y==0):
return x
else:
return findgcd(y,x%y)
4
Document Page
x=int(input("input first number:"))
y=int(input("input second number:"))
GCDValue=findgcd(x,y)
print("GCD of two number is: ")
print(GCDValue)
******************************************************************************
*****
******************************************************************************
***********
Figure 1: GCD Python code output
Find LCM the given two numbers (Python code)
def findlcm(x,y):
x=int(input("input first number:"))
y=int(input("input second number:"))
if(x>y):
minimum=x
else:
minimum=y
while(1):
5
Document Page
if(minimum%x==0 and minimum%y==0):
print("LCM ",minimum)
break
minimum=minimum+1
Figure 2: LCM Python code output
6
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
[P2] sequences and Series
1.3. An oil company bores a hole 100m deep. Estimate the cost of boring if the cost is £50
for drilling the first meter with an increase in the cost of £5 per meter for each succeeding
meter
Cost of the first meter is = £50
Increase the cost with each meter is = £5
Then the cost of the second meter is = £55
Cost of the third meter is = £60
Then their make Sequence for the 100-meter cost
50, 55, 60, 65… Cost of 100-meter cost
Total cost is Sn = n
2 [2 a+ ( n1 ) d ]
Where N is number of steps
A is an initial cost
D is the difference between costs
Sn = 100
2 [250+(1001)5]
= 50 [100+ 99*5]
= 29750
Therefore, Estimate the boring cost is £29,750 (Mike and Estela,2014)
1.4. An industrial machine originally valued at £30,000 when brand new depreciates at a
rate of 12% per annum. Based on this data, answer the following questions.
a) Calculate its value after 5 years.
b) The company policy is to sell the machine when its value drops below 5000. After how
many years will the machine be sold?
Originally value of industrial Machine is = £30000
7
Document Page
New depreciates rate for machine= 12%
A) Final Value= ActualValue [1 ± R
100 ]
T
= 30000[1 12
100 ]
5
=30000* 0.88* 0.88* 0.88* 0.88* 0.88
= 15831.96
After the end of 15 year the value of the machine will be dropped to 4409.27
B) 5000 = 30000[1 12
100 ]
T
1
6 = 0.88T
T= 15 (almost)
After the 15 years, machine value is below 5000.
M1
A shop owner receives 40 boxes of bottled water in one delivery. Each box contains 110
bottles of water. The shop owner plans to pack the bottles into cases of 12 to sell. After
making as many complete cases as possible, how many bottles will be leftover? You must
use modular arithmetic to give your answer
Total Number of water bottle boxes is = 40
One box contain = 110 water bottles
Then 40 box contain = 110 * 40 water bottles
= 4400 water bottles
Shopper want to sell 12 water bottles in one pack
Apply Modular Arithmetic to calculated total pack and reaming water bottles
A= (overall water bottles) % (one pack water bottles)
8
Document Page
Here, A is the mod of (overall water bottles) to (one pack water bottles)
B represents the left water bottles left
B = A × (one pack water bottles)/100
A= Mod (4400%12)
= 67
Y = 67 × 12 /100
= 8
Therefore, 8 water Bottles are left
9
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
LO2 Analyze events using probability theory and probability distributions
[P3] Probability theory
2.1 The probability of a component failing in one year due to excessive temperature is 0.05,
due to excessive vibration is 0.04 and due to excessive humidity is 0.02. Determine the
probabilities that during a one-year period a component: (a) fails due to excessive
temperature and excessive vibration (b) fails due to excessive vibration or excessive
humidity, and (c) will not fail because of both excessive temperature and excessive
humidity.
Component failing in one year due to excessive temperature, vibration and humidity,
P (Humidity) = 0.02
P (Temperature) = 0.05
P (Vibration) = 0.04
a) here, calculated the probability P(A)
P(A) refers as the probability occur Fail due to excessive vibration and excessive
temperature
P(A) = P (Vibration) * P (Temperature)
= 0.04 * 0.05
= 0.002
b) here, calculated the probability P(B)
P(B) refers as the probability occur Fail due to excessive humidity and excessive
vibration
P(B) = P (Vibration) + P (Humidity)
= 0.04 + 0.02
= 0.06
c) here, calculated the probability P(M)
P(M) refers as the probability occur Not fail due to both excessive humidity and
excessive temperature
10
Document Page
P’ (Temperature) = 1- P (Temperature)
= 1 - (0.05)
= 0.95
P’ (Humidity) = 1- P (Humidity)
= 1 – (0.02)
= 0.98
P (N) = P’ (Temperature) × P’ (Humidity)
= 0.95 × 0.98
= 0.931
2.2- A batch of 50 mobile phone batteries contains 31 that are within the required tolerance
value, 8, which are below the required tolerance values. determine the probability that
when randomly selecting a battery and then a second battery (a) both are within the
required tolerance values when selecting with replacement, and (b) the first one drawn is
below and the second one drawn is above the required tolerance value, when selection is
without replacement.
Number of mobile phone batteries = 50
Number of mobile phone batteries with the required tolerance value = 31
Number of mobile phone batteries with the below tolerance value = 8
Number of mobile phone batteries with the above tolerance value = 11
P(Required tolerance value) = Possible Result
Overall outcome
= 31
50
= 0.62
a) Here, calculated the Probability P(A) which referred as of both the mobile phone
batteries with the required tolerance value is:
P (A) = P(Required tolerance value) * P(Required tolerance value)
= 0.62 * 0.62
= 0.3844
11
Document Page
b) Here, calculated the Probability P(B) where first one has below tolerance value and
second has required tolerance value
P (F) = P(below tolerance value) * P(Required tolerance value)
= 8/50 * 11/49
= 0.0359 (Richard ,2005).
12
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
[P4] Probability Distributions
2.3- A fair coin is tossed 5 times:
a) What is the probability of getting 3 heads (not necessarily in a row)? Show your
working and formula used
b) What is the probability of getting 2 heads (not necessarily in a row)? Show your
working and formula used
c) Plot a graph showing the probability distribution of getting from 0 heads to 5 heads,
where the y-axis shows the probabilities, P(x) and the x-axis shows the number of
heads from 0 to 5
Head and Tell are two choices for the single time coin toss. If the coin has tossed five-time than
there are choice of coin is = 2number of time coin tossed = 25 => 2 *2*2*2*2 => 32
a) Here, calculated the Probability (3H) which referred to getting three heads Probability
P(3H) = predictable cases
Overall cases
Here predictable cases of getting 3 heads = 5C3
= 5! / 3! × 2!
= 10
P (3H) = 10
32
b) Here, calculated the Probability (2H) which referred to getting two heads Probability
P (2H) = predictable cases
Overall cases
Here predictable cases of getting 2 heads = 5C2
= 5! / 3! × 2!
= 10
P (2H) = 10
32
c) In the graph, x-axis shows the number of head from zero to five
And y- axis show the probabilities P(X)
13
Document Page
Probability of getting 0 heads P (0H) = 5C0 = 1
Probability of getting 1 heads P (1H) = 5C1 = 5
Probability of getting 2 heads P (2H) = 5C2 = 10
Probability of getting 3 heads P (3H) = 5C3 = 10
Probability of getting 4 heads P (4H) = 5C4 = 5
Probability of getting 5 heads P (5H) = 5C5 = 1
0 1 2 3 4 5
0
2
4
6
8
10
12
Probabilities P(X)
Probabilities P(X)
M2
M2 is successfully achieved in the 2.3 part c. there are discussed the probabilities with normally
distributed and binomially distributed random variables. It is also represented by the graph.
14
Document Page
LO3 Determine solutions of graphical examples using geometry and vector
methods
[P5] Geometry
3.1- change the following Cartesian coordinates in into polar co-ordinate, and the polar co-
ordinate into Cartesian co-ordinate -in both cases your answer must be correct to 2 decimal
places
(-2.3, 5.4)
Cartesian coordinates are the second quadrant.
Where
X= a * cos (θ) …….. Equation 1
Y = a * sin (θ) …….. Equation 2
Here, square the Equation 1 and Equation 2 then add
a = xx + yy
Here cos2(θ) + sin2(θ) = 1
a = ( 2.3 ) ( 2.3 ) + ( 5.4 ) ( 5.4 )
a = 5.87 (it is always a positive value so ignore the negative value)
tan θ = sinθ/ cosθ
tan θ = 5.4/(−2.3)
tan θ = −2.34
θ = tan -1(−2.34)
θ = 113.5
(5.87, 113.5) are the polar coordinates of the give value (−2.3, 5.4).
(6.5, 1320)
Cartesian co-ordinates are first quadrant.
Where
X= a * cos (θ) …….. Equation 1
Y = a * sin (θ) …….. Equation 2
Here, square the Equation 1 and Equation 2 then add
a = xx + yy
Here cos2(θ) + sin2(θ) = 1
a= ( 1320 ) ( 1320 ) + ( 6.5 ) ( 6.5 )
15
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
a = 1320.02 (it is positive in the first quadrant)
tan θ = sinθ/ cosθ
tan θ = 1320/6.5
tan θ = 303
θ = tan -1(303)
θ = 89.72
(1320.02, 89.72) are the polar coordinates of the give value (6.5, 1320).
(7.6, −9.2)
Cartesian co-ordinates are fourth quadrant.
Where
X= a * cos (θ) …….. Equation 1
Y = a * sin (θ) …….. Equation 2
Here, square the Equation 1 and Equation 2 then add
a = xx + yy
Here cos2(θ) + sin2(θ) = 1
a = ( 9.2 ) ( 9.2 ) + ( 7.6 ) ( 7.6 )
a = 11.93
tan θ = sinθ/ cosθ
tan θ = 7.6/(−9.2)
tan θ = −0.826
θ = tan -1(−0.826)
θ = −39.5
= 360 – 39.5
= 320.5
(11.93, 320.5) are the polar coordinates of the give value (7.6, −9.2)
(3, 3rad)
Value of the θ = 3rad
= 3× 180
π
16
Document Page
= 171.89
X co-ordinates value = a * cos( θ )
Here “a” value is three.
= 3* cos(171.89 )
=3 * (−0.99)
= (−2.97)
Y co-ordinates value = a * cos( θ )
= 3* sin(171.89 )
=3 * (0.14)
=0.42
(-2.97, 0.42) are the Cartesian co-ordinates of the give value (3, 3rad) (Mathsisfun, 2017).
3.2- A 2m long ladder is placed against a perpendicular pylon with its foot 52cm from the
pylon. Find how far up the pylon (correct to nearest mm) the ladder reaches if the foot of
ladder is moved 10cm toward the pylon how far does the top of ladder rise?
Initial stage:
Length of ladder = 2 meter
= 200 cm
Distance between Pylon and ladder on the floor is = 52 cm
17
Document Page
Length of Pylon = (( Ladder length)2+( Distance on floor)2)
= (522 +2002 )
Length of Pylon = 193.12 cm.
After the moving ladder
Length of ladder = 2 meter
= 200 cm
Distance between Pylon and ladder on the floor is = 42 cm
After moving Length of Pylon = (( Ladder length)2+( Distance on floor)2)
(193.12+Y) = ( 422+2002)
193.12 + Y = 195.54
(Length is a positive value so ignore negative value)
Y = 2.42 cm
Here Y is represent the increased length of the Pylon after moving ladder.
Y = 2.42 cm which referred as 24.2 mm
3.3- From a point on horizontal ground a surveyor measures the angle of elevation of a
church spine is 15. He moves 30 m nearer to the church and measure the angle of elevation
as 20 calculate the height of the spire.
18
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Condition one
Height of the spire = B/A
tan ( 200 ) = B/A
B = A* 0.364 ……..Equation 1
Condition two
Height of the spire = B/ (A+ 30)
tan ( 150 ) = B/ (A+ 30)
B = (A+30) * 0.268 …….……..Equation 2
Equation 1 and equation 2 are equal so
A* 0.364 = (A+30) * 0.268
A* 0.364 = 0.268* A + 8.04
0.096 * A = 8.04
A = 83.75m
19
Document Page
A’s value put on equation 1
B = 83.75 ×0.364 = 30.40
Here, B is referred the Spire height which is 30.40 m
20
Document Page
[P6] Vectors
3.4- a ship heads on a course due to south at 12kmph. It is moved off course by a current
flowing in a north-eastern direction at 8kmph. Determine the resultant velocity
The speed of the ship in the south Direction = 12 km/ hour
The speed of flow in the northeast Direction = 8 km/ hour
The resultant velocity of the ship is V = 14464
V = 8.944 (south east direction) (Montereyinstitute,n.d.).
3.5- Two forces F1 and F2 with magnitude 20N and 30n, respectively, act on an object at a
point P as shown in the figure below. Find the resultant forces acting at P.
21
tabler-icon-diamond-filled.svg

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
Force on the P point at x- axis
A = F1*cos450 − F2*cos300
A = −11.84
Force on the P point at y- axis
B= F2*sin600+ F1*sin450
B = 40.12
Total Resultant force on P Point = ( A2 + B2 )
= ( 11.84 ) 2 + ( 40.12 ) 2
= 41.85 N
The direction of the force on the P point θ = tan1 40.12
11.84
θ = 106.440– 900
θ = 16.44 in the y-axis Direction
M3
A coordinates system is divided into four quadrants. In the first quadrant, all are positive. In the
second quadrant, sin and cosec are positive. In the third quadrant, tan and cot are positive. In the
fourth quadrant, cos and sec are positive. It contains two axes such x-axis and y-axis where left
to right increased the value of x and top to bottom increased the value of y.
22
Document Page
LO4 Evaluate problems concerning differential and integral calculus
[P7] Differential calculus
4.1- You have been asked to analyses a motherboard to access the lifespan of the
capacitors. When a charged capacitor is connected to a resister to form an RC (resistor-
capacitor) circuit, the capacitor discharge follows the equation:
V = Vmax × e-t/5
Discharge rate is
V’ = V maxet /5
5
a) t = 10 ms
V’ (10) = −(Vmaxe-0.01/5)/5
−Vmax÷ (5 × e0.002)
V max
5.01
−0.2 × Vmax
b) Discharge rate is half
New discharge rate is −0.1 × Vmax
Discharge rate is V maxet /5
5
Hence -0.1 × Vmax =
V maxe t
5
5
23
Document Page
T=3.46 sec
4.2- The fuel economy E of a car, in miles per gallon, is given by:
E = 21+2.1×10-2V2−3.80×10-6V4
Where v is the speed of the car in miles per hour. Determine, correct to 3 significant
figures, the most economical fuel consumption, and the speed at which it is achieved.
Car fuel economy equation is E = 21+2.1* 10-2V2−3.80 * 10-6V4
When economical fuel consumption max then E’ = 0
4.2*10-3*V – 15.2*10-6*V3 = 0
V (4.2*10-3 - 15.2*10-6*V2)= 0
V2= 276.31
V=16.62 miles / Hour
V is referred the speed of car.
Value of “V” put in the equation
E = 21+2.1*10-2(16.62) (16.62) −3.80*10-6(16.62) (16.62) (16.62) (16.62)
E= 21+2.1×10-2×276.31−3.80×10-6×76347.21
E= 21+5.8−0.29
E=26.51
24
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
[P8] Integral calculus
4.3- the sales (s) of a computer game in the first t years of its release can be approximated
by the function:
S (t) = t0.5(tt )+2
where the sales (s) is measured in millions of pound.
Using integration, estimate the average yearly sales over the first five years of the game's
release
Here, calculated the computer game sales on the yearly base
s(t) = t0.5(tt )+ 2
Above equation represented the time base sale with t variable.
s(t) = (t (tt)+ 4 ) × 0.5
Using the integration for average sales over
s (t) = (t ( tt)+4)× 0.5
=¿ ) (t2 + 4)3/2
For the five year sale, take limit function zero to five and calculated five-year computer game
sale

0
5
s (t)= 34.89.
4.4- the vertical height h (in km) of missile varies with the horizontal distance d (in km),
and is given by h=4d-d2. Determine the mean height of missile from d=0 to d= 4km.
Let h be the mean
h = 4d – d2
(
0
4
4 d dd )/ 4= (4d – d2)
D2 - 4d +8/3= 0
d = ± 2
3 + 2, taking length as positive.w
25
Document Page
d = 2
3 + 2 = 2
1.732 + 2 =>3.15
M4
M4 is successfully achieved in the 4.2 part. There are used the minima and maxima with the
decreasing and increasing function which used higher order derivatives. Here, I have calculated
first degree and second-degree derivatives function used to calculating fuel and speed
calculation.
Reference:
Mike and Estela k.,(2014). [online] Available at:
https://www.chilimath.com/lessons/intermediate-algebra/arithmetic-sequence-formula/
[Accessed 18 Apr. 2018].
Richard N., (2005). [online] Available at:
http://www.math.ku.dk/~richard/binf/notes/chap1 [Accessed 18 Apr. 2018].
Mathsisfun. (2017). Polar and Cartesian Coordinates. [online] Available at:
https://www.mathsisfun.com/polar-cartesian-coordinates.html [Accessed 18 Apr. 2018].
Montereyinstitute (n.d. ). The Pythagorean Theorem. [online] Available at:
http://www.montereyinstitute.org/courses/DevelopmentalMath/COURSE_TEXT2_RESO
URCE/U07_L1_T4_text_final.html [Accessed 18 Apr. 2018].
26
chevron_up_icon
1 out of 27
circle_padding
hide_on_mobile
zoom_out_icon
logo.png

Your All-in-One AI-Powered Toolkit for Academic Success.

Available 24*7 on WhatsApp / Email

[object Object]