Professional Documents
Culture Documents
Dat Astruc T
Dat Astruc T
In organizing data objects, a powerful tool called tree data structure may be used.
This tool is based on keys. When the data stored within the tree is keyed or has
internal structure that allows one element to be related to, or ``saved within''
another, it proves to be a great replacement to arrays.
Social networking often uses trees, while PDF is a tree based format. Computer
chess games build a huge tree to reach an optimal move or strategy plan. Producers
and consumers often use a balanced tree implementation to store a document in
memory.
In my own opinion, the application of tree data structures is very user-friendly. The
common uses of tree are: it can manipulate hierarchical data and sorted lists of
data, make information easy to search, can be used as a workflow for compositing
digital images for visual effects and lastly, it can be used as to router algorithms.
As mentioned above, tree data structures are preferred when one needs to
organize multiple data objects in terms of hierarchal relationships; examples would
be family tree, tree of species relating to botany or zoology, etc. Moreover, trees
can hold objects, sorted by their keys. Arranging the nodes in an orderly manner is
important. So that, all keys in a node's right sub tree are greater than the key of the
object at the node, and all keys in a node's left sub tree are less than the key of the
object at the node. We call such a tree an ordered tree or a search tree. Also, trees
can hold sequenced objects that are located by keys. The data keys are sequences,
and the sequences label the branches of a tree that holds the data. Moreover, a tree
can represent a structured object that is similarly organized like the sequenced
objects.
int x;
x = 3 + y;
STATEMENT SEQUENCE
/ \
DECLARATION ASSIGNMENT
/ \ / \
TYPE VARIABLE VARIABLE EXPRESSION
| | | / | \
int x x NUMERAL + VARIABLE
| |
3 y
A simplified tree data structure is a binary tree. Each node of the binary tree has at
most two branches. One node is allowed but more than two nodes are considered
void. The importance of a binary tree is that it can create a data structure that
mimics a Boolean-like, "yes/no" decision making process. For example, if you
construct a binary tree to store numeric values such that each left sub-tree contains
larger values and each right sub-tree contains smaller values then it is easy to
search the tree for any particular value.
In my opinion, the best research tree is a binary search tree. The particular value
being sought out is achieved faster because of the minimal nodes per branch.
Pictures of a binary tree are showed below.
A graph drawing should not be confused with the graph itself (the abstract, non-
visual structure) because there is no universal way in constructing a graph. The
main concern in making graphs is the connection and logical flow between vertices
and edges and not the design or layout of the graph. Graphs are represented
visually by drawing a dot or circle for every vertex, and drawing an arc between two
vertices if they are connected by an edge. If the graph is directed, the direction is
indicated by drawing an arrow.
The data structure used to store graphs in a computer system depends on both the
graph structure and the algorithm of the graph. Theoretically, one can choose
between list and matrix structures but in concrete applications the best structure is
a combination of both. List structures are often preferred for sparse graphs, as
mentioned above sparse is the phrase structure of sentences, due to smaller
memory requirements. This includes the incidence list, an array of pairs of vertices,
and the adjacency list, which separately lists the each vertex. Matrix structures on
the other hand provide faster process for certain applications but consume large
memory space. It includes the incidence matrix, a matrix of 0's and 1's; its rows
representing the vertices and its columns representing the edges, and
the adjacency matrix, where both rows and columns are indexed by vertices.
Even though almost three centuries have passed after the first paper in the history
of graph theory written by Leonhard Euler on the Seven Bridges of Knigsberg was
published, problems arose in graph theory; concerning the enumeration, sub
graphs, graph coloring problems like ErdsFaberLovsz conjecture and total
coloring conjecture which are still unsolved up to present, route problems, network
flow etc.
References
Bondy, J., & Murty, U. (2008). Graph Theory. ISBN 978-1-84628-969-9.
(internet):
http://www.i-programmer.info/
http://people.cis.ksu.edu/
http://stackoverflow.com/