Maths for Computing Assignment 1
Maths for Computing Assignment 1
(Software Engineering)
Date Received
Submission Date
1st submission
Date Received 2nd
Re-submission Date submission
Assessor Feedback:
LO1 Use applied number theory in practical computing scenarios.
Pass, Merit & Distinction Descripts P1 £ P2 £ M1 £ D1 £
LO2 Analyse events using probability theory and probability distributions. Pass, Merit
& Distinction Descripts P3 £ P4 £ M2 £ D2 £
1
BTSE0322010343 T D S Irunika Math For Computing
Assignment Feedback
Action Plan
Summative Feedback
2
BTSE0322010343 T D S Irunika Math For Computing
Student Declaration
I hereby declare that I know what plagiarism entails, namely, to use another’s work and to present it as my
own without attributing the sources in the correct way. I further understand what it means to copy another’s
work.
BTSE0322010343@saegis.ac.lk 7/7/2024
---------------------------------------------- --------------------------
Student’s Signature Date
3
BTSE0322010343 T D S Irunika Math For Computing
Higher National Certificate/Diploma in Computing BTEC Assignment Brief
Submission Date
4
BTSE0322010343 T D S Irunika Math For Computing
Submission Format
5
BTSE0322010343 T D S Irunika Math For Computing
Activity 01
6
BTSE0322010343 T D S Irunika Math For Computing
Activity 02
7
BTSE0322010343 T D S Irunika Math For Computing
Activity 03
8
BTSE0322010343 T D S Irunika Math For Computing
Activity 04
In cryptography, prime numbers are very important. They are used in many security encryptions because
multiplying two large prime numbers is easy, but doing the reverse takes a lot of computing power. Prime
numbers are unique because they have no factors other than 1 and themselves, making them hard to
factorize. When two large prime numbers are multiplied, the result is used in encryption. Prime numbers
play a special role in encrypting and decrypting data because they are difficult to factorize.
The main reason prime numbers are used in cryptography is their difficulty to factorize. Without knowing
the prime factors, it is hard to decrypt an encrypted message without the right key. Prime numbers are
sometimes called "atoms" because they are the building blocks of all numbers. "Prime Factorization" is the
process of breaking down a composite number into prime numbers. This process is the basis of the RSA
encryption algorithm. Even a supercomputer would take years to factorize a composite number into its
prime factors. For a computer, multiplying prime numbers is not hard. Thus, prime numbers are crucial to
cryptography.
9
BTSE0322010343 T D S Irunika Math For Computing
Activity 05
10
BTSE0322010343 T D S Irunika Math For Computing
Activity 06
11
BTSE0322010343 T D S Irunika Math For Computing
12
BTSE0322010343 T D S Irunika Math For Computing
Activity 07
13
BTSE0322010343 T D S Irunika Math For Computing
Activity 08
A hash function is a mathematical function that takes input data of any size and generates a fixed-size output
called a message digest. It efficiently transforms the input data into a unique digital fingerprint.
A good hash function must ensure uniqueness, making the chance of two different inputs generating the
same hash value (collision) very low.
To calculate the probability of a collision in a hash function with N bits and M elements, we make some
assumptions about the hash function and how the elements are inserted into the hash table. Assuming a
perfect hash function and a uniform random distribution of elements, the probability of a collision can be
approximated using the birthday paradox formula:
This formula assumes each element is uniformly and independently distributed across the hash table, and the
1
probability of two elements colliding (being hashed to the same slot) is N
2
Using this equation, if we consider the possibility of a collision when M = 1 million and N = 32, the formula
becomes:
This shows that the probability of a collision is extremely small, approximately 1 in 1033.With a 32-bit hash
function, there are 233 possible hash values, so each of the 1 million values would likely map to a different
hash value, making collisions very unlikely.
14
BTSE0322010343 T D S Irunika Math For Computing
Learning Outcomes & Assessment Criteria
15
BTSE0322010343 T D S Irunika Math For Computing