Language:EN
Pages: 2
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Page 1 Preview
requires define probability distribution the set i

Requires define probability distribution the set inputs

these inputs may be important).

• We will have difficulty comparing the experimental running times of two algorithms unless the experiments were performed in the same hardware and

pose serious hurdles too, of course. Thus, we would ideally like to have an analysis

tool that allows us to avoid performing experiments.

This methodology aims at associating, with each algorithm, a function f(n) that

characterizes the running time of the algorithm as a function of the input size n.

we wish to analyze a particular algorithm without performing experiments on its

running time, we can perform an analysis directly on the high-level pseudo-code

169

Counting Primitive Operations

Specifically, a primitive operation corresponds to a low-level instruction with an execution time that is constant. Instead of trying to determine the specific execu­tion time of each primitive operation, we will simply count how many primitive operations are executed, and use this number t as a measure of the running time of the algorithm.

5 ms - - - - - - - - - -

worst-case time

p '§ � 2 ms <!) E bi) 3 ms Q 4 ms

- -
1 ms
A B c D E F

Figure 4.4: The difference between best-case and worst-case time. Each bar repre­seuts the running time of some algorithm on a different possible input.

You are viewing 1/3rd of the document.Purchase the document to get full access instantly

Immediately available after payment
Both online and downloadable
No strings attached
How It Works
Login account
Login Your Account
Place in cart
Add to Cart
send in the money
Make payment
Document download
Download File
img

Uploaded by : Sara Ward

PageId: ELI9D64E27