WGU C960 - Discrete Math II (2) - Module 2: Analyzing Algorithms 100% Correct
WGU C960 - Discrete Math II (2) - Module 2: Analyzing Algorithms 100% Correct Algorithm complexity the study of the efficacy of algorithms that gives us a framework to compare algorithms Time complexity The time the algo requires to run Space complexity The amount of memory used to run the algo Time complexity depends on... - speed of the processing unit - number of calculations that need to be performed - number of conditions that need to be eval'd - number of iterations to be completed by loops Space complexity depends on... values of all variables, including input vars and all other vals to be computed and stored in system memory/RAM/drive Input size is denoted as n Fibonacci example One way to calculate the Fibonacci sequence is by performing n-2 number of additions. As this scales to finding a very large nth number in the sequence, the complexity grows linearly. Another way to calculate the sequence is using a mathematical equation where there are a fixed number of operations to be performed regardless of the nth number in the sequence, giving a complexity that does not grow with n. Atomic operations The simplest form of operations (addition, multiplications, var assignment, etc) that cannot be reduced further Worst-case performance used to estimate how much time might be needed in the worst case to guarantee that the algo will always finish on time
Written for
- Institution
- WGU C960 - Discrete Math II
- Course
- WGU C960 - Discrete Math II
Document information
- Uploaded on
- September 17, 2023
- Number of pages
- 2
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
-
wgu c960 discrete math ii 2 module 2 analyz
Also available in package deal