Asymptotic Algorithm Analysis: Terms and Notations, Quizzes of Computer Science

Definitions for key terms and notations used in the analysis of asymptotic algorithms. Topics include big o, big omega, big theta, growth rates, and simplifications. Understanding these concepts is essential for analyzing the resource consumption of algorithms, particularly when dealing with large inputs.

Typology: Quizzes

2013/2014

Uploaded on 01/09/2014

ckingry5
ckingry5 🇺🇸

21 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
TERM 1
Asymptotic Algorithm Analysis
DEFINITION 1
An attempt to estimate the resource consumption of an
algorithm, you ignore constant factors, this is only
reasonable hen working with large numbers of n. With n < 10
this is generally not a reasonable method of analysis.
TERM 2
instance
DEFINITION 2
specific selection of values for the parameters of the problem
TERM 3
algorithm
DEFINITION 3
method or process followed to solve a problem1. must be
correct2. composed of a series of concrete steps, meaning it
is completely understood3.no ambiguity with step order or
selection4. Finite number of steps5. it must terminate
TERM 4
Program
DEFINITION 4
Instantiation of a algorithm in a programming language
TERM 5
Run Time
DEFINITION 5
affected by speed of computer's CPU, bus, and peripheral
hardware, and competition for resources from other users or
the network.
pf3
pf4

Partial preview of the text

Download Asymptotic Algorithm Analysis: Terms and Notations and more Quizzes Computer Science in PDF only on Docsity!

Asymptotic Algorithm Analysis

An attempt to estimate the resource consumption of an algorithm, you ignore constant factors, this is only reasonable hen working with large numbers of n. With n < 10 this is generally not a reasonable method of analysis. TERM 2

instance

DEFINITION 2 specific selection of values for the parameters of the problem TERM 3

algorithm

DEFINITION 3 method or process followed to solve a problem1. must be correct2. composed of a series of concrete steps, meaning it is completely understood3.no ambiguity with step order or selection4. Finite number of steps5. it must terminate TERM 4

Program

DEFINITION 4 Instantiation of a algorithm in a programming language TERM 5

Run Time

DEFINITION 5 affected by speed of computer's CPU, bus, and peripheral hardware, and competition for resources from other users or the network.

T(n)

the approximated runtime for an algorithm TERM 7

Constant Running time

DEFINITION 7 n, the size of the input, has no effect on the running time so it would simply cost a constant value c. An assignment statement is a good example. TERM 8

Growth Rate

DEFINITION 8 the rate of which the cost of an algorithm grows as the size of the inputs grows. As a basic rule for n > 5 growth rates from worst to best:n! exponential growth rate2^n exponential growth raten^2 quadratic growth ratenlogna*n, where a < 30? Linear growth rate TERM 9

Rates, best order

DEFINITION 9 loglognlognnnlognn^2n^32^n TERM 10

Cases of Interest

DEFINITION 10 Best CaseAverage CaseWorst caseWe usually focus on worst case, but otherwise average-case. We almost never focus on best case scenarios.

Run time for if..then..else

Worst Case: greatest cost of the clausesAverage Case: same as worst, greatest cost of clausesthis is if the probability of the clauses being run are the same. Otherwise use the amortized analysis. TERM 17

Run Time for Switch

DEFINITION 17 Worst Case: Cost of most expensive branch TERM 18

Run time for recursive

DEFINITION 18 Calculate how many times the function will be called then add 1?