comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: binary tree and files
Date: 2000/11/03
Date: 2000-11-03T00:00:00+00:00	[thread overview]
Message-ID: <IkCM5.385329$i5.6464185@news1.frmt1.sfba.home.com> (raw)
In-Reply-To: 8tuq67$lqj$1@wanadoo.fr

>what is a set of nested tuples??
Your tree diagram can be written as
father(null, child1(child2(null,little child1(little child2(null,null), null)))
where a "(" means "has the children:" and a ")" means "end of this set of
siblings"
You can read that back in and re-create the tree structure.

BTW, your textual description seems to me to indicate
father(child1,child2(little child1, little child2))
which is different than the diagram.

>there is no cycle i think in my program
  You can see that the nested list form could not handle cycles since
at some point a child would have to include one of his ancestors, who
occur to his left, as one of his descendants, who occur to his right.
Absent time travel, this cannot happen in a father, child genealogical tree.
As Oedipus demonstrated, it could happen if you included marriages.




  parent reply	other threads:[~2000-11-03  0:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-03 15:06 binary tree and files Franck
2000-11-03 15:20 ` Franck
2000-11-03 15:53   ` Arthur G. Duncan
2000-11-03 16:47     ` Franck
2000-11-03  0:00       ` John Cupak
2000-11-03  0:00         ` Franck
2000-11-03  0:00           ` Pascal Obry
2000-11-03  0:00             ` Franck
2000-11-03  0:00               ` Larry Hazel
2000-11-03  0:00       ` tmoran [this message]
2000-11-04  0:00   ` David C. Hoos, Sr.
2000-11-04  0:00 ` David C. Hoos, Sr.
2000-11-05  1:01   ` Jeff Carter
2000-11-05  0:00     ` David C. Hoos, Sr.
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox