00:01
Hello students, to design the sophisticated keypad for the excellent wallet, a mathematical operation needs to be performed on the three secret keys entered by the three friends.
00:12
So one possible algorithm we can use here is the master key algorithm.
00:18
So this algorithm states that first, let's say that, let's say the three keys, the three secret keys, secret keys entered by, entered by three people, by three people, they are as alice a, bob by b and, and laura, and laura respectively.
01:00
So here we will first initialize these two, these three, the three persons.
01:07
Next, now calculate the average of the three numbers, calculate, you need to calculate the average of three numbers, average of the three numbers, three number, numbers, that is as average of alice plus bob plus laura.
01:38
So the number of people here are divided by three.
01:41
So the next is, we need to calculate the difference between each secret key and the average.
01:48
So now calculate, calculate the difference, the difference between, the difference between each, each secret key, secret key from a person, secret, secret key and the average key, and the average key.
02:19
So you have to calculate that as the difference of alice would be as a, alice, the secret key of the alice minus the average value.
02:31
Similarly, for the bob, difference of bob will be as the secret key of bob minus the average value.
02:39
And similarly for the laura, the secret key of the laura minus the average value.
02:46
So after calculating the difference, now you need to calculate the product of all these differences.
02:54
Calculate, calculate the product of, product of all these differences.
03:06
You need to just multiply all the difference values, which you have got in the previous differences.
03:14
Fine? that will be as p is equal to da into db into dl, into dl.
03:27
It will be a dl.
03:29
Fine? it is a difference.
03:30
Now in the last step, this product value, whatever you have got, it is the master key.
03:36
So the master key should be always in an absolute value.
03:39
So the master key, the master, master key is the absolute, absolute, absolute value of the product, value of product.
04:02
So we perform the mod operation on the product value, whatever we have obtained...