Over 10 Million Study Resources Now at Your Fingertips

Download as :
Rating : ⭐⭐⭐⭐⭐
Price : $10.99
Pages: 2

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


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.

How It Works
Login account
Login Your Account
Add to cart
Add to Cart
Make payment
Document download
Download File
PageId: ELI9D64E27
Uploaded by :
Page 1 Preview
requires define probability distribution the set i
Sell Your Old Documents & Earn Wallet Balance