edited by
1,625 views
0 votes
0 votes
S1 :- if load factor of hash table is less than 1 then there are no collision

S2:- As the size of hash table increases, the number of collisions will decrease.

True false?
edited by

2 Answers

1 votes
1 votes

@rahul sharma 5 

S1:Load factor=$\frac{number of keys}{size of table}$ < 1

then number of keys < size of table,which does not ensure that there will be no collision.

S2:If hash table size increases then it limits or reduces the collision assume you have elements 11,21,5 and mod10 function(here you have 2 collision) now increase the table size by 1 so hash function become mod11 now for the same keys there will be no collision. 

1 votes
1 votes

I think both are False . What is the answer ?

Why statement 2 is false ?

A) Suppose number of keys (hash table size) is  6 . and 3 , 17 are accessed 1.e ,, 3 mod 6 = 3 and 17 mod 6 = 5 , but when we increase size to 7 . 3 mod 7 =3 and 17 mod 7 = 3 there is a collision . Here in this case number of collisions increases as size increase .

Related questions

1 votes
1 votes
1 answer
1
0 votes
0 votes
2 answers
2
Desert_Warrior asked Jun 4, 2016
799 views
1 votes
1 votes
2 answers
3
Amit puri asked Aug 23, 2016
518 views