473,698 Members | 2,888 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Please clear this doubt relating to Forest (DataStructures )

34 New Member
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 1747
weaknessforcats
9,208 Recognized Expert Moderator Expert
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 Recognized Expert MVP
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
1218
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 hashmap with its own threading.Semaphore() object? Or is there an easier way to have thread-safe access to datastructures?
1
1842
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
9634
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 and I was wondering if anyone here would be able to give me some tips for young players such as myself, for learning the language. Is this the best Newsgroup for support with JAVA?
13
1707
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 = (c == "y") ? p.offsetHeight+2 : 0; var left = (c == "x") ? p.offsetWidth +2 : 0;
1
54514
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 we instruct our experts to ignore any such PMs completely Be sure to give the version of Access that you are working with and the Platform and OS if applicable.
4
2190
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 text relating to BBBB ; some more text relating to BBBB I have a form which consists of a combo box control, and text box control. combo box contol is called = comCrime text box control is called = txtProtocol
1
4349
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 not know any details about the forest. The solution must be in C#.net 2005. I located a vbscript that worked ok but it must be in C#. The part I am stuck on is objRootDSE = GetObject("LDAP://RootDSE") which has no equivelent in c#. I'm very...
3
1851
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 seats as 0 and the flight no. is also repeating. If any can tell why is this please help me. #include<stdio.h> #include<ctype.h> #include<conio.h> #include<memory.h>
2
1233
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 datastructures by best i mean speed of operation : and if given a choise that someone knows both c and c++ which one will be convinent ang faster for implementimg data structures??
0
8611
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8876
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7741
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6531
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5867
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4624
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2341
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.