ACTIVITY 01
1) The team leader wants to store 420 images and 130 videos in their hard drive. He wants to
optimize the storage space by storing an equal number of images and videos in each folder, while
using the least amount of storage space. What is the maximum number of images and videos that
can be stored in each folder using the GCD algorithm?
SOLUTION:
Total images=420
Total Vedios=130
By Calculating Greatest Common Divisor (GCD) of 420 and 130, we will have
So,
Step #1
If a folder contains 8 images and 2 vedios: Total items=10
Such 50 folders contain 400 images and 100 vedios
Step#2:
If a folder contains 4 images and 6 vedios: Total items=10
Such 5 folders contain 20 images and 30 vedios
Thus Total 55 folders taken.
2) Two computer programs, Program A and Program B, are running simultaneously on a
computer. Program A takes 16 minutes to complete its execution while Program B takes 20
minutes to complete its execution. If both programs start executing simultaneously, and they need
to synchronize their execution cycles, after how much time will both programs execute at the
same time again?
SOLUTION:
By calculating the Least Common Multiple (LCM) 0f 16 and 20, we will have
So,
If both programs start executing simultaneously, and they need to synchronize their execution
cycles, after 80 minutes both programs execute at the same time again.
3) A software program is designed to consume a certain amount of memory each time it is run.
Due to a memory leak, the program consumes 5MB more memory than intended with each run.
Initially, the program consumes 50MB of memory.
a) How much memory will the program consume 20 runs later?
SOLUTION:
Here,
b) How many runs until the program consumes half of its allotted memory?
SOLUTION:
Suppose, total space =x
Used = x/2
We will have to find n.
c) How many runs until the program consumes all available memory?
SOLUTION:
Suppose, total space =x
We will have to find n.
4) The company has a server that is slowing down over time. Suppose the server's processing
speed decreases by 8% each day. What will be the processing speed of the server after 10 days if
its initial speed was 3.5 GHs?
SOLUTION:
Here,
5) Find the multiplicative inverse of 49 mod 97 while explaining the algorithm used.
SOLUTION:
Suppose, the multiplicative inverse of 49 mod 97 is x.
i.e .
97=1.49+48
49=1.48+1
1=49-1.48
=49- 1.(97-1.49)
= 2.49-1.97
It means that what should be multiplied with 49 so that after taking the modulo 97 of the
resultant, we will get 1.
So,
Hence, the multiplicative inverse of 49 mod 97 is 2.
6) Produce a detailed written explanation of importance of prime numbers within field of
computing.
ANSWER: 6) The Importance of Prime numbers within field of Computing
A prime number is the whole number which only divisible by 1 or by itself, e.g. 2, 3, 5, 7, 11,…..
No one knows that when does the prime number introduced. But, the first concrete evidence
appears to be some Papyrus writings of the ancient Egyptians from over 3500 years ago [5].
Every other number (composite number) has primality to be factorized by the primes. Many
theorists are convinced about importance of primes for their wide applications in the current
technological era and particular in computing. These have paramount applications for computer
engineers to solve myriad real problems. In this age of easy exchange of information, Prime
numbers are fundamental in computer security. They are useful to avoid harmonics. They
increase pixels of computer screens to make them comfortable. Moreover, we constantly use
computer encryption to communicate our credit card information, bank log in and encrypted
email. Briefly, our virtual life depends mainly on prime numbers.
Secrecy With Prime Numbers
One of the most widely used applications of prime numbers in computing is the RSA encryption
system [1]. This system permits for the secure transmission of information. The RSA algorithm
depends on the prime number. This algorithm can be crack if prime factorization is easy. The
RSA system in cryptography uses prime numbers widely to calculate the public and the private
keys. The strength of this system relies up on the difficulty of factoring large numbers -
specifically the difficulty associated with the finding of the specific pair of prime numbers
selected to create a large integer called the modulus.There are two types of a cryptosystem which
are symmetric and Asymmetric. Asymmetric encryption and decryption are done by two different
keys. The public key is known to the public[2]. The private key can only be known by secret key.
Computer Science
Calculating Hash Codes A hash code is a number code for every object that is created by
a program. Hash codes are required for quick retrieval/storing of complex objects from/in a hash
table. Hash codes need to be reasonably unique for each object so that correctness is maintained.
Prime numbers are used in computing hash codes for this reason.
Prime numbers are used to keep important information safe which reveals just how important an
application it is[3].
References
[1] Riesel, H. (2011). The Recognition of Primes. In: Prime Numbers and Computer Methods for
Factorization. Modern Birkhäuser Classics. Birkhäuser, Boston, MA. https://doi.org/10.1007/978-
0-8176-8298-9_4
[2]. David W. PRIME NUMBERS: The Most Mysterious Figures in Math , John Wiley & Sons,
Inc. ISBN-13 978-0- 471-46234-7
[3] Matthew, C. and Gurudeo, A.T. ( 2011). The Importance of Numbers and the Need to Study
Primes: The Prime Questions, Journal of Mathematics and Statistics 7 (4): 262-269
ACTIVITY 02
1) Your company has three teams: A, B, and C. The proportion of developers who are proficient
in Java, Python, and C++ in each team is as follows: (P3)
Team A: 50% Java, 30% Python, and 20% C++
Team B: 40% Java, 40% Python, and 20% C++
Team C: 30% Java, 50% Python, and 20% C++
An employee is randomly selected from this company.
a) Find the probability that the person selected is proficient in Java given that they work in
Team A.
Solution:
b) Find the probability that the person selected is proficient in Python given that they work in
Team B.
Solution:
.
c) Compare the two probabilities just found to give an answer to the question as to whether the
programming language preferences of developers vary across teams.
ANSWER:
Yes, whether the programming language preferences of developers vary across teams.
2) Your company is planning to launch laptops. They are making profits loss plans before
launching. The company generates a profit of 8,000 rupees for each laptop they sell. The
company loses 100,000 rupees for every laptop that is returned due to some defect. If 3 out of 100
laptops that they produce is defective, you have been assigned a task that
what is the expected value of profit per laptop?
SOLUTION:
Here, .
So, .
3) The company is developing a new software application and wants to estimate the probability of
success in terms of user adoption. You have data from previous similar projects that shows that
70% of software applications in this category were successful in gaining at least 10,000 active
users in the first year. You need to use statistical methods to find the probability that out of a
sample of 15 new software applications; at least 10 will gain at least 10,000 active users in their
first year.
SOLUTION:
Here,
.
4) The company has developed a new software application that measures the response time of a
user's interactions with a website. The company has received a complaint that if the response time
is more than 3 seconds, the user experience is negatively affected. In a test run of 500
interactions, the mean response time is 2.5 seconds, and the standard deviation is 0.8 seconds.
Assuming the response times are normally distributed, what proportion of users are likely to have
a negative experience using the website?
SOLUTION:
Here,
As, the sample size is large,
So, .
And, .
Hence, .
5) Suppose we have a load balancing system with 10 servers, and each incoming requests is
hashed to a server with uniform probability. If the system receives 10,000 requests, what is the
probability that each server receives between 900 and 1100 requests?
SOLUTION:
Here,
So,
Hence,
ACTIVITY 03
1) Consider
Vertex (h,k)=(-3,1)
Focus (h, k+a)=(-3,3)
Mathematica Wolfarm
Plot[(,1/-8.)∗(𝑥^2+6∗𝑥+17),{𝑥,−15,10}]
20
15
10
15 10 5 5 10
Fig. Graph of the Parabola
2) Evaluate x and y from and using graphical Method
Sol by Wolfarm Mathematica
sol=Solve[{2∗𝑥−3∗𝑦==5,2∗𝑥−2∗𝑦==−7},{𝑥,𝑦}]
Plot[{(2*x-5)/3,(2*x+7)/2},{x,-20,5},Epilog-
>{PointSize[Large],Red,Point[sol[[1,All,2]]]}]
20 15 10 5 5
10
15
x=-15.5, y=-12
3)
We solve the equation 2x=6 by using Mathematica function
Solve[2x == 6, x]
Put double == for equal to
Out put {{𝑥→3}}
4)
Consider the Triangle with vertices at (1, 1), (2,3) and (4,2)
After Scale
The vertices become (3, 4), (4,6) and (6,5)
ACTIVITY 04
1) Response Time R(t)=200 milli sec
Rate of change
= 200(-0.01)
At t=10 sec=10(1000)=10000 mili sec
= 200(-0.01)
= -2
2). Consider
x -2 -1 0 1 2 4
y 16 1 0 -7 -10 0
Total Area under the Curve
A=
A=A1+A2
A1=
A1=20/3
A2=
A2=-256/3
But A2 is negative
A=20/3-(-256/3)
A=276/3
A=92
3).
Differentiate w.r.t x
Put
=0
(x-3)(x+1)=0
x=3, x= -1
By using First Derivative Test
For the interval (3,ꝏ), f’(x)>0, Then f(x) is increasing
For the interval (-ꝏ,3), f’(x)<0, Then f(x) is decreasing
Thus x=3 is point of minima
For the interval (-1,ꝏ), f’(x)<0, Then f(x) is decreasing
For the interval (-ꝏ,-1), f’(x)>0, Then f(x) is increasing
Thus x=-1 is point of maxima
4).
Differentiate w.r.t x
Put
=0
(x-3)(x+1)=0
x=3, x= -1
Again differentiate w.r.t x
At x=3,
Thus x=3 is point of minima
At x= -1,
Thus x= -1 is point of maxima
f(x) is concave up for , because
f(x) is concave down for , because