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

4. Assume you are given the following collection of twelve baskets, each of whic

ID: 3889340 • Letter: 4

Question

4. Assume you are given the following collection of twelve baskets, each of which containing three of the six items 1 through 6:

{1, 2, 3} {2, 3, 4} {3, 4, 5} {4, 5, 6}
{1, 3, 5} {2, 4, 6} {1, 3, 4} {2, 4, 5}
{3, 5, 6} {1, 2, 4} {2, 3, 5} {3, 4, 6}

Suppose the support threshold is 4. On the first pass of the PCY Algorithm we use a hash table with 11 buckets, and the set {i, j} is hashed to bucket i×j mod 11.

a) By any method, compute the support for each item and each pair of items.
b) Which pairs hash to which buckets?
c) Which buckets are frequent?
d) Which pairs are counted on the second pass of the PCY Algorithm?

Explanation / Answer

Hash-based improvement to A-Priori.

During Pass 1 of A-priori, most memory is

idle.

Use that memory to keep counts of buckets

into which pairs of items are hashed.

Just the count, not the pairs themselves.

Gives extra condition that candidate pairs

must satisfy on Pass 2.

Organize main memory:

Space to count each item.

One (typically) 4-byte integer per item.

Use the rest of the space for as many

integers, representing buckets, as we can.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote