100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.6 TrustPilot
logo-home
Summary

Summary Computer Science 144 A2 summaries

Rating
3.5
(2)
Sold
8
Pages
23
Uploaded on
28-10-2022
Written in
2022/2023

Excellently summarised notes for Computer Science 144 (Stellenbosch University) - all topics needed for the A2 are covered: 4.1, 4.2, 4.4, and 4.5 4.1 Analysis of Algorithms 4.2 Sorting and Searching 4.4 Symbol Tables 4.5 Case Study: Small-World Phenomenon The summaries are neatly digitally summarised, using a combination of the textbook, website-book and slides to help you ace the exam! Note: these summaries are for the Java language.

Show more Read less
Institution
Course










Whoops! We can’t load your doc right now. Try again or contact support.

Connected book

Written for

Institution
Course

Document information

Summarized whole book?
No
Which chapters are summarized?
4.1, 4.2, 4.4, 4.5
Uploaded on
October 28, 2022
Number of pages
23
Written in
2022/2023
Type
Summary

Subjects

Content preview

4.1. performance -
analysis of algorithms


Algorithm:
a method for solving a problem that is suitable for implementation as a computer program

Basic
principle:
Scientific method (3-step approach
pay attention to cost of
observe feature of the natural world To
some running programs.
·




·

hypothesize a model that is consistent with these observations study cost, we apply
scientific methods of

predict events using this hypothesis
·




Study
the predictions by making further observations
verify aswell mathematical
·
as


·
validate by repeating until the hypothesis and observations agree analysis to derive concise


models of cost



Reasons to analyze algorithms
① Predict program behaviour The experiments we design

my program finish? be reproducible and
·
when will must


be falsifiable
will
my program finish? hypotheses
·

must


&
compare algorithms and implementations cable to be
proven false)

my program faster?
·
will this change make

·

how can I make my
program faster?
⑤ the
To develop a basis for understanding problem and for designing new algorithms
·
enables new technology
·
enables new research



Al porithmic successes


sorting
NE
·

Rearrange array of h-items in ascending order

·
used in databases, scheduling, stats, genomics, ...




·
force:N" Steps
Brute
NIOPN
·merpesort: NogN steps > enables new technology
N

, Discrete Fourier Transform

·break down waveform of N samples into periodic components

·
used in Dup, JPC6, MRI, astrophysics, ...




·
Brute force:N" Steps

· fFT algorithm: Nogn steps > enables new technology


Observations


measuring the of the stopwatch data type
exact
running time a
program: use



run a
program on various inputs
first observation: there is "problem size"
qualitative a



the problem size characterizes the difficulty of the computational task


normally, the problem size is either:

·
the size of the input or



the value of command-line
a
argument
·




the time should increase with the problem (but, by how much?)
running size




e.g. Threesum
java counts the number of triples in an
array of
integers that sums to 0




Hypotheses
·
Daniel Knuth showed that it is possible to create an accurate model that can predict program

running-time.
of:
This
requires detailed understanding
·




~ the program
~the system and computer
and advanced tools of mathematical analysis

, Log-log plot
Lop-logplot
Initial
hypothesis:
Running time approximately obeys a
power law TCN) = and standard plot

Data analysis:
Plot running time vs.
Input size N on a log-log scale


consequence
law line.
·
power
yields straight
slope b =




Refined hypothesis slope
-



Running time grows as cube of input size: aNe

/log-logplot is a
straight line with slope 3) TIN = and




Hypothesis:
time is about and with b 19(
Running =




Doubling hypothesis
xI
Quick way to estimate b in a power law hypothesis ↑
E

Run the
program, doubling the size of the input. I




2
x
$11.51
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached


Also available in package deal

Reviews from verified buyers

Showing all 2 reviews
3 year ago

3 year ago

3.5

2 reviews

5
0
4
1
3
1
2
0
1
0
Trustworthy reviews on Stuvia

All reviews are made by real Stuvia users after verified purchases.

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
miaolivier16 C
Follow You need to be logged in order to follow users or courses
Sold
735
Member since
5 year
Number of followers
465
Documents
24
Last sold
1 month ago
Hoërskool opsommings :)

Ek bied aan volledige, hoë- kwaliteit opsommings vir hoërskool studente. Sien ook my instagram profiel @_ op instagram vir ‘n wyer reeks opsommings of om meer inligting te kry.

4.4

120 reviews

5
75
4
30
3
10
2
3
1
2

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions