00:01
So in the given question we have to resolve the collision so we will be using double hash double hashing technique to solve the collision.
00:14
So initial hashing function that is h of k is equals to what k mod? this is the initial hashing function where p is prime and the second hashing function.
00:34
This is the first hashing function.
00:35
Now the second hashing function will be g of k and it is k plus 1 mod p minus 2.
00:48
So probing sequence when a collision occur, we can say h of k i is nothing but h of k plus i, g of k mod p.
01:04
This is the according to the probing sequence.
01:07
So now we'll be solving it further.
01:12
So now we know given that p is what? p is 4 .969.
01:20
So k1 according to the formula will be what? 13248 -9771.
01:28
And h of k is what k mod p? so just put k1 over here you will be getting.
01:39
So putting the value of k, 13248, 9971 mod of p that is 4969 will give me 1524 and this is the value of k1 for us now okay so we'll be using it in the next this will be k1 for next one okay and then moving further k2 according to the formula will be 5094 96993 mod 4993 mod 49 so from here we'll be getting 578 and this is k2 for us.
02:21
Similarly, k3 for us will be 546332190 mod p that is 4969 and here k3 for us will be again approximate it will be again 578 that is k3.
02:38
So we have got k1, k2 and k3 now we have to look for k4 and k52 but before that we know quote collusion occurs, so k2 already has to, k2 already hashed to 578.
03:00
So collision is occurring.
03:02
Therefore, h of k3 comma 1 will be equals to h of k3 plus 1 dot g of k3 and the whole is multiplied to, not multiplied, whole is with mod p.
03:21
Now g of k3 we have to find out first of all.
03:25
So g of k3 will be 5 to 6, sorry, it is 54, 54633, 2190 plus 1, that will be 5 this.
03:37
We have added 1 to it, mod.
03:40
Now p minus 2, that will be 4969 it was, so 4 ,967 it will become...