arrow
arrow
arrow
In open addressing, how are collisions typically resolved?
Question

In open addressing, how are collisions typically resolved?

A.

By probing and finding the next available slot in the table.

B.

By creating a linked list at the point of collision.

C.

By rehashing the entire table.

D.

By storing the colliding elements in a separate array.

Correct option is A

Open addressing is a collision-resolution technique used in hash tables in which all elements are stored directly within the hash table itself. When two or more keys produce the same hash index, a collision occurs.
Instead of creating an external linked list or separate storage, open addressing resolves the collision by probing other positions in the same hash table until an available slot is found.
For example, suppose the hash function gives:
h(k) = 3
for two different keys. If position 3 is already occupied, the algorithm searches for another available position according to a probing strategy.
Common probing techniques include:
1. Linear Probing
hi(k)=(h(k)+i) mod mh_i(k)=(h(k)+i)\bmod m​​
2. Quadratic Probing
hi(k)=(h(k)+i2) mod mh_i(k)=(h(k)+i^2)\bmod m​​
3. Double Hashing
hi(k)=(h1(k)+ih2(k)) mod mh_i(k)=(h_1(k)+i\cdot h_2(k))\bmod m​​
Thus, collisions are resolved by probing for an available slot within the hash table.
Information Booster
1. Open addressing: Every key is stored directly in the hash table.
2. Collision: Occurs when two different keys map to the same hash-table index.
3. Linear probing: Checks consecutive slots until an empty slot is found.
4. Quadratic probing: Uses quadratic increments to determine the next position.
5. Double hashing: Uses a second hash function to calculate the probing step.
Additional Knowledge
Why the Other Options Are Incorrect?
· (b) Creating a linked list → This is the approach used in separate chaining, not open addressing.
· (c) Rehashing the entire table → Rehashing may be performed when the table becomes too full, but it is not the standard collision-resolution mechanism of open addressing.
· (d) Separate array → Open addressing stores the colliding element within the same hash table, rather than using a separate array.
The key distinction to remember is:
Open AddressingProbing\boxed{\text{Open Addressing} \rightarrow \text{Probing}}​​
whereas:
Separate ChainingLinked List/Bucket\boxed{\text{Separate Chaining} \rightarrow \text{Linked List/Bucket}}​​

Free Tests

Free
Must Attempt

Basics of Education: Pedagogy, Andragogy, and Hutagogy

languageIcon English
  • pdpQsnIcon10 Questions
  • pdpsheetsIcon20 Marks
  • timerIcon12 Mins
languageIcon English
Free
Must Attempt

UGC NET Paper 1 Mock Test 1

languageIcon English
  • pdpQsnIcon50 Questions
  • pdpsheetsIcon100 Marks
  • timerIcon60 Mins
languageIcon English
Free
Must Attempt

Basics of Education: Pedagogy, Andragogy, and Hutagogy

languageIcon English
  • pdpQsnIcon10 Questions
  • pdpsheetsIcon20 Marks
  • timerIcon12 Mins
languageIcon English

Similar Questions

test-prime-package

Access ‘UGC NET Computer Science’ Mock Tests with

  • 60000+ Mocks and Previous Year Papers
  • Unlimited Re-Attempts
  • Personalised Report Card
  • 500% Refund on Final Selection
  • Largest Community
students-icon
528k+ students have already unlocked exclusive benefits with Test Prime!

Similar Questions

Our Plans
Monthsup-arrow