473,386 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Please clear this doubt relating to Forest (DataStructures)

Hi All

I recently studied about "Forest" Datastructures.

Supposed we have two trees. Could not represent diagramatically

Tree a
======
1) 10 is the root node
2) 9 is the

Tree a Tree b
===== =====
10 5
/ \ / \
9 20 4 7

These are my doubts

1) Is forest applicable for General trees.

2) I read that in "Forest" second tree(Tree b) will be attached as a right child to the first tree (Tree a)

3) How can I attach "Tree b" to "Tree a".
Should I make RIGHT CHILD of node "20" of "Tree a" to point to "Tree b".

4) If I do like that then it violates the binary trees basic principle.
As node "5" of Tree b is less that node "20" of Tree a.


Please clarify my doubts.


Thanks & Regards
Sathish Kumar
May 26 '08 #1
2 1732
weaknessforcats
9,208 Expert Mod 8TB
Not all trees are ordered the same way. Some trees are not ordered at all. A forest is just a tree of trees and you are probably only interested in the edges.

I did a Google on forest data structure and found 248,000 web pages. I expect your answer is there.
May 26 '08 #2
JosAH
11,448 Expert 8TB
Not all trees are ordered the same way. Some trees are not ordered at all. A forest is just a tree of trees and you are probably only interested in the edges.
No, a forest is a set of trees. They don't need to be connected in a single tree.
Look here.

kind regards,

Jos
May 26 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Bram Stolk | last post by:
Hello, Python features the Queue.Queue object that provides thread-safe access. What if I want thread access to other types of datastructures? Would I need to pair e.g. each list, Set or...
1
by: | last post by:
Can anyone help me on how to enumerate all the domains in a forest with VB.NET. Thanks, Dan Rhoads
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
13
by: sathyashrayan | last post by:
Dear group, pls go through the following function definition: function at_show_aux(parent, child) { var p = document.getElementById(parent); var c = document.getElementById(child); var top ...
1
PEB
by: PEB | last post by:
POSTING GUIDELINES Please follow these guidelines when posting questions Post your question in a relevant forum Do NOT PM questions to individual experts - This is not fair on them and...
4
by: CCLeasing | last post by:
I have a text file which consists of lines of data. Each line has units of data seperated by semicolons, like so. AAAA ; some text relating to AAAA ; some more text relating to AAAA BBBB ; some...
1
by: thund3rstruck | last post by:
Hi guys, I've been plugging away at this for a few hours and it's really frustrating me. I have a requirement where I must enumerate domains (and all child domains) in a large forest where I do...
3
by: Alami | last post by:
I'm newdie in c programming. this is my first project in programming. I have to write a program for a airline reservation. this is what i have done yet. but when it runs it shows the number of...
2
by: mohi | last post by:
hello every one , i know this is a c++ forum ,but as i cudn't get any datastructures forum ..iam posting here : can anyone tell me which is the best language to be used for implementation of...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.