Here is a new hash function, let s call it letter-hash. First, consider the mapp
ID: 3817174 • Letter: H
Question
Here is a new hash function, let s call it letter-hash. First, consider the mapping of letters to numbers less than 26, A doubleheadarrow 0, B doubleheadarrow 1, , doubleheadarrow 25. Say that. num(#) is the numerical value for the letter #.In other words, num(K) = 10.Then for a message of n letters, the hash of a message that is: ... [num() * 26^n-1 + num() * 26^n-2 + num() * 26^n-3 + ... + num() * 26 + num()] mod 100000 Compute the letter-hash value of the message WIZARDS. Find a different message that will hash to the same value.Explanation / Answer
WIZARDS [S =18 , D = 3 ......etc]
18 + 26 * 3 + 26*26*19 + 26*26*26*0 + 26*26*26*26*25 + 26*26*26*26*26*8 + 26*26*26*26*26*26*22
= 6902635420
6902635420 %100000 = 35420
B) AWIZARDAS will also give the same number
Thanks, let me know if there is anything.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.