8/26/05-8/31/05 reviewing java.
9/2/05-9/9/05 Event Handeling in Java + Swing classes for building GUI.
9/12/05-9/12/05 Collection Classes and Interfaces.
General discussion about graphs and then directed graphs. Specialized form of Graph called Tree was then defined. A Tree is a Graph that has no cycles. Each nodein the Tree except for the root has one parent. A Tree has a node identified as the root where all other nodes are descendants of that node.
Further specialization of the Tree brought us to the discussion about Binary Tree and extending Binary Trees took us into a discussion about Binary Search Tree (BST). The recursive definition of the BST was introduced:
Red-Black Tree was defines as a BST that...
Insertion starts just like a BST insertion. All new nodes are added as red in a Red-Black tree; obviously, if the node is inserted to the left or the right of a node that is red; we end up with a double-red problem right away. The problem is resolved with a recoloring or restructuring. When we recolor, we may propagate the problem up the tree causing further recoloring or restructing. We do a trinode-restructuring when the sibling of the red parent in a double-red context is black; we recolor when the sibling is red.
Deletion starts just like a BST deletion. If the node that we delete is red; there is no impact on the black-depth of the tree; thus, we are already done. If the node we are deleting is black but has one red child; then the red child takes the place of the deleted node and gets colored black; again, the black depth is not affected. We run into the double-black problem when we delete a black node with a black child. Three cases are identified: 1. Root of the sibling side is black; but, it has a red child. 2. Root if the sibling side is black but has no red child. 3. Root of the sibling is red. Case 1. is solved by restructuring. Case 2. is solved by recoloring. Case 3. is solved through adjustment that turns the problem into case 1. or case 2.
Coding RBtree was discussed and the example RBtree.java was examined.
AVL Tree
An AVL tree is another balanced binary search tree named after the inventors, Adelson-Velskii and Landis. AVLs were the first dynamically balanced trees to be proposed, like red-black trees, they are not perfectly balanced, but pairs of sub-trees differ in height by at most 1, maintaining an O(logn) search time. Addition and deletion operations also take O(log n) time.
Definition of an AVL tree:
4/16/03-4/25/03 Graphs + their algorithms.
11/28/05 External Sorting. Will discuss Balanced Multi-Way Mergetsort.
5/2/03-5/7/03 Databases Architecture (External, Conceptual, Internal) were
discussed, as well as, expressing queries in SQL.