# Data Structures and Algorithms for Engineers Lecture Schedule

From David Vernon's Wiki

|CARNEGIE MELLON UNIVERSITY AFRICA|

Date | Lecture | Topic | Material covered | Reading | Assignments |
---|---|---|---|---|---|

Wed. 18 Jan. | 1 | Introduction & The Software Development Life Cycle | Motivation. Goals of the course. Syllabus and lecture schedule. Course operation. Preview of course material. Overview of labs, assignments, and exercises. Software development tools for assignments. Levels of abstraction in information processing systems. The software development life cycle: Yourdon Structured Analysis - functional, data, and behavioural models (hierarchical decomposition trees, architecture diagrams, data flow diagrams DFD, data dictionaries, entity relationship ER diagrams, state transition diagrams). Software process models: waterfall, evolutionary, formal transformation, re-use, hybrid, spiral. | Lecture 1 Slides. Harel 2004, Chapter 13. Williams 2007. Optional: Software Development Life Cycle, Software Standards | |

Mon. 23 Jan. | 2 | Formalisms for Representing Algorithms | Definition of an algorithm. Modelling software. Relational modelling. State modelling. Practical representations. Pseudo code. Flow charts. Finite state machines. UML. Predicate logic. Analysis. | Lecture 2 Slides. Harel 2004, Chapters 1 and 2. | Assignment 1 |

Wed. 25 Jan. | 3 | Analysis of Complexity I | Performance of algorithms, time and space tradeoff, worst case and average case performance. Big O notation. Recurrence relationships. Analysis of complexity of iterative and recursive algorithms. Recursive vs. iterative algorithms: runtime memory implications. | Lecture 3 Slides. Aho et al. 1983, Chapter 1. | |

Mon. 30 Jan. | 4 | Analysis of Complexity II | Complexity theory: tractable vs intractable algorithmic complexity. Example intractable problems: travelling salesman problem, Hamiltonian circuit, 3-colour problem, SAT, cliques. Determinism and non-determinism. P, NP, and NP-Complete classes of algorithm. | Lecture 4 Slides. Aho et al. 1983, Chapter 1. | Assignment 2 |

Mon. 6 Feb. | 5 | Searching and Sorting Algorithms I | Linear and binary search (iterative and recursive). In-place sorts: bubblesort (efficient and inefficient), selection sort, insertion sort. | Lecture 5 Slides. Aho et al. 1983, Chapter 8. | |

Wed. 8 Feb. | 6 | Searching and Sorting Algorithms I | Not-in-place sorts: Quicksort, merge sort. Complexity analysis. Characteristics of a good sort. Speed, consistency, keys, memory usage, length & code complexity, stability. Other sorts ordered by complexity. | Lecture 6 Slides. Aho et al. 1983, Chapter 8. | |

Mon. 13 Feb. | 7 | Abstract Data Types (ADT) | Abstract Data Types (ADT). Information hiding. Types and typing. Design Goals. Design practices. | Lecture 7 Slides. | |

Wed. 15 Feb. | 8 | Containers, Dictionaries, and Lists I | Container and dictionaries: mechanisms for accessing data in a list. List ADT. Implementation with arrays. | Lecture 8 Slides. | Assignment 3 |

Mon. 20 Feb. | 9 | Containers, Dictionaries, and Lists II | List ADT. Implementation with linked lists. Doubly linked lists and circular lists. Performance considerations. | Lecture 9 Slides. | |

Wed. 22 Feb. | 10 | Stacks | Stack (LIFO) ADT. Implementation using List ADT (array and linked-list). Comparison of order of complexity. Stack applications, including token matching, evaluation of postfix expressions, and conversion of infix expressions to postfix. | Lecture 10 Slides. | |

Mon. 27 Feb. | 11 | Queues | Queue (FIFO ADT). Implementation using List ADT (array and linked-list). Comparison of order of complexity. Dedicated ADT. Circular queues. Queue applications. | Lecture 11 Slides. On the Simulation of Random Events. | |

Wed. 1 Mar. | 12 | Trees I | Concepts and terminology: level, height, external and internal nodes, skinny, fat, complete, left-complete, perfect, multi-way, d-ary. Types of tree: binary, binary search, B-tree, 2-3 tree, AVL, Red-Black | Lecture 12 Slides. | |

Mon. 6 Mar. | 13 | Trees II | Binary trees and binary search trees. Tree traversals: inorder, preorder, postorder. | Lecture 13 Slides. | Lab Exercise 1 |

Wed. 8 Mar. | 14 | Trees III | Height-balanced trees: AVL Trees, RR, RL, LR, LL rotations. | Lecture 14 Slides. | Assignment 4 |

Mon. 13 Mar. | 15 | Trees IV | Height-balanced trees: Red-Black Trees, single promotion, zig-zag promotion, recolouring and restructuring. | Lecture 15 Slides. | Lab Exercise 2 |

Wed. 15 Mar. | 16 | Trees V | Tree applications. Fixed-length codes & variable length codes. Optimal code trees. Huffman's algorithm. | Lecture 16 Slides. | |

Mon. 20 Mar. | 17 | Heaps | Priority queues. Heap basics. Types of heap: min heaps and max heap. Heap characteristics. Implementation of heap. Heap operations: delete max/min, down heap, up heap, merge, construct, heapify. Complexity of operations. Heap sort. | Lecture 17 Slides. | Lab Exercise 3 Lab Exercise 3 Alternative |

Wed. 22 Mar. | 18 | Graphs I | Types of graphs: directed, undirected, weighted, unweighted, cyclic, acyclic, directed acyclic, simple, non-simple, implicit, explicit, embedded, topological. Adjacency matrix representation. Adjacency list representation. | Lecture 18 Slides | Assignment 5 |

Mon. 27 Mar. | 19 | Graphs II | Graph traversal: breadth-first search and depth-first search; implementation and application. Topological sort. | Lecture 19 Slides | Lab Exercise 4 |

Wed. 29 Mar. | 20 | Graphs III | Spanning trees and minimum spanning trees, Kruskal's algorithm, Prim's algorithm. | Lecture 20 Slides | |

Mon. 3 Apr. | 21 | Graphs IV | Dijkstra's shortest path algorithm. Floyd-Warshall's all-pairs algorithm. | Lecture 21 Slides | Lab Exercise 5 |

Wed. 5 Apr. | 22 | Complex Networks I | Euler's theorem: the Bridges of Königsberg. Networks vs. graphs. Degree, average degree, and degree distribution. Bipartite networks. Path length, BFS, Connectivity, Components. Clustering coefficient. Random graph model. Small world phenomena. Scale free networks. | Lecture 22 Slides | Assignment 6 |

Wed. 19 Apr. | 23 | Complex Networks II | Communities. Fundamental Hypothesis. Connectedness and Density Hypothesis. Strong and weak communities. Graph partitioning. Community detection. Hierarchical clustering. Girvan-Newman Algorithm. Modularity. Random Hypothesis. Maximum Modularity Hypothesis. Greedy algorithm for community detection by maximizing modularity. Overlapping communities. Clique percolation algorithm and CFinder. | Lecture 23 Slides | |

Mon. 24 Apr. | 24 | Algorithmic Strategies | Classes of algorithms. Brute force. Divide and conquer. Greedy algorithms. Dynamic programming. Combinatorial search. Backtracking. Pruning. Branch and bound. | Lecture 24 Slides | Lab Exercise 6 |

Wed. 26 Apr. | 25 | Hashing | Dictionaries. Hashing. Hash functions. Collision resolution. Complexity. Applications. | Lecture 25 Slides | Assignment 7 |

Wed. 3 May | 26 | Analysis of Correctness | Types of software defects. Code module design. Syntactic, semantic, logical defects. (Semi-)formal verification: partial vs. total correctness. Invariant assertion method. Simple proof strategies: by contradiction, counterexample, induction. Dynamic testing: unit tests, test harness, stubs, drivers, integration testing, regression testing. Static tests: reviews, walkthroughs, inspections, reviewing algorithms and software. Pair programming. Verification and validation strategies. | Lecture 26 Slides |