Chapter 7 Flashcards
Does f(n)En(square)
Yes
What is definition of O notation and omega notation
The definition of Omega notation relies on proving both a lower and upper asymptotic bound
What is O notation
The O-notation is used to state only the asymptotic upper bounds
What is omega notation
The omega notation allows us to state only the asymptotic lower bound
What are Asymptotic Notations
Asymptotic Notations are languages that allow us to analyze an algorithm’s running time by identifying its behavior as the input size for the algorithm increases.
How to make an algorithm
First make mathematical definition of a problem, then make a strategy, and then find an algorithm. Then write algorithm in suedo language and then write analysis on it.
What is divide and conquer strategy
The divide and conquer is a strategy to solve a large number of computational problems. It has 3 parts.
Divide: Divide the problem into small number of pieces
Conquer: Solve each piece by applying divide and conquer to it recursively
Combine: The pieces together into a global solution
How merge sort algorithm works
Divide: Split the array down the middle into 2 sub sequences, each of size roughly n/2
Conquer: Sort each sub sequences by calling merge sort recursively on it.
Combine: Combine the 2 sorted sub sequences into a single sorted list.