Imagine there are 100 baskets, numbered 1,2,...,100, and 100 items, similarly numbered. Item i is in basket j if and only if i divides j evenly. For example, basket 24 is the set of items {1,2,3,4,6,8,12,24}. Describe all the association rules that have 100% confidence. Which of the following rules has 100% confidence?

{3,4,5} → 42
{12,18} → 36
{4,6} → 24
{1,3,6} → 12

{12,18} → 36

To find the association rules with 100% confidence, we need to calculate the support and confidence for each rule. Here's how you can do it step by step:

1. First, identify the items and baskets in each rule.

{3,4,5} → 42:
Items: {3, 4, 5}
Basket: {3, 4, 5, 6, 10, 12, 15, 20, 30, 42}

{12,18} → 36:
Items: {12, 18}
Basket: {12, 18, 24, 36}

{4,6} → 24:
Items: {4, 6}
Basket: {4, 6, 12, 24}

{1,3,6} → 12:
Items: {1, 3, 6}
Basket: {1, 2, 3, 4, 6, 12}

2. Calculate the support for each rule:
Support measures how frequently the rule appears in the data. In this case, since we have fixed baskets and items, the support of each rule can be calculated as the ratio of the number of items in the basket to the total number of items.

Support({3,4,5} → 42) = 10/100 = 0.1
Support({12,18} → 36) = 4/100 = 0.04
Support({4,6} → 24) = 4/100 = 0.04
Support({1,3,6} → 12) = 6/100 = 0.06

3. Calculate the confidence for each rule:
Confidence measures how often the rule is correct. In this case, since i divides j evenly, the confidence can be calculated as the ratio of the number of items in the basket to the number of items in the rule.

Confidence({3,4,5} → 42) = Support({3,4,5} → 42) / Support({3,4,5}) = 10/10 = 1
Confidence({12,18} → 36) = Support({12,18} → 36) / Support({12,18}) = 4/4 = 1
Confidence({4,6} → 24) = Support({4,6} → 24) / Support({4,6}) = 4/4 = 1
Confidence({1,3,6} → 12) = Support({1,3,6} → 12) / Support({1,3,6}) = 6/6 = 1

4. Identify the rules with 100% confidence:
All four rules have 100% confidence since the confidence calculation resulted in 1. So all of them are the correct answer.