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

  Uml graphical notation to define the object classes

Use UML graphical notation, construct the design for the system to define the object classes and show the interaction of the data collection sub systems.

  Cloud computing assignment

WSDL service that receives a request for a stock market quote and returns the quote

  Write algorithm to reverse elemens in queue

Using basic queue and stack operationns, write algorithm to reverse elemens in the queue. Suppose that 'Stack' is class described in section with 'StackType' set to int and STACK_CAPACITY

  Creating code for a class called arrayqsn

Create all the code for a class called ArrayQsn. This class will contain 2-techniques. The first technique runningSumMean accepts an array of ints as a parameter, and will return the mean of the values as a double.

  Explain feasibility analysis for jobs of lrt algorithm

Study feasibility analysis for jobs of LRT algorithm when preemption is allowed. Which scheduling algorithm is best suited for high speed networks and why? Distinguish between static and dynamic systems.

  Short discussion on the concept of cryptography

The answer gives the learner with a short discussion on the concept of cryptography and the different aspects and functions that are provided through using encryption.

  How do a bubble sort in mips?

How do a bubble sort in MIPS?

  Generalize 2-3 algorithms for insert and delete

Generalize the 2-3 algorithms for INSERT and DELETE to K-J trees, where non-leaf vertices have between K and J children for fixed integers K >=2, and J>= 2K-1.

  Questionm about distributed database

Explain what a distributed database is and how replication works with respect to managing the information in these databases.

  Dbms and data mining to imporve customer service

Discuss how a database management system and data mining can help motor vehicle maintenance center improve its services, and what tables would be required in such a database.

  Maekawa''s algorithm

Maekawa's Algorithm is used to achieve mutual exclusion for 13 sites. Suppose the sites are labeled 1, 2, ..., 13. Find the request sets R1, R2, ... , R13. Suppose sites 1, 6, 12 want to enter a critical section ( CS ) and they have sent requests in ..

  Explain good algorithms to solve character pathfinding

You are working on the new computer game. One of implementation problems you are trying to solve is character pathfinding. What algorithms would be good to use and explain why?

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