1.

Pigeonhole principle can be applied in the following computer science algorithms:(a) hashing algorithm(b) lossless compression algorithm(c) both (a) and (b)(d) none of the mentionedI had been asked this question during an interview.Query is from Applications of Pumping Lemma/Pigeonhole principle topic in section Properties of Regular Languages of Automata Theory

Answer»

Correct answer is (c) both (a) and (B)

Explanation: COLLISIONS are inevitable in a HASH table because the number of POSSIBLE keys exceeds the number of INDICES in the array.



Discussion

No Comment Found

Related InterviewSolutions