6.Suppose a health insurance company identifies each member with an 8-digit acco
ID: 3009229 • Letter: 6
Question
6.Suppose a health insurance company identifies each member with an 8-digit account number. Define the hashing function h that first takes the first 3 digits of an account number as one number and the last 5 digits as another number, then adds them, and lastly applies the mod–37 function.
a)How many linked lists does this create?
b)Compute h(59243973).
c)Compute h(42280135).
7.Compute the check digit c for the 10-digit ISBN codes below. Show the calculations that you used to obtain your answers.
a)0-523-76952-c (the initial 0 indicates that this is an English book)
b)2-426-25967-c (the initial 2 indicates that this is a French book)
9.Define a relation R on the set of positive real numbers by (x, y) R if and only if
x2 – y2 = 0. Determine if the relation R is a partial order. If it is not a partial order, explain which property or properties R fails to have.
12.If represents lexicographic order, then which of the following is/are true? Explain your answers.
a)(3, 11) (3, 0)
b)(4, 7) (2, 17)
c)(6, 2) and (8, 1) are not comparable because we need the first number to be larger in one of the pairs.
13.Let B = {2, 3, 4, 6, 12, 24, 36} and R be defined by xRy if and only if x|y.
Determine all minimal and all maximal elements of the poset.
Find all least and greatest elements of the poset. Explain your answers.
Explanation / Answer
Answer 6)
(a) There are 3*5 lined lists.
(b) h(59243973) = (592+43973)(mod37) = 44565(mod37) = (1204*37+17)(mod37) = 17
(c) h(42280135) = (422+80135)(mod37) = 80557(mod37) = (2177*37+8)(mod37) = 8
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.