Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Question 1

Assume the utilization of linear probing for hash-tables. To enhance the complexity of the operations performed on the table, a special AVAILABLE object is used. Assuming that all keys are positive integers, the following two techniques were suggested in order to enhance complexity:

i) In case an entry is removed, instead of marking its location as AVAILABLE, indicate the key as the negative value of the removed key (i.e. if the removed key was 16, indicate the key as -16). Searching for an entry with the removed key would then terminate once a negative value of the key is found (instead of continuing to search if AVAILABLE is used).

ii) Instead of using AVAILABLE, find a key in the table that should have been placed in the location of the removed entry, then place that key (the entire entry of course) in that location (instead of setting the location as AVAILABLE). The motive is to find the key faster since it now in its hashed location. This would also avoid the dependence on the AVAILABLE object.

Will either of these proposal have an advantage of the achieved complexity? You should analyze both time-complexity and space-complexity. Additionally, will any of these approaches result in misbehaviors (in terms of functionalities)? If so, explain clearly through illustrative examples.

Question 2

To reduce the maximum number of collisions in the hash table described in Question 6 above, someone proposed the use of a larger array of 15 elements (that is roughly 15% bigger) and of course modifying the hash function to: h(k)=k mod 15. The idea was to reduce the load factor and hence the number of collisions.

Does this proposal hold any validity to it? If yes, indicate why such modifications would actually reduce the number of collisions. If no, indicate clearly the reasons you believe/think that such proposal is senseless.

Question 3

Assume an open addressing hash table implementation, where the size of the array N = 19, and that double hashing is performed for collision handling. The second hash function is defined as:
d(k) = q - k mod q,

where k is the key being inserted in the table and the prime number q is = 11. Use simple modular operation (k mod N) for the first hash function.
i) Show the content of the table after performing the following operations, in order:
put(38), put(15), put(43), put(22), put(71), put(8), put(28), put(37), put(19).
ii) What is the size of the longest cluster caused by the above insertions?
iii) What is the number of occurred collisions as a result of the above operations?
iv) What is the current value of the table′s load factor?

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92035605
  • Price:- $120

Guranteed 48 Hours Delivery, In Price:- $120

Have any Question?


Related Questions in Computer Engineering

Question research different information systems management

Question : Research different information systems management disaster response plans of major organizations that have had to respond to fairly recent disasters. Discuss the results of the organization's recovery efforts.

Sorted golf scores - need flowchartdesign a program that

Sorted Golf Scores - need flowchart Design a program that asks the user to enter 10 golf scores. The scores should be stored in an Integer array. Sort the array in ascending order and display its contents. Looking for "" ...

Question -under what circumstances is it ethical if ever to

Question :- Under what circumstances is it ethical, if ever, to use consumer information in marketing research? Explain why you consider it ethical or unethical.

Question what will be the source and destination ip

Question : What will be the source and destination IP addresses the response packet after the router forwards it to the private network? The response must be typed, single spaced, must be in times new roman font (size 12 ...

Stack - java plz use simple java language netbeans 81 or

STACK - java, plz use simple java language, netbeans 8.1 or 8.2 1. Create a Stack class based on MyLinkedList class. Use this class in the following: 2. Create a new Java Application that has the following methods: 1. A ...

We live in kapurkua a small island in the mediterranean

We live in Kapurkua, a small island in the mediterranean between Greece and Spain (no, it doesn't really exist so don't look it up in the map). In the island we produce and consume canoes, latreks (a garment that is comf ...

It has been argued that although there may be more claims

It has been argued that although there may be more claims when road conditions are slippery in the winter, this should not affect the average claim. Malpeque took a sample of 50 claims from the winter of 2018 and found t ...

Elm industries receives profits from polluting according to

Elm Industries receives profits from polluting according to the formula: (pi=10Q-Q^2) The Damages associated with pollution from this facility are estimated to be: (D=Q^2+2Q) (Q= pollution emitted in tons) , and profits ...

Suppose that a block can contain at most four data values

Suppose that a block can contain at most four data values and that all data values are integers. Using only B+ trees of degree 2, give examples of each of the following : a. A B+ tree whose height changes from 2 to 3 whe ...

Question suppose a problem can be solved with two different

Question : Suppose a problem can be solved with two different algorithms, A or B. Algorithm A has a time complexity of TA = 17n, and algorithm B has a time complexity of TB = 0.5n 2 . Give the range of n for which it is ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As