1 / 13

Intro to Computer Algorithms Lecture 2

This lecture covers the fundamentals of algorithm efficiency, including a review of data structures, graphs, trees, elementary sets and dictionaries, and foundations of algorithmic analysis.

Download Presentation

Intro to Computer Algorithms Lecture 2

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Intro to Computer Algorithms Lecture 2 Phillip G. Bradford Computer Science University of Alabama

  2. Announcements • ACM initial meeting of the year. • Thursday, August 28th, 5:00pm • in East Eng. 119 • Industrial Colloquium Series • Tuesday, September 2nd, 5:00pm in EE 119 • Herschel Chandler presents: • “Being an Independent Computer Consultant”

  3. Lecture Outline • Questions? • Add this HW to Thursday: • Page 23, #1 • Page 24, #4 & #5 • Data Structures Review • Fundamentals of Algorithm Efficiency • Chapter 2.

  4. Brief Review of Data Structures • Lists • Linked Lists • Doubly-Linked Lists

  5. Brief Review of Data Structures: Graphs • Graphs: G = (V,E) • Directed Graphs: digraphs • Loop issues • Edge Bound: |V|(|V| -1)/2 > |E| > 0 • Sparse • Dense • Adjacency Matrix • Adjacency List

  6. Review of Graph Basics • Complete graphs • Kn • How many edges? • Examples at the board

  7. Review of Graph Basics • Paths & Cycles • Acyclic graphs • Path lengths • Simple paths • Connected components • Subgraphs

  8. Review of Tree Basics • Forests • Free Tree: acyclic graph with a unique path between every pair of distinct nodes • Rooted Trees: choose a root • Parents, siblings, ancestors, etc. • Leaves • Examples at the board

  9. Elementary Sets and Dictionaries • What is a set? • How might we represent a set? • One way: bit vectors • The basis is the universal set • Dictionary • Inserting words • Deleting words • Looking up words

  10. Foundations of Algorithmic Analysis • Time and Space • Other resources? • Time-Space trade-offs • Time-Complexity • Space-Complexity • Fundamental Operations • Can space complexity be larger than time complexity? • If so, when?

  11. Foundations of Algorithmic Analysis • Input size measures • Number and structure of inputs • Size of inputs • Bit representation • Table 2.1 Page 46.

  12. Worst Case, Average Case, etc. • Sequential Search • Best case • Worst case • Average Case • Prob[A[i] = K] = p

  13. Asymptotic Notation • Big-O • Big-Omega • Big-Theta

More Related