1.a) Linear probing is one of the methods to solve a collision in hashing. if a hashing function is defined as h(k) = k

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

1.a) Linear probing is one of the methods to solve a collision in hashing. if a hashing function is defined as h(k) = k

Post by answerhappygod »

1.a) Linear probing is one of the methods to solve a collisionin hashing. if a hashing function is defined as h(k) = k %7, showthe linear probingequation and explain hpw it works. (4 marks)
b) Given that there are isx workers in a shop,with IDs 909,185,657,116,85, and 150. suppose hash table HT is ofthe size 7 and indexed 0,1,2,...,6. show how these woeker's IDs, inthe order given, are insterted, in HT using the hashingfunction h(k) = k % 7. Use linear probing to resolve any collision.Answer by using Table 1 and explain all collision in the hashtable.
1 A Linear Probing Is One Of The Methods To Solve A Collision In Hashing If A Hashing Function Is Defined As H K K 1
1 A Linear Probing Is One Of The Methods To Solve A Collision In Hashing If A Hashing Function Is Defined As H K K 1 (106.1 KiB) Viewed 58 times
c) Illustrate the chaining for IDs listed in (b).Hashing function is defined as h(k) = k %7. (5 marks)
d) Analyze the collision resolution between openaddressing with a linear probing approach and a chaining approach .Which approach is most suitable for the ID hashing asdiscussednin (b)? (3 marks)
2.a)
1 A Linear Probing Is One Of The Methods To Solve A Collision In Hashing If A Hashing Function Is Defined As H K K 2
1 A Linear Probing Is One Of The Methods To Solve A Collision In Hashing If A Hashing Function Is Defined As H K K 2 (99.92 KiB) Viewed 58 times
1 A Linear Probing Is One Of The Methods To Solve A Collision In Hashing If A Hashing Function Is Defined As H K K 3
1 A Linear Probing Is One Of The Methods To Solve A Collision In Hashing If A Hashing Function Is Defined As H K K 3 (54.86 KiB) Viewed 58 times
Table 1: Hash table and data HT[0] HT[1] HT[2] HT[3] HT[4] HT[5] HT[6] 5/9
Given a list of items: 80, 57, 65, 30, 45, 77, 27, 4, 90, 54, 45, 2, 63, 38, 81, 28, 62. Illustrate the sorting of the list using Shellsort using a range of 7, 4, and 1. (12 markah/marks)
Illustrate the sorting of the list using Selection Sort. (8 markah/marks)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply