A TREE is an OPEN GRAPH or one such that at least one EDGE does not CONNECT TO TWO NODES. Examples:
*--------* *----------*--------* * | | | / \ | | | / \ | | | / \ * *----------* * *Thus, the graph in the file, "TEACHING HOPPY GRAMMAR" (on this Website) for a "Sentence" is a TREE.Perhaps the most familiar type of tre-graph is "The Family Tree". You could help a child build this as a LABELLED DIRECTED GRAPH (TREE). I sketch one for my grandchildren:
(1)[Grandmother Esther Odell]--married--[Grandfather John Hays](1) \ / \ / \ / \ / \ / | /\ / \ / \ (2)[Karen Gordon]--married--[Timothy Hays][Christopher Hays]--married--[Katherine Anderson] \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / | | [Laurel|Eric|Ariana](3) [Emily](3)You can use a family-tree, such as this one, to teach a child the meaning of DEPTH of a graph element. The tree above have numbers in parentheses, showing DEPTH of the associated element. Thus, Grandmother and Grandfather are at DEPTH 1, in this graph; sons Tim and Chris and wives, at DEPTH 2; grandchildren, at DEPTH 3.
Another TRADITIONAL use of a TREE is OUTLINING A TOPIC FOR WRITING AN ARTICLE -- BRANCHING FROM THE TOPIC INTO SUBTOPICS AND SUBSUBTOPICS, ETC.A HIERARCHICAL STRUCTURE FOR THE MILITARY OR A BUSINESS ORGANIZATION IS A TREE IF THERE IS NO UNIQUE BOTTOM ELEMENT -- otherwise, IT FORMS A CLOSED GRAPH KNOWN AS A LATTICE, AS IN "PECKING ORDER".
A famous modern but very simple use of the TREE is in the STACK, so-called because of the system in cafeterias of stacking clean dishes for patrons. The dishes compress a spring, so that one dish is on top to be chosen; when chosen, the next of the stack takes its top place. This structure is also known as a LIFO PIPE, where "lifo" is an acronym "for last in, first out", since (in the plate example) the last plate stacked is the first out of the stack. The "pipe" refers to its use as an ORGAN PIPE, closed at one end, open at the other. (Kids get the same effect by blowing on the lip of an open bottle.) The TINKERTOY TUBE which the TINKERTOYS are packed in serves as a LIFO PIPE, with disk-type objects to fill up enough the tube to build up a STACK.
| _____ | | _____ | | _____ | | _____ | |_______|Another famous modern simple use of the TREE is in the QUEUE, as in queuing up at a bus-stop, or in a theater line, etc. This is also known as a FIFO PIPE, where "fifo" is an acronym for "first in, first out". Putting one more in a PIPE may force the first entrant out the other end of the PIPE. The tube for "Bounty" or some other "wiper-upper" can serve as a FIFO PIPE.
__________________ * * * * * * * * __________________
Both STACKS and QUEUES are studied in COMPUTER SCIENCE for their application in PROGRAMING.