back to cs312-syllabus
Basic informal definitions: Algorithms, Computational Problems, Data Structures, Computational Complexity, Problem Instances and Problem Solutions. Example: formulation of the Sorting Problem. InsertionSort.
Mathematical preliminaries: the Gauss formula. Analysis of InsertionSort. Discussion on the order of growth.
Mathematical preliminaries: generalizations of the Gauss formula. The asymptotic notation. Observations and properties. Presentation of a Java implementation of InsertionSort.
Finite geometric series. Asymptotic approximations. MergeSort. The MergeSort equation. The Divide and Conquer technique. Java implementation of MergeSort (the package includes also javadoc documentation).
Comparisons-based sorting. Decision Trees. Lower bound on the number of comparisons.
Approximation of sums with the method of the integral. Examples. Sorting in linear time: CountingSort.
SelectionSort. Exercises. Preparation to the Midterm examination.
Midterm Review. Divide-and-conquer recurrence relations. The master method.
Recurrence relations. Master Theorem. Higher order linear recurrence relations with constant coefficients.
Randomized QuickSort. Average running time. The QuickSort equation. Worst-case analysis.
Heaps. HeapSort. Analysis.
Data Structures: specification and implementation. Notion of formal specification of Abstract Data Types (Adt's). Examples: the Stack Adt. Use of Java interfaces to define the signature of a formal specification of an Adt. Types of implementations. The Stack data structure: Java interface and an array based Java class implementation.
Elementary Data Structures: Stacks, Queues, Deques. Implementation techniques: arrays, circular buffers, linked lists, doubly linked lists. Priority Queues.
Computation of the gcd using the Euclidean Algorithm. Modular Exponentiation using the (recursive) Repeated Squaring Method. Applications: the RSA cryptosystem and the Diffie-Hellman protocol.
Priority Queues. Heap based implementation. Numerical Algorithms. Analysis of the performance of the Euclidean Method. Algorithms to perform arithmetic operations. Application of Newton's method to compute the inverse of a real number with additions, subtractions and multiplications.
A subquadratic algorithm to multiply large integers. Binary Search Trees. The BinarySearchTree data structure and a linked-node based implementation. Basic traversal algorithms: inorder, preorder and postorder.
Insertion and deletion in Binary Search Trees (see package online).