You are on page 1of 91

Math for computing

unit 11

Paramanantharasa Ishani | Math for computing | February 20, 2024


Higher National Certificate/Diploma in
Computing

Assignment Brief

Student Name/ID Paramanantharasa Ishani / F20000407003


Number

Unit Number and Math for Computing


Title

Academic Year 2023

Unit Tutor Hasitha Sanjeewa

Assignment Title Math for Computing (Unit 11)

Issue Date 04/12/2023

Submission Date 04/02/2024

IV Name & Date

Student Assessment Submission and Declaration


When submitting evidence for assessment, each student must sign a declaration
confirming that the work is their own.

Student name: Assessor name:

Paramanantharasa Ishani

Issue date: Submission date: Submitted on:


20th Feb 2024
20th Feb 2024

PAGE 1
Programme: Math for computing

Unit: 11

Assignment number and title: Math for computing

Student Declaration
Student declaration

I certify that the assignment submission is entirely my own work and I fully
understand the consequences of plagiarism. I understand that making a false
declaration is a form of malpractice.

Student signature: Date: 20 th Feb


2024

Learning Outcomes and Assessment Criteria

Pass Merit Distinction

LO1 Use applied number theory in practical


computing scenarios

P1 Calculate the greatest M1 Identify multiplicative D1 Produce a detailed


common divisor and inverses in modular written explanation of
least common multiple of arithmetic the importance of prime
a given set of numbers. numbers within the field
of computing.
P2 Use relevant theory to
sum arithmetic and
geometric progressions.

PAGE 2
LO2 Analyse events using probability theory and probability
distributions

P3Deduce the conditional M2 Calculate probabilities D2 Evaluate probability


probability of different events within both binomially theory to an example
occurring within independent distributed and normally involving hashing and load
trials. distributed random variables. balancing.

P4 Identify the expectation of


an event occurring from a
discrete, random variable

LO3 Determine solutions of graphical examples using geometry D3 Construct the scaling of
and vector method simple shapes that are
described by vector
coordinates

P5 Identify simple shapes M3 Evaluate the coordinate


using co-ordinate geometry. system used in programming a
simple output device.

P6 Determine shape
parameters using appropriate
vector methods

LO4 Evaluate problems concerning differential and integral


calculus

P7 Determine the rate of M4 Analyse maxima and D4 Justify, by further


change within an algebraic minima of increasing and differentiation, that a value is
function. decreasing functions using a minimum
higher order derivatives.
P8 Use integral calculus to
solve practical problems
involving area

PAGE 3
Grade achievements

Grade descriptor Achieved? Grade descriptor Achieved?

(tick) (tick)

P1 M1

P2 M2

P3 M3

P4 D1

P5 D2

P6 D3

P7

P8

PAGE 4
Task 1
1) A charity worker has 240 books, 200 pens, 80 pencils and 45 chocolates. He
wants to distribute them with a group of children equally.
a) Find the largest number of children he can distribute, so that each student
gets an equal number of books, pens, pencils, and chocolates.

b) Write down how many books, pens, pencils, and chocolate will be given
to each child.

c) What is the most appropriate mathematical technique to solve this type of


problem?
 We can use Greatest common factor (GCD), to solve this type of
Problems.

d) Why cannot the technique mentioned in part(c) be directly used to solve


part (a)?
 In practical we can’t use them to divide such a large number of
items over a small group of students.

PAGE 5
 We also can say the items are not rational, where there is no need
to give large amount of chocolates for children which can cause
harm for children.

e) Briefly explain how you overcome the obstacle state in part(d)

2) An artist wants to paint a side wall of a jogging park with black and white squares
representing chess board pattern. The length and the width of a wall are 910
meters and 70 meters.
a) What is the largest square that can be used for this purpose?

PAGE 6
b) How many black squares will be on the wall if he applied white color on
top left corner square?

3) Four terrorists are guarding a checkpoint, and a solder is supposed to eliminate


them with one time bomb. Intelligence service has informed the solder that after
meeting their commander, all four terrorists arrive at a particular location in 4,6,8
and 9 minutes while maintain same cycle till they report the commander again.
And it is observed that the group of terrorists report the commander in every 6
hours. If the solder observed that terrorist report the commander at 6.00 pm, what
is the time must be set for the blast.

PAGE 7
PAGE 8
Task 2
1) A polygon has ten sides. The lengths of the sides, starting with the
shortest, form an arithmetic series. The perimeter of the polygon is 675
cm, and the length of the longest side is twice that of the shortest side.
Find the length of the shortest side of the polygon.

2) A flower bed consists of 50 rows of red flowering shrubs and white


flowering shrubs. There are red flowering shrubs at both end of each row
and between every two consecutive red flowering shrubs, there is a white
flowering shrub. There are 13 flowering shrubs in the first row and each
row thereafter has one red flowering shrub and one white flowering
shrub more than the previous row.

PAGE 9
a) Write the number of flowering shrubs is in the first, second and
third rows respectively

PAGE 10
b) How many flowering shrubs are there in the 28th row?

c) How many rows are there with less than 90 flowering shrubs?

d) Find the total number of flowering shrubs are in the flower bed.

PAGE 11
e) How many more red flowering shrubs are in the bed than white
flowering shrubs?

PAGE 12
PAGE 13
3) A rocket was launched by a child from the ground, and it is observed that
30 meters were travelled during the first second and the distance covered
during the second second is 0.9 times the pervious distance covered by
the rocket, while the same pattern continue till the velocity of the rocket is
zero.
a) What is the maximum height that the rocket would reach?

b) How long does it take to reach the maximum height?

PAGE 14
c) What is the distance travel during 4 the second?

d) What is the total distance travel after 3 seconds?

PAGE 15
e) Clearly mention the assumption made in part (b)

Task 2
1) Determine the multiplicative inverse of 15 (mod 29) using Extended
Euclidean Algorithm.

PAGE 16
2) There exists a multiplicative inverse (k ) for k (𝑚𝑜𝑑 𝑛) for any integer
−1

value of k and n . Do you agree with the claim? If not provide counter
argument to disprove the claim and provide a condition for integer k
and n for the existence of the multiplicative inverse (k ) for k (𝑚𝑜𝑑 𝑛)
−1

PAGE 17
Task 4
1) Produce a detailed written explanation of the importance of prime
numbers within the field of computing encompassing the following
areas.
a) Cyber-age security
In today’s ever-evolving digital landscape, prime numbers hold vital role in
safeguarding our online security. A predominant application of prime numbers
in cybersecurity is seen in public-key cryptography, a method utilized to
protect digital exchanges and interactions. This technique relies on the simple
task of multiplying two large primes, yet poses an incredible challenges to
unravel the original primes from the resulting product. This allows for the
creation of a shared public key, while the private key remains undisclosed.
Essentially, prime numbers are the unsung heroes in our digital defence.

b) Encryption and decryption


Prime numbers play an integral role in the complex processes of encryption
and decryption. Take the widely utilized RSA algorithm, for instance. This
sophisticated method of secure communication relies heavily on the inherent
difficulty of factoring the product of two sizable prime numbers.

c) Error-correcting codes used in telecommunications


These essential codes are specifically designed to not only identify but also
repair errors that may occur during transmission of data. A prominent example
of such a code is the Reed-Solomon code, frequently utilized in digital TV,
satellite communications, and various other vital application. Its foundation
lies in the distinct properties of finite fields, which are defined as sets of
integers with specific mathematical properties, such as having a finite number
of elements.

d) Cryptography algorithms
Prime numbers paly crucial role in various cryptographic algorithms,
including the well-known Diffie-Hellman key exchange algorithm. This
powerful algorithm enables two parties to establish a shared secret key even
over an unsecure communication channel. Its effectiveness lies in the fact that
while it’s relatively simple to raise a number to a certain power, it proves to be
incredibly challenging to determine the power with only the end result at
hand.

Task 5
1) A candy bag contains 10 candies identical in size. Out of these, 5 are lemon
flavoured and the rest are grape flavoured. Another candy bag contains 12 candies
where 4 of them are lemon flavoured and the rest are grape flavoured. A candy is

PAGE 18
drawn at random from the first bag and placed in the second bag. Another candy
is drawn at random from the first bag and placed in the second bag. Then another
candy is drawn at random from the second bag.
a) Sketch the tree diagram.

b) If The event A occurs when 2 same flavoured candies drawn from the first
bag.

PAGE 19
The event B occurs when the candy drawn from the second bag is grape
flavoured.
Find (𝐴), (𝐵), P (A∩ B), P ( A ⋃ B ) , and P (Ac ∩ B).

PAGE 20
PAGE 21
c) Given that all drawn candies are of the same flavour, find the
probability that they are grape flavoured.

PAGE 22
2) There are 3 paper production companies namely Rock, Paper, and Scissor that
supply paper bundles to the “A-star” publisher. Rock Company supplies 30% of
the total paper bundle supply while Paper and Scissor Companies supply 20% and
50% of the total supply. Usually, 25% of Rock Company’s paper supply is not up
to the acceptable printing standards, and 5% and 15% of the Paper and Scissor
companies’ supply respectively.
1) If a paper bundle is selected at random from the storeroom of the A-star
publisher, what is the probability of it being unsuitable for printing?

PAGE 23
PAGE 24
2) What is the probability that the selected defective bundle was supplied by
the Scissor Company?

3) What is the probability that the selected defective bundle was not supplied
by the rock company?

PAGE 25
4) What is the probability of obtaining exactly one defective paper bundle
when three paper bundles are selected at random from the storeroom of the
A-star publisher?

Task 6
1) A fair four-sided die which the faces are numbered from (-1) to 2, and six-
sided die which the faces are numbered from 1 to 6 are thrown. The
random variable X represents the sum of the scores appeared on two dies.
a) Deduce probability distribution of X and indicate using a tabulation

PAGE 26
b) Deduce the cumulative probability distribution of X.

c) What is the probability that sum of the scores appeared on two dies is less
than 2?

d) What is the probability that 2 ≤ X <4 ?

e) Calculate the expected value of sum of the scores appeared on two dices
(E(X)).

PAGE 27
f) Calculate the variance (Var(X)) and the standard deviation of sum of the
scores appeared on two dices.

PAGE 28
2) A semiconductor manufacturing company produces ICs for different
electronic equipment companies. Probability mass function of the number
of days it takes to fix defects in an IC is given bellow P ( X=x ) .
0.15 x=0
P ( X=x ) =¿ kx x=1 , 2 ,3 , 4 ,5
k (10−x ) x=6 , 7 , 8,9,10

a) What is the random variable associated with the case study?

b) What is the maximum number of days required to fix a defective


IC, according to the given probability mass function?

PAGE 29
c) Find the value of the constant k and sketch the probability mass
function.

d) Find the mean, variance, and standard deviation of the number of


days to fix defects in an IC?

PAGE 30
e) What is the probability that a defective IC will take less than 7
days to be fixed?

PAGE 31
f) What is the probability that a defective IC will take greater than 6
days to be fixed?

g) What is the probability that a defective IC will take 5 to 8 days to


be fixed?

h) Manufacturing co st per IC is 1000 rupees. Fixing defective ICs


costs additional 50 rupees per day per IC. The manufacturer sells a
non-defective IC for 1500 rupees. The manufacturing company
wanted to check the cost effectiveness of repairing defective ICs
instead of manufacturing new ICs. Give your recommendation
with reasons.

PAGE 32
Task 7
1) According to past records, a skin specialist knows that 20% of the
population will have a bad reaction to a certain type of medicinal lotion.
The specialist prescribes this lotion for 12 patients.
a) Find the probability that at most 5 patients suffer a bad reaction.

PAGE 33
PAGE 34
b) Find the probability that less than 2 patients suffer a bad reaction.

c) Find the probability that more than 3 patients suffer a bad reaction.

PAGE 35
d) Find the probability that 3 to 5 patients suffer a bad reaction.

PAGE 36
e) Find the expected number of patients who suffer a bad reaction.

f) What is the probability that 7th, 8th, and 11th patients suffer bad
reaction while other do not suffer?

PAGE 37
g) What is the probability that only 5 consecutive patients suffer bad
reaction while other do not suffer?

2) The length of sweet pea flower stems is normally distributed with mean
18.2 cm and standard deviation 2.3 cm.
a) Find the probability that the length of a flower stem is greater than
15 cm.

b) Find the probability that the length of a flower stem is less than 18
cm.

c) Find the probability that the length of a flower stem is between 16


cm and 20 cm.

PAGE 38
d) 12% of the flower stems are longer than h cm. 20% of the flower
stems are shorter than k cm. finds h and k.

e) Stem lengths less than 14 cm are unacceptable at a florist’s shop.


In a batch of 500 sweet peas, estimate how many would be
unacceptable.

PAGE 39
Task 8
1) Load balancing is one of the most important applications of hashing. It is
highly related to the probability theory. Evaluate probability theory to an
example involving hashing and load balancing.

 Hashing and load balancing: in the world of computer science,


hashing stands as a pivotal method for assigning data, like keys or
values, to designated arrays or bucket with fixed sizes. By doing
so, it allows seamless and effective retrieval and storage of data. In
terms of workload management, load balancing plays a crucial role
in evenly distributing tasks among various resources such as
servers, processors, or network links. This ensures maximum
utilization and prevents any potential overloading. Interestingly,
these two concepts come together in situations where we seek to
effectively handle resources while minimizing collisions, or when
multiple keys are mapped to a single location.

 Hashing basics: envision a powerful tool known as a hash table,


designed to effectively store both keys and their corresponding
values. Using a specialized function, the hash table expertly maps
each key to a designated spot, or “bucket”, within its structure.
When a new key is added, its unique hash value calculated and
stored in its designated bucket. However, in rare cases, collisions
may occur when two keys happen to hash to the same location.

 Trade-off and probability: if we keep hashing keys, how many can


we handle before the chances of collision become too high (e.g.,

PAGE 40
1/2)? We can view our hash function as a random process, where
keys are mapped evenly and separately to random spots in the
table. In order to optimise search time, it’s crucial to minimize the
number of collisions for hash function. This means finding the
right size for our hash table that strikes a balance between collision
likelihood and memory consumption.

 Union bound and collision probability: the powerful union bound


dictates that the chance of both events happening together is never
greater than the combined likelihood of each event individually.
This same concept can be applied to hashing, where we can break
down the probability into two distinct events: a collision occurring
for a particular pair of keys (Event A) and a collision occurring for
any pair of keys (Event B). By utilizing the union bound, we can
effectively estimate the probabilities of collisions in hashing.

 Collision probability: imagine having a clever hash function that


distributes keys evenly across a table with n slots. As we aim to
determine the threshold for the maximum number of keys, denoted
as k, before the probability of collisions surpasses ½, let’s leverage
the union bound approach. This states that the likelihood of any
pair colliding is no greater than the sum of probabilities for
specific pairs to collide. In this case, the probability for any
specific pair to collide is 1/n, assuming a uniform distribution. By
plugging these values into the inequality, we arrive at k (k-1)/ (2n)
≤ ½. To solve for k, we can approximate it to be approximately
equal to square root of 2n.

 Load balancing analogy: when it comes to load balancing, envision


the act of assigning task (keys) to various servers (buckets).
Through effective load balancing, the risk of overwhelming a
server is greatly reduced. This process aligns with the principles of
probability, as it effectively distributes workload while preventing
any conflicts.

Task 9
1) Derive the general equation of a circle, with the centre ( a , b ) and radius r.

PAGE 41
2) The equation of a particular circle is given as x 2+ y 2+ 2 fx+2 gy + c=0, find
the centre and the radius of the circle in terms of f , g , and c.

3) The circle C has a centre at (6 , 9) and a radius of √ 50 . The line l 1 with


equation x + y−21=0 intersects the circle at the points P and Q.

PAGE 42
a) Find the coordinates of the point P and the point Q.

PAGE 43
b) Find the equation of l 2 and l 3 ,the tangents at the points P and Q
respectively.

PAGE 44
c) Find the equation of l 4 , the perpendicular bisector of the chord PQ.

PAGE 45
d) Show that the two tangents and the perpendicular bisector intersect
and find the coordinate of R, the point of intersection.

PAGE 46
PAGE 47
e) Calculate the area of the kite APRQ.

PAGE 48
Task 10
1) Let the coordinates of the points O ≡ ( 0 , 0 ) , A ≡ ( 4 , 2 ) , B≡ ( 6 , 6 ) ∧C ≡ ( 2 , 4 ) .
a) Show that ⃗ OC=λ ⃗ AB and ⃗ OA =λ ⃗ CB . Where λ is an unknown
constant.

PAGE 49
b) Show that |⃗
OC|=|⃗
OA|

c) Find the angle between OB and AC.

PAGE 50
^A.
d) Find the angle C O

PAGE 51
e) Hence prove that OABC is a rhombus.

Task 11
1) If a=2 i+2 j+3 k ,b=−i+2 j+k , c=3 i+ j are such that a+ λb is
perpendicular to c , then find the value of λ .

PAGE 52
2) Find the volume of the parallelepiped ABCDEFGH and the area of the base
ABCD where the vertices A , B , D , and E have coordinates
(−1 , 0 ,1),(3 , 0 ,−1),(2 ,2 , 0) and ( 2 , 1, 2 ) .

PAGE 53
PAGE 54
PAGE 55
Task 12
Let the coordinates of the points A ≡(2 ,3), B ≡(2 , 6), C ≡(6 , 6)∧D ≡(6 , 3).
Let the coordinates of the points O ≡ ( 0 , 0 ) , P≡ ( 4 ,2 ) , Q≡ ( 6 , 6 )∧R ≡ ( 2 , 4 ) .
a) Indicate the points ABCD and OPQR in a x− y coordinate system using
GeoGebra mathematics software.

PAGE 56
b) What are the shapes of ABCD and OPQR.

PAGE 57
The shape of ABCD is a rectangle because opposite sides are equal and
parallel, each interior angle is equal to 90 degrees, the sum of all interior
angles is equal to 360 degrees, the diagonals bisect each other, both the
diagonals have the same length, more over a rectangle is a quadrilateral which
satisfies all the properties in ABCD.

The shape of OPQR is the Rhombus because all sides are equal in length,
opposite angles are equal, the diagonals bisect each other at 90 degrees,
adjacent angles add up to 180 degrees.
c) Find the images of ABCD and OPQR separately under the transformations
given by following matrices.

I. (01 10)

PAGE 58
II. (−10 −10 )

PAGE 59
III. (cos 45
sin 45
−sin 45
cos 45 )

PAGE 60
PAGE 61
PAGE 62
PAGE 63
IV. (30 02)

PAGE 64
V. (20 0
−3 )

PAGE 65
d) Briefly explain the transformation criteria of each of the transformation
matrix.
 Matrix 1 reflects points across the line y=x.
 Matrix 2 reflects points across the line y=-x.
 Matrix 3 rotates points 45 degrees counter wise about the origin.

PAGE 66
 Matrix 4 scales points by a factor of 3 in the x-direction and 2 in the y-
direction.
 Matrix 5 scales and reflects points by a factor of 2 in the x-direction
and -3 in the y-direction (flipping over the x-axis).

e) Clearly show all above transforms in an x-y coordinate system using


GeoGebra mathematics software.

I. (01 10)

PAGE 67
II. (−10 −10 )

III. (cos 45
sin 45
−sin 45
cos 45 )

PAGE 68
IV. (30 02)

PAGE 69
V. (20 0
−3 )

PAGE 70
Task 13
1
1) Obtain the gradient function of the function y=3 √ x +¿ +2 x−3 and evaluate
5 √x
the gradient at x = 1.

PAGE 71
2) The decay rate of the mass of a radio wave substance in mg per minutes, at any
time, equals minus 2 times the square of the elapsed time and the time is
measured in minutes.
a) Obtain the mathematical relationship between mass of the substance in mg
and the elapsed time in minutes, given that the total mass is evaporated
after 3 minutes of time.

PAGE 72
b) Calculate the amount of mass remaining after 1.5 minutes.

Task 14
1) Velocity of a car v(t) m/s is observed as a function of t (s) and the relationship is
given by v ( t )=3 t 3−2 t 2 +6 .
a) Find the distance travel by the car after 3 seconds.

PAGE 73
b) Find the distance travel during 4th second.

c) Find the acceleration of the car at the 2nd second.

2) Two trains have just passed a railway station at the same time (t=0) and
travelling along two railway tracks in the same direction. Velocity time
relationships of the two trains are given by v=5+4 t−t 2 and v=0.5 t 2+1. Find the
distance between two trains (gap) when the velocities of both trains are equals.

PAGE 74
PAGE 75
Task 15
1) A wire of given length 2m is cut in to two portions, one portion is bent into the
shape of a circle and the other portion into the shape of a square. Find the
optimum length of the side of the square and the optimum radius of the circle
when sum of the areas is minimum.

PAGE 76
PAGE 77
PAGE 78
2) A rectangular box is to be made having a capacity of 256cm2, with a square base,
but without a lid. Find the dimensions of the cheapest box, if the materials for
rectangular sides cost 8$ and the materials for the base cost 1$.

PAGE 79
PAGE 80
Task 16
1) By further differentiation, identify minimum points of the following curves if
exists.
a) y=x 3−5 x 2 +3 x−12

PAGE 81
3 11 2
b) y=2 x − x −2 x +5
2

PAGE 82
c) y=12 x 3−2 x 2

PAGE 83
d) y=(x 3−5 x 2+ 8 x −4)

PAGE 84
PAGE 85
2) Engineers have found that fuel burning rate F(v) (L/hr) of a bullet train
and its speed (v) in 100 Km/hr has following function of
3 2
F ( v )=2 v −21 v + 60 v +100. Further, maximum speed of the train is
discovered as 600 Km/hr?
a) At what speed do the stationary points of F occur?

b) Find the nature of the stationary points.

PAGE 86
c) Sketch the graph of F against v for v ≥ 0.

PAGE 87
d) Find the optimum speed at which the fuel burning is minimum.

PAGE 88
PAGE 89

You might also like