Design and Analysis of Algorithms 18CS42 Module 1: Introduction to Algorithms
Harivinod N Harivinod N
- Dept. of Computer Science and Engineering
- Dept. of Computer Science and Engineering
VCET VCET Puttur Puttur
Design and Analysis of Algorithms 18CS42 Module 1: Introduction to - - PowerPoint PPT Presentation
Design and Analysis of Algorithms 18CS42 Module 1: Introduction to Algorithms Module 1: Introduction to Algorithms Harivinod N Harivinod N Dept. of Computer Science and Engineering Dept. of Computer Science and Engineering VCET VCET Puttur
VCET VCET Puttur Puttur
2 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
3 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
4 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
Harivinod N 18CS42-Design and Analysis of Algorithms Feb-May 2020 5
6 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
Harivinod N 18CS42-Design and Analysis of Algorithms Feb-May 2020 7
8 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
9 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
10 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
11 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
12 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
13 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
14 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
15 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
16 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
17 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
18 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
19 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
20 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
21 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
22 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
23 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
24
18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
25 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
26 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
27 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
28 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
29 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
30 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
31 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
32 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
33 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
34 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
35 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
36 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
37 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
38 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
39 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
Harivinod N 18CS42-Design and Analysis of Algorithms Feb-May 2020 40
41 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
42 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
43 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
44 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
45 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
46 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
Harivinod N 18CS42-Design and Analysis of Algorithms Feb-May 2020 47
Harivinod N 18CS42-Design and Analysis of Algorithms Feb-May 2020 48
49 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
50 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
Harivinod N 18CS42-Design and Analysis of Algorithms Feb-May 2020 51
52 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
53 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
54 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
Little Oh
55 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
56 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
(The analogous assertions are true for the Ω and Ө notations as well.)
Harivinod N 18CS42-Design and Analysis of Algorithms Feb-May 2020 57
(The analogous assertions are true for the Ω and Ө notations as well.)
Harivinod N 18CS42-Design and Analysis of Algorithms Feb-May 2020 58
59 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
60 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
61 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
62 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
63 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
Best, Worst, Average case exist?
64 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
Best, Worst, Average case exist?
65 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
Best, Worst, Average case exist?
66 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
Best, Worst, Average case exist?
Harivinod N 18CS42-Design and Analysis of Algorithms Feb-May 2020 67
Best, Worst, Average case exist?
The basic operation is count=count + 1 repeats number of times
68 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
69 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
70 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
71 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
72 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
73 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
74 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
75 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
Harivinod N 18CS42-Design and Analysis of Algorithms Feb-May 2020 76
Harivinod N 18CS42-Design and Analysis of Algorithms Feb-May 2020 77
78 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
79 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
Harivinod N 18CS42-Design and Analysis of Algorithms Feb-May 2020 80
Harivinod N 18CS42-Design and Analysis of Algorithms Feb-May 2020 81
82 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
83 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
84 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
85 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
86 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
87 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
88 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
89 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
90 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
Harivinod N 18CS42-Design and Analysis of Algorithms Feb-May 2020 91
92 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
93 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
94 18CS42-Design and Analysis of Algorithms Feb-May 2020 Harivinod N
Consider the following algorithm for finding the distance between the two closest elements in an array of numbers. Make as many improvements as you can in this algorithmic solution to the problem. If you need to, you may change the algorithm altogether; if not, improve the implementation given.
Harivinod N 18CS42-Design and Analysis of Algorithms Feb-May 2020 95
a. What does this algorithm compute? b. What is its basic operation? c. How many times is the basic operation executed? d. What is the efficiency class of this algorithm? e. Suggest an improvement/better algorithm, and indicate its efficiency class. If you cannot do it, try to prove that, in fact, it cannot be done.
a. What does this algorithm compute? b. What is its basic operation? c. How many times is the basic operation executed? d. What is the efficiency class of this algorithm? e. Suggest an improvement/better algorithm, and indicate its efficiency class. If you cannot do it, try to prove that, in fact, it cannot be done.
Harivinod N 18CS42-Design and Analysis of Algorithms Feb-May 2020 96
a. What does this algorithm compute? b. What is its basic operation? c. How many times is the basic operation executed? d. What is the efficiency class of this algorithm? e. Suggest an improvement/better algorithm, and indicate its efficiency class. If you cannot do it, try to prove that, in fact, it cannot be done.
a. What does this algorithm compute? b. What is its basic operation? c. How many times is the basic operation executed? d. What is the efficiency class of this algorithm? e. Suggest an improvement/better algorithm, and indicate its efficiency class. If you cannot do it, try to prove that, in fact, it cannot be done.
Harivinod N 18CS42-Design and Analysis of Algorithms Feb-May 2020 97
Due: Within 5 days
Harivinod N 18CS42-Design and Analysis of Algorithms Feb-May 2020 98
M(n) = 2M(n-1) +1 for n>1; M(1)=1
give these efficiencies for sequential search. (8M)
Max Marks: 20 Duration:45 Mins
M(n) = 2M(n-1) +1 for n>1; M(1)=1
give these efficiencies for sequential search. (8M)
Harivinod N 18CS42-Design and Analysis of Algorithms Feb-May 2020 99
Harivinod N 18CS42-Design and Analysis of Algorithms Feb-May 2020 10