CPSC 411 Design and Analysis of Algorithms

CPSC 411 Design and Analysis of Algorithms

Review for Midterm Exam Andreas Klappenecker 1 Topics Covered

Finding Primes in the Digits of Euler's Number Asymptotic Notations: Big Oh, Big Omega, Big Theta Time complexity of Insertion Sort Lower bounds for sorting Divide-and-Conquer Algorithms

Mergesort Strassen's method for Matrix Multiplication Greedy Algorithms, Huffman codes Greedy Algorithms for Matroids Matroid Embeddings Dynamic Programming, Matrix Chain Multiplication Dynamic Programming, Longest Common Subsequence Amortized Analysis Disjoint Sets 2 Asymptotic Notations O(g) = { f:N->R | there exists an

integer n0 and a real constant C such that |f(n)| <= C|g(n)| for all n>= n0 } (g) = { f:N->R | there exists an integer n0 and a real constant c such that |f(n)| => c|g(n)| for all n>= n0 } 3 Asymptotic Notation (n2+n+6) = O(n2)

6n2 = O(n2) 10765432n2+2n+7 = (n2) (n2+n+6) = (n2) (g) = (g) O(g) (n2+n+6) = (n2) 4 Sorting Insertion Sort Best case running time: linear Worst case running time: quadratic Merge Sort O(n log n)

Any comparison based sorting (n log n) 5 Divide-and-Conquer Mergesort Quicksort Strassens matrix multiplication algorithm Recurrence relations Master theorem (no need to memorize)

6 Greedy Algorithms Coin change Huffman codes Matroids Kruskals algorithm Matroid embeddings Prims algorithm 7 Dynamic Programming

Matrix chain multiplication Longest common subsequences Variations: Edit distance 8 Amortized Analysis Aggregate Analysis Accounting Method Stacks Counter Disjoint Sets

9 Exam Some short questions Some workout problems Lectures Slides

Textbook Quizzes Homework 10

Recently Viewed Presentations

  • Lezioni di CA per SGBC - people.unipmn.it

    Lezioni di CA per SGBC - people.unipmn.it

    Esame petrologico su sezione sottile con microscopio Analisi delle fasi cristalline con XRD Analisi chimica elementare con ICP-AES Analisi isotopica (13C/12C, 18O/16O) AGS = Average Grain Size, dimensione media delle particelle MGS = Maximum Grain Size, dimensione massima delle particelle...
  • Word Study Overview

    Word Study Overview

    Stages of Word Study. Qualitative Spelling Assessment. Three Tiers of Orthography. Principles of Word Study Instruction. Common Spelling Practices. Memorizing a weekly list of grade level spelling words. Letting children choose the words they wish to study.
  • Title of Item for Consideration/ Decision Needed

    Title of Item for Consideration/ Decision Needed

    Healthy Child Development and the Early Years Ontario Library Association (OLA) Super Conference February 1 - 4, 2012 Ministry of Children and Youth Services
  • Lärarutbildningsnämnden

    Lärarutbildningsnämnden

    Nämnden beslutade i december att ämneskombinationerna vid GU under HT2011 och VT 2012 ska vara fasta - det har visat sig att flera lärosäten som till hösten ger Ämneslärarprogrammet kommer att ha fasta kombinationer, några har valt att ge ett...
  • Netflik AMOW / Cybercop - EUCPN

    Netflik AMOW / Cybercop - EUCPN

    Netflik AMOW / Cybercop Stop cyberbullying! Luppens Koen Local police AMOW - Belgium Start of the idea Increasing number of complaints local police Survey amongst 1350 Students (12-18yr) 95 % on social media 27 % witness 13 % victim 5...
  • Chapter 13: SIMPLE LINEAR REGRESSION SIMPLE LINEAR REGRESSION

    Chapter 13: SIMPLE LINEAR REGRESSION SIMPLE LINEAR REGRESSION

    The computational formula for r2 is and 0 ≤ r2 ≤ 1 Example 13-3 For the data of Table 13.1 on monthly incomes and food expenditures of seven households, calculate the coefficient of determination.
  • Techniques for Efficient Processing in Runahead Execution Engines

    Techniques for Efficient Processing in Runahead Execution Engines

    L2-miss dependent instructions are identified and treated specially. They are quickly removed from the instruction window. Their results are not trusted. Compute Load 1 Miss Runahead Miss 1 Two types of results produced: INV and VALID INV = Dependent on...
  • OECD Workshop on Measuring Education and Health Volume

    OECD Workshop on Measuring Education and Health Volume

    Even in a market environment, prices for health and education services are often regulated and there are issues of moral hazard due to health insurance Therefore, price and volume measures for market and non-market producers should be developed in parallel...