subject
Computers and Technology, 21.05.2020 07:03 cearp

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 first thing a search engine does is to generate a hit-list for each keyword. A hit-list is a sorted sequence of document-identifiers (doc-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 = n 3 , b = n lg n, c = n 2 and d = n for some parameter n. Give an efficient algorithm that generates the hit-list of doc-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 as possible. Express the running time of your proposed efficient algorithm in terms of n using asymptotic notation (as tight as possible).

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:20
What’s resistance in an electrical circuit ?
Answers: 1
question
Computers and Technology, 22.06.2019 05:00
Are special characters that allow you to search for multiple words at the same time.
Answers: 2
question
Computers and Technology, 22.06.2019 16:30
Technician a says that a dry sump system uses no oil storage sump under the engine. technician b says that a wet sump system uses no oil storage sump under the engine. who is correct?
Answers: 3
question
Computers and Technology, 22.06.2019 17:30
Under which key category do the page up and page down keys fall? page up and page down keys fall under the keys category.
Answers: 1
You know the right answer?
When we search in Google for "A B C D" this is equivalent to searching for "A AND B AND C AND D", i....
Questions