FUNDAMENTALS: DATA STRUCTURES & ALGORITHMS (GLOSSARY OF TERMS) DATA: values (quantification) to record properties, attributes and states of the real world, using some representation which reflects systematic quantification. INFORMATION: facts, properties, relationships etc. used as the basis for reasoning, interpretation and/or calculation of multiple Data. KNOWLEDGE: principles, rules, understanding, intelligence used to make deductions and identify relationships between multiple data and/o ADTs. DATA TYPE: a set of data values (instances) and a set of operations permitted on the values. All data values in the set therefore has the same properties STRUCTURED DATA TYPE: each instance has several components. The components are related by some rules/framework e.g. sets, sequences, trees, graphical or combination of these definitions ABSTRACTION: facility to choose only those features required (levels of abstraction) to fulfil the stated objectives (controls/reduces complexity of the description). COMPONENT (ELEMENT): one of several instances (of any Data Type or ADT) that makes up the set constituting an instance of the ADT in which they are members. Where there are several components of the same ADT, then they are organised in a structure such as a SET or LIST. ABSTRACT DATA TYPE: permits the definition of the components i.e. the other ADTs used and the operations required by the ADT; it separates what (specification) from the how (implementation). OBJECT: can be used to refer to an instance of any ADT or any CLASS. Any OBJECT implementation has the following attributes – NAME TYPE NAME REFERENCE VALUE(S) (Identifier) (ADT or CLASS name) (address in memory) (from the domain set) REFERENCE VALUE: of object names in Java are object references only, with storage for the object data values being created when required through the new operator SET: A collection of instances of ADTs or ADTs themselves that have no relationship with each other except that they are members of the set. A set therefore has no structure. A set data type in invariably used initially as the data type for the several components of the same type when the internal structure of the ADT has yet to be decided SEQUENCE: (A sequence of length 0 is empty. A sequence of length N 1 of elements from a set T is the ordered pair (Sn-1, t) where Sn-1 is a sequence of length n-1 of elements from T and t is an element of T. LIST: is a sequence with properties of first/last and predecessor/successor and each element has a on-to-one relationship with elements of an ordinal data type reflecting positional information; implemented using static/dynamic arrays(consecutively stored components) or linked lists using object references. INDEX LIST: a LIST ordered by position, by keyvalue, by time etc. but with the following important differences Elements (components) must all be of the same ADT. Each ADT element (component) can contain a component for positional information - index value i.e. of type int or an object reference. This relates it to an instance of some other ADT located elsewhere (usually stored as a List ADT). 45 STACK: An ADT to which you can add (PUSH) any ADT instance but the last instance added is recovered with a retrieve (POP) operation; LAST IN FIRST OUT. QUEUE: An ADT to which you can add (ENQUEUE) any ADT instance but the instance that is retrieved by a get operation (SERVE) is that element that had been there the longest: FIRST IN FIRST OUT HASH LIST: Where the elements are mapped onto the address space of a list by generating an address (index) derived from applying a Hash Function to the element(s) identifying key. It simulates the properties of a SET ADT. Methods needed to handle the COLLISIONS – where the Hash Function generates the same index from two different component identifying keys. GRAPH: an ordered pair G = <V,E> where V is a finite non-empty set of vertices or nodes and E is a set of edges (each being an unordered pair of vertices). Other properties include – Digraph, Path, Cycle – starting and finishing node in a path is the same node. TREE: finite connected graph BINARY TREE: a finite set of nodes that is either empty or consists of a root and two binary subtrees which are disjoint and are called the left band right subtrees. Traversals of the tree include – depth first, breadth first, pre-order, in-order (symmetric) and post-order. BINARY SEARCH TREE: as for a binary tree except that for any node ni having a key ki all the nodes in the left subtree to the node ni have a key value “less than” ki and all nodes in the right subtree have a key value “greater than” ki AVL TREE: A height balanced tree where the height difference between the left and right subtrees to any node does not differ by more than 1. HIGHER ORDER TREES: where there can be more than two subtrees to any one or more nodes in the tree. Various representations including conversion to/from a Binary Tree and generating Sequential Enumerated Lists MULTI-WAY TREES (B-TREES): a method of organising large trees by grouping nodes (subtrees) into blocks of consecutively stored keys and links to lower level blocks. The Order of the B-tree determines the minimum number of consecutive keys that a block must contain; and no more than twice the Order. This optimised the search efficiency and storage utilisation. Insertion/Deletion are complex operations. DIGRAPH: As for a graph except that the edges are ordered pairs of vertices (reflecting the directionality of the edge). Matrices are a convenient way to represent the properties of graphs/digraphs. Properties include – Adjacency, Precedence, Succedence and Paths. Deriving the path matrix from the Adjacency matrix is an important process. Traversals include – Depth-First, Breadth-First and Shortest Path generating algorithms. Adjacency and Generaised Lists are other ways of representing Graphs/Digraphs. 46