Rabu, 16 Maret 2011

tugas STBI

JAWABAN :

Term

Doc ID

2 breakthrough

1

3 drug

1

4 for

1

9 schizophrenia

1

6 new

2

9 schizophrenia

2

3 drug

2

6 new

3

1 approach

3

4 for

3

10 treatment

3

7 of

3

9 schizophrenia

3

6 new

4

5 hopes

4

4 for

4

9 schizophrenia

4

8 patients

4

Term

Doc ID

Approach

3

Breaktrough

1

Drug

1

Drug

2

For

1

For

3

For

4

Hopes

4

New

2

New

3

New

4

Of

3

Patients

4

Schizophrenia

1

Schizophrenia

2

Schizophrenia

3

Schizophrenia

4

Treatmen

3

Term doc.freq Posting List

Approach 1 ------à 3

Breaktrough 1 ------à 1

Drug 2 ------à 1 ------à 2

For 3 ------à 1 ------à 3 ------à 4

Hopes 4 ------à 4

New 3 ------à 2 ------à 3 ------à 4

Of 1 ------à 3

Patients 1 ------à 4

Schizophrenia 4 ------à 1 ------à 2 ------à 3 ----à 4

Treatmen 1 ------à 3


Exercise 1.2.

Term

Doc 1

Doc 2

Doc 3

Doc 4

Approach

0

0

1

0

Breaktrough

1

0

0

0

Drug

1

1

0

0

For

1

0

1

1

Hopes

0

0

0

1

New

0

1

1

1

Of

0

0

1

0

Patients

0

0

0

1

Schizophrenia

1

2

3

4

Treatmen

0

0

1

0

Exercise 1.7

( Tangerine OR Trees ) AND ( Marmalade OR Skies ) AND ( Kaleidoscope OR Eyes )

Term Freak ( tangerine OR trees) = ( 46653 + 316812 ) = 363456

Eyes 213312 ( marmalade OR skies ) = ( 107913 + 271658 )

Kaleidoscope 87009 = 379571

Marmalade 107913 ( kaleidoscope OR eyes ) = ( 87009 + 213312)

Skies 271653 = 300321

Tangerine 46653

Trees 316812

Exercise 1.10

INTERSECT (x,y)

answer ß ( )

while x = nil OR y = nil

do if doc ID ( x ) = doc ID ( y )

then ADD ( answer,doc ID ( x ))

x ß next ( x )

y ß next ( y )

else if doc ID ( x ) <>

then x ß next ( x )

else y ß next ( y )

Tidak ada komentar:

Posting Komentar