Design and implement an avl tree algorithm

Assignment Help Data Structure & Algorithms
Reference no: EM13166808

Design and implement an AVL tree algorithm that searches a collection of documents. You will be provided with a set of 50 documents and a set of sample queries. First, you will process the documents and store their content (i.e. words / tokens) in the data structures that you selected (in information retrieval, this phase is called indexing). Next, for every input query, you will process the query and search its keywords in the documents. (this phase is called retrieval). For each such query, you will have to display the documents that satisfy the query. The queries may contain simple Boolean operators, that is AND and OR, which act in a similar manner with the well known analogous logical operators. For instance, a query: "Keyword1 AND Keyword2" should retrieve all documents that contain both these keywords (elements). "Keyword 1 OR Keyword 2" instead will retrieve documents that contain either one of the two keywords.

Example
Consider the following sample documents.
Doc1: I like the class on data structures and algorithms.
Doc2: I hate the class on data structures and algorithms.
Doc3: Interesting statistical data may result from this survey.
Here are the answers to some queries:
Query 1: data
Doc1, Doc2, Doc3
Query 2: data AND structures
Doc1, Doc2
Query 3: like OR survey
Doc1, Doc3
Hints
Take a look first at the format of the documents.
You will have to parse the input. You may ignore all lines starting with "<", these are all SGML tags that are
useful for certain tasks, but you will probably not find them very useful in this project. The punctuation is
already separated from the words, so you do not have to worry about that. You will have to read one word at a
time and add it to your data structure.

Reference no: EM13166808

Questions Cloud

Draw the structures of the bases in dna : Draw the structures of the bases in DNA and indicate the H bonding interactions between the base pairs.
What is the best algorithm for sorting : What is the best algorithm for sorting each of the following: general comparable objects, long character strings, double precision floating point numbers, 32-bit integers, and bytes? Justify your answer.
What is the mole fraction of ethanol in a solution : What is the mole fraction of ethanol in a solution made from mixing 299 grams of ethanol (C2H5OH) and 360 grams of water? (Round your answer to 2 places after the decimal.)
How to design a new isa : How to design a new ISA? What should take into consideration?
Design and implement an avl tree algorithm : Design and implement an AVL tree algorithm that searches a collection of documents. You will be provided with a set of 50 documents and a set of sample queries. First, you will process the documents and store their content (i.e. words / tokens) in..
A program computes and displays the number of centimeter : The Earth's ocean levels have risen an average of 1.8 millimeters per year over the past century. Write a program computes and displays the number of centimeters and number of inches the oceans rose during this time.
Create a boolean function that computes : Create a Boolean function that computes the value of a factorial for values up to including 10. Include comments about how to use the function and describing how it works.
Several views to cybersecurity architecture : several views to Cybersecurity Architecture. Describe the Business View and the Architect's View through a business case example.
Describe what is meant by cybersecurity design : Describe what is meant by Cybersecurity Design.List and describe the principles that must be supported.

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Find the checksum field in a single parity bit scheme

Assume that the information content of a packet is the bit pattern 1111000010100101 and an even parity is being used

  Write a flowchart to solve any linear equation ax+b=01.

Write a flowchart to solve any linear equation ax+b=01. W Write a flowchart to solve any linear equation ax^2+bx+C=0

  An independent set in a graph g

An independent set in a graph G is a set of vertices I in G such that no two vertices in I are adjacent (neighbors). The maximum independent set problem is, given a graph G, to compute an independent set of maximum size (maximum number of vertices) i..

  Create algorithm which takes as inputs matrices

Create the algorithm which takes as inputs, matrices C, D, and vertex indices i and j, and returns minimum-cost path from vertex i to vertex j.

  Creating a table of xml documents

Make a table of XML documents with a type of XML. Use a primary key so add a field of type INT that is an identity. Insert many records into XML field in this new table.

  Evaluate the average complexity of an enqueue operation

Evaluate the average complexity of an enqueue operation. Determine the average complexity of the dequeue (remove) operation.

  Creating class diagram

Think about a computer system used to manage loans for a library. Libraries loan books, CDs, videos and magazines to registered members.

  Create a java program to arithmetic expression

Create a Java program that takes as input an infix arithmetic expression then transforms to a postfix expression and based on binary tree, it evaluates that expression.

  One e business failure

Discuss about one e-Business failure. Describe what happened and what you would have done differently. Explain whether or not the e-Business practiced sound financial planning.

  Algorithm for string of numbers recognize all the substrings

Write down algorithm, using pseudocode, to perform the following task, Given a string of numbers, recognize all of the substrings that form numbers that are divisible by 3.

  Polynomial time algorithm for rooted directed acyclic graphs

Illustrate that if you were given a polynomial time algorithm for determining whether two rooted directed acyclic graphs are isomorphic, then polynomial time algorithm for testing.

  Creating sample spreadsheet for household budget

You do not need to put in personal data or actual values if you do not wish, but you must include some information for each of the various categories and income and expense line items.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd