FAQ on CS351 Project #2
Last updated on 16.12.10 by Emre.
*Contact: evarol@cs.bilkent.edu.tr
Question#4: Could you please give some hints about creation of new linear hashing file structure? |
Answer: Yes.
First, create an empty linear hashing file structure (with new load factor). Second, insert all the records of the old file in the same order. Third, insert new records. Finally, report the final structure. |
Question#3: Could you give some more hints about finding the minimum possible load factor? |
Answer: Yes.
As stated in the assignment, only 3 decimals are needed. A load factor is between zero and one. Thus, there are no much different alternatives, which implies that you can just do an exhaustive search by checking whether a load factor candidate results in the given linear hashing file structure or not. Among the appropriate candidates, just report the smallest one. Note that once we reach to the desired load factor, we add ceiling(load factor * blocking factor) more records and expand the table. We continue to this operation until all records are successfully inserted. 0.333 load factor value does not result in given initial linear hashing file structure; however, 0.334 does. That is why the expected output is 0.334. |
Question#2: What is number of records per bucket? |
Answer: It is the second parameter of your program. |
Question#1: If there are more than one integer in new records file, how are they separated? |
Answer: By a space character: ' '. |