From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5d80f40bdd51947e,start X-Google-Attributes: gid103376,public From: tmoran@acm.org Subject: Re: binary tree and files Date: 2000/11/03 Message-ID: #1/1 X-Deja-AN: 689284707 References: <8tuq67$lqj$1@wanadoo.fr> X-Complaints-To: abuse@home.net X-Trace: news1.frmt1.sfba.home.com 973271464 24.20.190.201 (Fri, 03 Nov 2000 09:11:04 PST) Organization: @Home Network NNTP-Posting-Date: Fri, 03 Nov 2000 09:11:04 PST Newsgroups: comp.lang.ada Date: 2000-11-03T00:00:00+00:00 List-Id: >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.