Back to marketplace

Computational Complexity

No description yet. This curated deck is ready for daily study.

Total cards: 24•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (24)

#1
Front (Question)

Understand efficiency of programs

Back (Answer)

Separate time and space efficiency of a program

#2
Front (Question)

Challenges

Back (Answer)

• a program can be implemented in many different ways • solve a problem using only a handful of different algorithms • separate choices of implementation from abstract algorithms

#3
Front (Question)

Evaluate efficiency

Back (Answer)

• use a timer • count operations • abstract notion of order of growth

#4
Front (Question)

Timing a program

Back (Answer)

• start clock • call function • stop clock

#5
Front (Question)

Timing programs is inconsistent

Back (Answer)

GOAL to evaluate diff. algorithms

#6
Front (Question)

Running time -(time varies for different inputs, but cannot really express a relationship between inputs and time!)

Back (Answer)

+ varies between algorithms • varies between implementations • varies between computers • not predictable based on small inputs

#7
Front (Question)

Which operations to count

Back (Answer)

Assumes steps take constant time • mathematical operation • comparisons • assignments • accessing objects in memory

#8
Front (Question)

Counting operations, better but…

Back (Answer)

GOAL to evaluate different algorithms

#9
Front (Question)

Counting operations +(count varies for diff. inputs and can come up with a relationship between inputs and the count)

Back (Answer)

+ depends on algorithm - depends on implementation - independent of computers + no real def. of which operations to count

#10
Front (Question)

Needs a better way what we HAVE

Back (Answer)

• timing and counting evaluate implementations * timing evaluates machines

#11
Front (Question)

what we WANT

Back (Answer)

• evaluate algorithm • evaluate scalability • evaluate in terms of input size

#12
Front (Question)

Need to which input to use

Back (Answer)

• efficiency in terms of input • could be an integer • could be length of list • you decide

#13
Front (Question)

Different inputs

Back (Answer)

• first element in a list -> BEST CASE • not in list -> WORST CASE • look through half -> AVG CASE

#14
Front (Question)

Best case

Back (Answer)

min. running time - constant - first element of any list

#15
Front (Question)

Average case

Back (Answer)

avg. running time - practical measure

#16
Front (Question)

Worst case

Back (Answer)

max. running time - linear in length of list - must search entire list

#17
Front (Question)

Orders of Growth - goal

Back (Answer)

• input is very big • growth of program’s run time • upper bound • do not need to be precise “order of” not “exact” • largest factor

#18
Front (Question)

Input is very big

Back (Answer)

Want to evaluate programs efficiency when input is very big

#19
Front (Question)

Growth of program’s run time

Back (Answer)

Want to express program’s run time as input grows

#20
Front (Question)

Upper bound

Back (Answer)

Want to put an upper bound on growth

#21
Front (Question)

“order of” not “exact”

Back (Answer)

Do not need to be precise “order of” not “exact” growth

#22
Front (Question)

Largest factor

Back (Answer)

We will look at largest factor in run time

#23
Front (Question)

Types of orders of growth

Back (Answer)

- constant \+ linear - quadratic - logarithmic \+ n log n - exponential

#24
Front (Question)

Measuring Order of Growth

Back (Answer)

Big Oh Notation