Question

In: Computer Science

Web Mining Assignments Exercise 6.1.1 : Suppose there are 100 items, numbered 1 to 100, and...

Web Mining Assignments

Exercise 6.1.1 : Suppose there are 100 items, numbered 1 to 100, and also 100 baskets, also numbered 1 to 100. Item i is in basket b if and only if i divides b with no remainder. Thus, item 1 is in all the baskets, item 2 is in all fifty of the even-numbered baskets, and so on. Basket 12 consists of items {1, 2, 3, 4, 6, 12}, since these are all the integers that divide 12. Answer the following questions:

(a) If the support threshold is 5, which items are frequent?
! (b) If the support threshold is 5, which pairs of items are frequent?

! (c) What is the sum of the sizes of all the baskets?

PS: I know the answer of a) which are 1, 2, 3, 4 ... 18, 19, 20. But how to get the answers of b) and c) please show the steps and the explanation. Thank you.

Solutions

Expert Solution

Since you have requested answer for b and c, lets first analyze question then we will step by step derive answer.

Items : 1, 2, 3, ... 100

100 baskets such that item i divides b with remainder 0, since 1 divides every number item 1 will be present in every basket, 2 in even number basket and so on. this can also be understood hint given in question for basket 12.

therefore,

baskets:
[ {1}, {1, 2}, {1, 3}, {1, 2, 4}, {1, 5}, {1, 2, 3, 6}, {1, 7} .... {1, 2, 4, 5, 100, 10, 50} ]

a) explanation: for support threshold 5, items from 1 to 20 as 1 occurs 100 times, 2 occurs 50 times ... 20 occurs 5 times.

b) Let us pair two items, and since frequency also asked, for first item 1 and second item 2 {1, 2} will occur 50 times. because [100/ 1*2 = 50], {1, 3} pair occurs 33 times [100/ 1*3] = 33

Step 1: Two pairs with first item 1 :

[1, 2] occurs 50 times

[1, 3] => 33 times

and so on till 20 since threshold 5,

[1,20] => 5 times

using a) from second item 2 to 20, these are 19 pair.

Step 2: considering first item 2,

(2, 3) => 100/ 6 , 16 times,
(2, 4) => 100 / 2*4 , pair occurs 25 times,
(2, 5)  => 10
(2, 6)  => 16
(2, 7)   => 7
(2, 8)   => 12
(2, 9)  => 5
(2, 10) => 10
(2, 12) => 8
(2, 14) => 7
(2, 16)=> 6
(2, 18) => 5
(2, 20) => 5

Step 3: Similarly taking first item 3, pair will form,

(3, 4) => 100/ 3*4, 8 such items in basket with pair 3,4, similarly,
(3, 5): 6
(3, 6): 16
(3, 9): 11
(3, 12): 8
(3, 15): 6
(3, 18): 5

for easily obtaining pair, second item we will consider multiple or less than multiple of first item for matching threshold.

Step 4: taking 4 first pair, lets check pair for threshold 5,

(4, 5): 5
(4, 6): 8
(4, 8): 12
(4, 10): 5
(4, 12): 8
(4, 16): 6
(4, 20): 5

Step 5: for first item 5, only 3 pairs will form as multiples from 5, second item will only contain, 10, 15, 20,

(5, 10): 10
(5, 15): 6
(5, 20): 5

Step 6: first item 6

(6, 9): 5
(6, 12): 8
(6, 18): 5

Step 7: for 7, 8, 9, 10, only one pair exist only, consider second element till 20, for matching threshold 5.

for first item 7: (7,14)

8: pair (8,16)

9: pair  (9, 18)
10: pair (10, 20)

c) Given question we are asked to calculate sum of length of all baskets,

basket1 {1} ,length = 1

basket2 {1,2} length = 2

basket3 {1, 3} length = 2

basket4 {1, 2, 4} length = 3

basket5 {1, 5} length = 2

we look for pattern, for index of basket length is number of factors of basket index.

therefore sum of length of factors for basket index from 1 to 100 will be 482.


Related Solutions

4. Suppose there are 99 lockers numbered 1 through 99, and 99 students numbered 1 through...
4. Suppose there are 99 lockers numbered 1 through 99, and 99 students numbered 1 through 99. Initially, all lockers are closed. Now each odd-numbered student 1, 3, 5, 7, · · · , 99, in numerical order from 1 through 99, will open/close all the lockers that are numbered to be a multiple of the number of the student. For example, student 1 will open/close all the lockers, and student 3 will open/close all the lockers numbered by 3,...
9.Which web service items are correct for the below items? (select 2 items) (10 Puan) Web...
9.Which web service items are correct for the below items? (select 2 items) (10 Puan) Web service name space can be used for the object global definition and identification private, public, protected class methods can be used as web service method all methods in web services can be uses web state “session” object Description property of the WebService and WebMethod annotation can be used for the 10.Which item is correct for ASPX Page Lifecycle (events)? (10 Puan) PreInit, Init, Render,...
11. Which web service items are correct for the below items?
 11. Which web service items are correct for the below items? Web service name space can be used for the object global definition and identification private, public, protected class methods can be used as web service method all methods in web services can be uses web state "session" object Description property of the WebService and WebMethod annotation can be used for the 12. http-get method cannot protect the privacy of data. Is it correct? Yes No13. The web service application's method can return complex type (class definition)...
ASSIGNMENTS 1. POSTING (5 pts) Visit the following web site to view some fractures from the...
ASSIGNMENTS 1. POSTING (5 pts) Visit the following web site to view some fractures from the outside and also through x-ray: http://www.surviveoutdoors.com/emergency/fractures.asp Post a message describing what you thought of the web site in the message center:
Discuss the differences and commonalities between text mining and Web mining. Explain with your own words,...
Discuss the differences and commonalities between text mining and Web mining. Explain with your own words, please
Explain how/why data mining and web mining respectively pose a threat to both individual and group...
Explain how/why data mining and web mining respectively pose a threat to both individual and group privacy. Why does it matter? List at least three privacy-enhancement technologies (PETS) that exist to protect users and how/whether they work
A box contains 4 tickets. 1 ticket is numbered 0, 1 ticket is numbered 1, and...
A box contains 4 tickets. 1 ticket is numbered 0, 1 ticket is numbered 1, and 2 tickets are numbered 2. Suppose n draws with replacement are made from this box. Let Sn be the sum of the numbers drawn. a) Approximate the probability P(S100=100)
Suppose that 100 items are drawn from a population f manufactured products and the weight, X,...
Suppose that 100 items are drawn from a population f manufactured products and the weight, X, of each item is recorded. Prior experience has shown that the weight has a right skewed probability distibution with mean=150 oz and standard deviation=30 oz. Find the value of X-bar for which P(X-bar > ?) = 0.75.
Match the following numbered items with the most correct response letter. A response may be used...
Match the following numbered items with the most correct response letter. A response may be used once, more than once, or not at all. Group of answer choices Behavior modification       [ Choose ]            Reinforcement perspective on motivation            Process perspective on motivation            Content perspective on motivation       Porter-Lawler extension       [ Choose ]            Reinforcement perspective on motivation            Process perspective on motivation     ...
Consider a collection of 10 empty boxes (numbered from 1 to 10) and 5 balls. Suppose...
Consider a collection of 10 empty boxes (numbered from 1 to 10) and 5 balls. Suppose that each ball is placed in a box chosen at random. Assume that this placement of a ball in a box is performed independently for each ball. Note that a box may contain more than one ball and that some of the boxes will necessarily remain empty. Hint: Since more than one ball can be placed in the same box, it is best to...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT