O GoConqr está de visual novo! Conte para nós o que você achou.

Flashcards

Week 6: Brute Force & Computational Complexity

Melina Mackey Computer Science Inglês 12 flashcards

Week 6: Brute Force & Computational Complexity

Flashcards do conjunto (12)

  1. 1Brute force approach1. Generate all the solutions candidates
    2. Filter for feasible solutions
    3. Return the optimal remaining solution
  2. 2Lexicographic orderAllows systematic enumeration of each solutionLexicographic order
  3. 3Bitlists- Candidate solutions are a combination of values from a set (i.e. a subset)
    - In general, the number of different subsets we can form from n items is 2n
    - Each item has 2 possibilities: either selected (1) or not (0)
    - E.g. Knapsack problem
  4. 4Bitlists: lexicographic successorIterate over the list from right to left:
    1. If a 1 is encountered, change it to 0 and continue
    2. If a 0 is encountered, change it to 1 and return the list
  5. 5Bitlists algorithmBitlists algorithm
  6. 6Permutations- Candidate solutions are an arrangement of items
    - No need to filter for feasible solutions
    - E.g. Travelling salesman problem (TSP)
    Permutations
  7. 7Permutations algorithmPermutations algorithm
  8. 8Permutations: lexicographic successorPermutations: lexicographic successor
  9. 9Computational (time) complexity of an algorithmRunning time of a program depends on:
    1. Machine used to execute the program
    2. Input (larger inputs take longer)
    3. Computational complexity of the algorithm => number of elementary steps T(n) needed to compute output for an input of size n
  10. 10Asymptotic analysis (Big-O notation)Constant terms and coefficients of are negligible compared to order of growthAsymptotic analysis (Big-O notation)
  11. 11Selection sort complexity- Quadratic worst-case complexity
    - Asymptotically no difference between best and worst-case
    - Overall complexity is determined by step of highest complexity
    Selection sort complexity
  12. 12Insertion sort complexity- Quadratic worst-case complexity
    - Linear best-case complexity (adaptive)
    Insertion sort complexity

Informações

Descrição
Computer Science (FIT1045: Algorithms & Programming Fundamentals in Python) FlashCards sobre Week 6: Brute Force & Computational Complexity, criado por Melina Mackey em 16-09-2019.
Criado por
Melina Mackey · set 2019
Atualizado
21 set 2019
Visualizações
0
Histórico
  • Criado por Melina Mackey · 2 set 2019
  • Copiado por Melina Mackey · 2 set 2019
  • Copiado por Melina Mackey · 2 set 2019
  • Copiado por Melina Mackey · 2 set 2019
  • Copiado por Melina Mackey · 16 set 2019
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?