Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 7. (53 POINTS) When we search in Google for A B C D this is equivalent to searching for A AND B AND C

image text in transcribed
Problem 7. (53 POINTS) When we search in Google for "A B C D" this is equivalent to searching for "A AND B AND C AND D", i.e. searching for all documents that contain all four keywords A,B,C and D. We ask you to design an algorithm that does so efficiently. The lirst thing a search engine does is to generate a hit-list for each keyword. A hit-list is a sorted sequence of document-identifiers (doe-id's) that contain the keyword in question. Let the hit-lists be in the form of sorted arrays A[1..a],B[1.b],C[1.c],D[1.d] of doc-id's for the four keywords respectively. Let the lengths of the arrays A,B,C and D be respectively a,b,c,d, where a=n3,b=nlgn,c=n2 and d=n. for some parameter n. Give an efficient algorithm that generates the hit-list of doe-ids in which all four keywords A,B,C,D appear; this output hit-list should also be sorted by doc-id. How big is the output hit-list ? Express your answer in asymptotic notation in terms of n with a bound that is as asymptotically tight ns possible. Express the running time of your proposed efficient algorithm in terms of n using asymptotic notation (as tight as possible)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions