Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 256
  • Last Modified:

avl trees

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
colettoc
Asked:
colettoc
  • 6
  • 5
  • 4
  • +1
1 Solution
 
jack_p50Commented:
could you give more details of what you need?
0
 
BigRatCommented:
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
 
colettocAuthor Commented:
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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
BigRatCommented:
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
 
colettocAuthor Commented:
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
 
BigRatCommented:
I have almost finished. Shall I post it here (its a bit long) or have you an e-mail address?
0
 
colettocAuthor Commented:
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
 
scrapdogCommented:
http://www.cs.uidaho.edu/~karenv/cs213/useful.pages/avl.html

At this site there is some c++ code for inserting a node.
0
 
scrapdogCommented:
But the rat will probably give you a much more excellent program.
0
 
colettocAuthor Commented:
cool i'll be waiting on you Big Rat...
0
 
scrapdogCommented:
Bonjour grand rat. Veuillez le signaler ici. Je voudrais le voir.
0
 
BigRatCommented:
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
 
colettocAuthor Commented:
hey could you send it to my hotmail account as well..

pacco88@hotmail.com

thankX
PaCCo
0
 
BigRatCommented:
I have sent all the code and answered your last mail. Any reply?
0
 
scrapdogCommented:
I hate it when that happens.
0
 
BigRatCommented:
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

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 6
  • 5
  • 4
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now