Sunday, 2 February 2014

Data Structures

Organization of concepts overlaps many branches of science, and thus the invention of organizational schematics for different purposes is convenient and efficient.  Computer scientists like calling them data structures.

There are the most simple ones - stacks and queues.  Only one output is possible when calling for something from either of these, and they are mostly useful when running a program and ordering what needs to be called.  They don't really interest me that much.

What does interest me are trees.  By following a specific guided set of rules, a tree can be produced based on the data that only comes in one order.  The first one I learned of these was the "binary tree" in which values were ordered by lesser and greater (lesser values go left, and equal or greater go right, so on and so forth).  These allowed a word to be broken down into letter components and then quickly alphabetized.  

But then you can apply whatever rules you like.  Equations are actually written in this format, where the operation is a branching point, the left argument goes to the left, and the right argument goes to the right.  Brackets are used to infer the (leftbranch node rightbranch) setup in an infix equation.  As a result, prefix and postfix notation are actually just writing a tree, with no "branches", and in one line.  In linguistics, the same thought applies to syntax; i.e. a sentence can be broken into their parts, verb phrases, noun phrases, etc.  

Trees are a useful ordering system and I'm probably gonna try to learn all their nuances.

No comments:

Post a Comment