Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

avl trees

Posted on 1998-12-02
16
Medium Priority
?
249 Views
Last Modified: 2010-04-16
i need to create an avl tree that uses a pre determined ajencency matrix stored in a dual dimentional array. the program must include the following
insert function
search function
create function
thankX
    Pacco
0
Comment
Question by:colettoc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
  • 4
  • +1
16 Comments
 
LVL 4

Expert Comment

by:jack_p50
ID: 1216272
could you give more details of what you need?
0
 
LVL 27

Expert Comment

by:BigRat
ID: 1216273
Could you (or somebody else) decode the term "avl", it's an abbreviation for something. I know what an adjacency matrix is but not this tree. A reference book would also be helpful.
0
 

Author Comment

by:colettoc
ID: 1216274
an AVl tree is a bianary tree. if you would like you can see an example of it as a java applet at the following URL:  http://wuarchive.wustl.edu/languages/python/contrib/DataStructures/avl.README

if you need any more info let me know..

pacco
0
On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

 
LVL 27

Expert Comment

by:BigRat
ID: 1216275
Thank you for the URL. For anyone else : AvL trees are a binary tree which is height balanced, has similar properties to B-Trees and was discovered by two Russians in 1962. An adjaceny matrix is a square matrix of Booleans, the columns are rows represent nodes and an entry is true if there is a path between them. Usually (not) used for representing graphs, since adjaceny lists use less space.
   I presume that the question pre-supposes that the matrix represents such a tree (or better a graph which looks like such a tree), the create function takes the matrix and produces a tree, the insert and delete functions operate on the tree. But before one starts writing code I need a couple of questions answered :-

   1) Does adjacency matrix also contain the leaf nodes?
   2) Are we given the root node as a parameter with the matrix?
0
 

Author Comment

by:colettoc
ID: 1216276
the adjaceny matrix contains all the information about the tree and the leaves. so i guess it does.

the root node is given in the matrix as the first point such as 1,1 this will be the root for all trees that are created.

thankX for all the help..

pacco,

P.S.  Let me know if there is any thing else that you need..
0
 
LVL 27

Expert Comment

by:BigRat
ID: 1216277
I have almost finished. Shall I post it here (its a bit long) or have you an e-mail address?
0
 

Author Comment

by:colettoc
ID: 1216278
you can send it to my address @ pacco88@hotmail.com as well as to colettoc@mimh.edu     ...  thank you your help is mutch appriciated..

thankX

pacco
0
 
LVL 5

Expert Comment

by:scrapdog
ID: 1216279
http://www.cs.uidaho.edu/~karenv/cs213/useful.pages/avl.html

At this site there is some c++ code for inserting a node.
0
 
LVL 5

Expert Comment

by:scrapdog
ID: 1216280
But the rat will probably give you a much more excellent program.
0
 

Author Comment

by:colettoc
ID: 1216281
cool i'll be waiting on you Big Rat...
0
 
LVL 5

Expert Comment

by:scrapdog
ID: 1216282
Bonjour grand rat. Veuillez le signaler ici. Je voudrais le voir.
0
 
LVL 27

Accepted Solution

by:
BigRat earned 800 total points
ID: 1216283
OK. I'll send the code to your mimh address. Reject this answer if you have not got it by 1200 GMT Monday 14 december.
   I hope you will have a much fun with it as I did hacking it. I'm sorry it took so long, but this is not something which I can do at work!
0
 

Author Comment

by:colettoc
ID: 1216284
hey could you send it to my hotmail account as well..

pacco88@hotmail.com

thankX
PaCCo
0
 
LVL 27

Expert Comment

by:BigRat
ID: 1216285
I have sent all the code and answered your last mail. Any reply?
0
 
LVL 5

Expert Comment

by:scrapdog
ID: 1216286
I hate it when that happens.
0
 
LVL 27

Expert Comment

by:BigRat
ID: 1216287
Scrapdog: pacco paid 200 first grade cheeses for the unit. I know you're short of money are you also short of bones? You could post a question asking pacco for a copy. That would be quite fair. You could also post a new teaser in the lounge. I've got to know Northeren Illinois and Indiana quite well, you know. But not for the 6 cheeses. That's a bit small.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
The core idea of this article is to make you acquainted with the best way in which you can export Exchange mailbox to PST format.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question