OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

odata message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: On the semantics of siblings


Comments inline.  My main complaint is the semantics of sibling.  If I have brothers and sisters, I have siblings.  And then, so do my brothers and sisters.  So, to them I am a sibling.  From that I conclude that sibling is not a type of node, but a role that a node plays.

 

Bottom line though is my objection is philosophical. 

From a practical point of view, if your solution works well for your audience, then I will abstain.

 

Thanks,
George

 

From: odata@lists.oasis-open.org <odata@lists.oasis-open.org> On Behalf Of Theissen, Heiko
Sent: Friday, January 28, 2022 2:27 AM
To: odata@lists.oasis-open.org
Subject: [odata] RE: On the semantics of siblings

 

[EXTERNAL EMAIL]

My favorite textbook on such matters (Knuth: The Art of Computer Programming) uses the following language in connection with siblings:

  • Section 2.3.1 speaks of a set of nodes being siblings: "Peter, Paul and Mildred are siblings" in the example below, with node "Betty" removed (because otherwise, it is not a hierarchy in our sense). It avoids phrases like "Peter is a sibling of Paul", thus circumventing the question whether a node is a sibling of itself.

[GME] Yes

 

  • Section 7.2.1.6 contains an example of a forest with two roots where the second root is called the "right sibling" of the first root. Algorithmically, the notion of "right sibling" is important for forest traversals, and this works only if one root can be the right sibling of another root. Again, this leaves open the question whether a root (or any node) is a sibling of itself. The "right sibling" must of course always be a different node.

[GME] Knuth is describing a data structure that does not treat the forest as itself a node and it treats each root node as a tree in the forest.  Knuth's solution does allow all the trees in the forest to be found.

My preferred alternative is a data structure where the forest is also a root node and that the trees are its children.

 

I suggest the following:

  • The function issibling also gets the optional IncludeSelf parameter.

One root is a sibling of another root (and also of itself, if IncludeSelf=true).

[GME] That can work, but why would this function be used with self as the given entity?

Isn't the question really: "Am I a child?"

 

Heiko

 

 

From: odata@lists.oasis-open.org <odata@lists.oasis-open.org> On Behalf Of Ericson, George
Sent: Freitag, 28. Januar 2022 02:26
To: odata@lists.oasis-open.org
Subject: [odata] On the semantics of siblings

 

Dictionary definitions:

Sibling [eur03.safelinks.protection.outlook.com]: one of two or more individuals having one common parent

                Sibling [eur03.safelinks.protection.outlook.com]: a brother or sister

 

Simple thought experiment.

·          I have two parents: Betty and Frank

·         Betty has 3 children: Paul, Mary, Peter

·         Frank has 3 children: Paul, Peter, Mildred

·         Peter is my sibling on both my  parents' sides

·         Mildred is my sibling on my father's side

·         Mary is my sibling on my Mother's side

·         I am a sibling of Peter on both my  parents' sides

·         I am a sibling of Mary on my mother's side

·         I am a sibling of Mildred on my father's side

·         I am not a sibling of myself

 

Regards,

George Ericson

Dell | Sr Distinguished Engineer

Office of the CTO

Mobile: +1 508.498.8461

Email: George.Ericson@Dell.com [eur03.safelinks.protection.outlook.com]

 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]