# Trees: Symbol And Recursion

![](media/cover_temp.gif)

## Introduction
"Trees: Symbol And Recursion" is a series of computer programs that 
playfully inquires the convergence of the mathematics, linguistics and symbolic structure implied in trees, a type of structure used to store, search and present information. The project is part of the larger project "structures: string, tree and graph".

## 
with structure, symbols can be manipulated in a procedural and hierarchical manner. the tree is such a structure. mindful that, in this case, trees on a conceptual layer. the metaphorical association with trees as in nature is arbitrary and is not intended to be tangible. 

not surprising that the tree structure is widely applied to symbolic representation of information, in diverse arenas: to name a few: dna / text; mathematical operations; natural language processing/computational linguistics; conversation tree; decision tree; a binary tree structure to implement a feature to store customized word combinations.  
how is hierarchiy meaningful, in this case? 

recursion is a procedure that is applied to traverse the tree. 

with trees, not all is fixed. although thinking about it in the metaphorical sense is arbitrary, artistically, philosophically, and historically, it is fruitful to think on those terms. trees in nature is generative, self-modifying, and permutative.  



| na   | Tree in nature  | Tree as structure |  
| :------------ | :---------------:| :---------------:|
| generation    | growth | smart conversation program corpus acquisition | 
| modification  | trimming trees  | placeholder |
| permutation   | hybrid breeds   | conceptual blending |



the program is also an aesthetical intervention. 
recursion creates the empty spaces. typographical qualities 

illustrate the following this example through the 

critical code studies 
program reads from a corpus of large file, displays structure continuously. 

Textual outputs are stored as txt files, and image outputs are stored as image files. The program process is stored in Jupyter Notebooks.
There are two recursive procedures applied in the program, one to build the tree, and the other to print the tree. Between line 45 and 67, the insertLeaf function recursively traverse the tree, looking for a suitable place to insert the word of the fruit as predefined by a hierarchical rule. The hierarchical rule used in the program simply compares the order of the word's first letter. Words starting with "bigger" letters will be placed on the right side, and vice versa. Between line 15 and 35, the print2DUtil_flat function visually renders the tree's levelled hierarchies. The function starts in the tree's furthest right. For words placed in "lower" levels, more empty spaces are printed, and vice versa.  

"A Letter Tree With Hanging Fruits" is a symbolic tree that grows 26 different fruits, with each name starting with a letter from the English alphabet. The computer program uses the tree structure, an abstract data structure used to store, retrieve and represent hierarchical information. The information, in this case, a list containing the words of the fruits, is processed hierarchically by recursion, an algorithmic procedure that constantly calls upon itself until an exit condition is met.  

to how the program's outputs are being rendered interactively in the console, they are witnessing a tangible interplay of the subjects.
 
### Presentation
PyCon 

### Further reading on relevant projects 
[I Like Mathematics And Tight Pants](https://i.liketightpants.net/and/archives)

[Learning To Love Math](https://sfpc.study/sessions/summer-22/learning-to-love-math)

[Seedlings](https://chenqianxun.com/projects/seedlings/)

[Metamagical Themas](https://archive.org/details/metamagicalthema0000hofs/page/9/mode/2up)

[Plaintext Partyline](https://vvvvvvaria.org/plaintext-partyline/)

[The Little Schemer](https://archive.org/details/isbn_9780262560993)