Share
Explore BrainMass

Trees

There is a joke in computer science that "everything is a tree" due to their widespread use and applications. Trees are abstract data types/structures with a hierarchical build made up of a central root node (thought some types of tree allow this space to be empty) and many levels of children nodes under it. These nodes all link up to form a tree like the one below:

Trees can be, and often are, implemented recursively as a collection of nodes that have both a value or condition attribute and one storing a reference for their parent and/or children nodes. The root is the only node that has no parents; all others must have a single parent node in standard trees. A node with no children is called a leaf. The height  of a tree is the longest possible branch (path) from the root to one of these leaves, counted by the the number of nodes it passes through to get there. The industry standard is to say the root has height 0 but some notate it as height 1. Sometimes it is useful to look at trees as a whole, but often more so at subsections or the individual nodes. Common operations on trees are:

  • adding a node
  • searching the tree for a value
  • removing a node with a specific value

There are many types of trees too! Common types include:

  • Binary search trees (BSTs) - wherein values are sorted as they are added. You begin at the root and go left if the value is smaller than the root's value and right if it is bigger, repeating those comparisons until you reach a place where the node you're adding can be a leaf. The above tree is an example of this type.
  • AVL trees - a BST which is balanced, i.e. arranged so that the heights of each branch are within 1 node of each other. The above tree restructured as an AVL tree would look as follows:

  • Red-Black trees - Similarly to AVL trees, these trees must be balanced, but with branch heights 2 nodes of each other. Each node is also assigned a colour attribute, either red or black, and the black height is the number of black nodes in the longest branch from root to leaf. The root of a Red-Black tree is always black.

Software Development Process.

Your work as a management information consultant has led you to a long-term project working on a custom decision support system software application. In 600-700 words complete the following and 3 references original only please Use the internet and credible sources to research the following approaches to the software deve

Implementing Operations on Binary Trees

Consider the following definition of a Binary Tree structure: typedef struct BTnode *node; struct BTnode { int key; node left; node right; }; 1. Write a function in C programming language that can find and return the height of a Binary Tree. 2. Write a function in C programming language that can find and return the c

Build and show a binary tree based on the following names

The Binary Tree is one of the best ways to organize data when you need fast access. For this assignment, we will organize a list of names and perform various operations on those names. Build and show a binary tree based on the following names inserted into the binary tree in order listed: John, Eddie, Kim, Derrick, Ethan, Lonny,

Simple questions inf Class tree diagram

Classes A, B, C and H are related through inheritance and have the fields shown in the class tree diagram below. Class G is not related to any of the other classes Please see attachment file for more details

Active Directory Riordan Manufacturing

Using Riordan Manufacturing as your model, create an Active Directory design for the organization. This should include your reasoning for core choices like number of forests and domains, DNS server placement, and placement of key roles in the AD design. You can use Visio® to assist in the design, and then prepare a 2-3 page pro

Excel #3

Using the documents given to you by the class president, you will be entering more data into the Excel workbook you created in Phase 1. You will also insert a new sheet into that workbook that will contain the cost data. Open the Excel workbook you created in Phase 1, the list of everyone who has responded to their invitatio

Excel Data Processing

Someone please help! The class president has given me a MS Word document that contains a list of everyone who has been invited to the high school reunion. I will enter this data into a pre-made Excel workbook. This Excel workbook does not contain all the information, so I will enter and format a substantial amount of the data

Create a unix shell script that does the following

Create a script that checks the day of the week, and takes one of two actions (step 2 or 3) depending on the day. If the day is Monday through Friday, print (send to stdout) the name of the day. Then, find each file named TTDL (Things-To-Do List) in the tree rooted at the current directory (pwd on down). Using a separate outp

Spreadsheet Applications

Help with the following tasks: I need help with this workbook i am doing for a spreadsheet application: 1.Open the guest.xls workbook that I created and uploaded: Review the data on the responded.doc document. 2. Enter the Attend, Adult, and Child data into your existing workbook. 3. Create headings on your Guest Lis

Web Site Structure Paper

Resource: Cascading Style Sheets at the following Web site: http://www.w3.org/Style/CSS/learning Explain which structure you prefer and why. Locate two Web sites that utilize this structure, and list their URLs. What advantages do Cascading Style Sheets (CSS) have when creating Web pages?

Types of Join Operations

What are the different types of joins, and how are they used? Show examples to support your reasoning.

Draw an E-R Diagram

Draw an E-R diagram with all appropriate notation for the following situation. In a particular fruit-growing region there are a number of orchards. Each ORCHARD is identified by its LOCATION. In general, each orchard contains a large number of trees (assume that an orchard must contain at least one tree). A TREE entity has the a

Divide and Conquer a Binary Tree

Consider an n-node complete binary tree T, where n=2^d - 1 for some d. Each node v of T is labeled with a real number x_v. You may assume that the real numbers labeling the nodes are all distinct. A node v of T is a local minimum if the label x_v is less than the label x_w for all nodes w that are joined to v by an edge. You

How to Create Gantt Charts

A Gantt chart is a very useful tool for analyzing and planning such complex projects. They: I. Help you to plan out the tasks that need to be completed II. Give you a basis for scheduling when these tasks will be carried out III. Allow you to plan the allocation of resources needed to complete the project, and IV. Help you

Site Structures (linear & hierarchical)

Browse the Web to find examples of the following site structures (A. Linear and B. Hierarchical) and describe how the content fits the structure. Explain how the chosen structure adds to or detracts from the effectiveness and ease of navigation of the site. Determine whether the site provides sufficient navigation information.

XML and DOM

:, Write a 3 to 5 page paper summarizing your experiences of working with Document Object Model and XML . Then prepare Screen Shots of your efforts. Write a 1 page paper discussing your impressions of the XML Eclipse tools. Include your screen shots and 1 to 2 page paper with the paper from requirement 1 describing XML standards

Quality and Reliability

Hi, I need assistance in writing 500-600 words on quality and reliability - they are related concepts but are fundamentally different in a number of ways. Discuss them. Regards, Vishnu Vandana

Mathematical Properties of Binary Trees

----------- Show that if binary tree T is full at level i, then it is full at every level j smaller than i. --------------- Show that the depth of the complete binary tree Tn for a general n is given by D(Tn) = [log2n]. See attached for better format. ------------ Using induction, give a direct proof of Propo

Object Identifier Tree

In reference to the Object Identifier tree a. What do you expect the subject of the standard 1.2.840.113549 to be? (Make a guess). b. Where in the tree would a new Microsoft file format for a new product be placed?

Java programmers and class hierarchies

Java programmers can use class hierarchies for the purposes of inheritance. For example, given a Tree class, we could define Conifer and Deciduous sub classes that inherit from the parent Tree class as you can see here: See attached file for full problem description.

Must Draw a Decision Tree for this Situation

Premium Airlines has recently offered to settle claims for a class-action suit, which was originated for alleged price fixing of tickets. The proposed settlement is stated as follows. Draw a decision tree for this situation. Initially, Premium Airlines will make available to the settlement class a main fund of $25 million in