Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Consider the following pairs of functions f(n), g(n). For which pair the func

ID: 666507 • Letter: 1

Question

1. Consider the following pairs of functions f(n), g(n). For which pair the functions are such that f(n) is O (g(n) and g(ra) is O(f(n))? (A) f(n) m2, g(n) n log(n2) (B) f (n) log n,g(n) 105 (C) f(n) n, g(n) 2 log n 10n. (D) f(n) ns, (n) 2/n3 (E) f (m) 34, g(n) log n 2. The following values are inserted, in the given order, in a hash table of size 7 that uses linear probing and hash function h(k) k mod 7: 4, 11, 5, 12, 6. In which entry of the table is the key 6 stored? (A) 0 (B) 1 (C) 4 (D) 5 (E) 6

Explanation / Answer

1.-I think that the correct option es the option A. Because the exponential function is the inverse of logarithm function

2.- The key 6 is stored in position 1.
in fact, the order of the table complete is

12,6,null,null,4,11,5
Explanation: when you have a hash table, you have that make the operation indicated. it means K mod 7, in the given order. So, first we take the 4, the operation 4 MOD 7 results 4 because the MOD operation gives the rest of the divide.
Then we have the key 11 and the operation 11 mod 7 resuts 4, again. but the field 4 is already occupied so we put the key 11 in the field that is at the right side of the field 4.
Then we have the key 5 and the operation 5 mod 7 resuts 5. but the field 5 is already occupied so we put the key 5 in the field that is at the right side of the field 5.

Then we have the key 12 and the operation 12 mod 7 resuts 1. So we put the key 12 in the first field of the table, the field 0.
the we have the key 6 Then we have the key 6 and the operation 6 mod 7 resuts 6. So we try to put the key 6 in the field number 6 but thats already occupied, so we go to the being of the tablet to try put it in the field number 0 but its already occupied. So we put the key 6 in the next field I mean, the field numer 1