0% found this document useful (0 votes)
42 views

Advanced Algorithm

The document discusses various algorithms including asymptotic notation, amortized analysis, aggregate analysis, and solving recurrence relations. It also covers single source shortest path, maximum flow algorithms, string matching algorithms, and randomized algorithms.

Uploaded by

Jebah Jayakumar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Advanced Algorithm

The document discusses various algorithms including asymptotic notation, amortized analysis, aggregate analysis, and solving recurrence relations. It also covers single source shortest path, maximum flow algorithms, string matching algorithms, and randomized algorithms.

Uploaded by

Jebah Jayakumar
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Advaced algorithm

Department of Computer Science & Engineering

Internal Test – I Scheme


Sem: M.Tech (II Sem) Course Teacher:
Sub: Advanced Algorithms Sub code:
Max Marks: 40

1. Asymptotic notation explanation 3M


Big Oh notation with graph 2M
Big Theta notation with graph 2M
Big Omega notation with graph 2M
Example 1M

2. Amortized analysis explanation 4M


Listing of amortized analysis techniques 3M
Explanation of amortized analysis techniques 3M

3. Explanation of aggregate analysis method 4M


Push method on stack with example 3M
Pop method on stack with example 3M
Multipop method on stack with example 3M

4. Amortized analysis method explanation 5M


Example 5M

5. A. T(n) = 2T(n/2) + n
=2( 2T( n/4 ) + 2) + 2
= 4T(n/4) + 4 + 2
=4(2T(n/8) + 2) + 4 + 2
= 8T(n/8) + 8+ 4 + 2
=8(2T(n/16) + 2) + 8+ 4 + 2
= 16T(n/16)+16 + 8+ 4 + 2
= 16T(n/16)+16 + 8+ 4 + 2
=16(2T(n/32) + 2)+16 + 8+ 4 + 2
= 32T(n/32)+ 32 +16 + 8+ 4 + 2 5M

When k=1, we had T(n) = 2T(n/2) + 2

= T(n) = 2T(n/2) + 2 →T(n) = 2T(n/2) + 2(1)


When k=2, we had T(n) = 4T(n/4) + 4 + 2

= T(n) = 4T(n/4) + 4 + 2 → T(n) = 4T(n/4) + 2(2 + 1)

When k=3, we had T(n) = 8T(n/8) + 8+ 4 + 2

= T(n) = 8T(n/8) + 8+ 4 + 2 → T(n) = 8T(n/8) + 2( 4 + 2 +1)

When k=4, we had T(n) = 16T(n/16)+16 + 8+ 4 + 2

= T(n) = 16T(n/16)+16 + 8+ 4 + 2 → T(n) = 16T(n/16)+2(8+ 4 + 2 +1)

When k=5, we had T(n) = 32T(n/32)+ 32 +16 + 8+ 4 + 2

=T(n) = 32T(n/32)+ 32 +16 + 8+ 4 + 2

= T(n) = 32T(n/32)+ 2 (16 + 8+ 4 + 2 + 1)

Notice the general form in terms of ‘k’ looks like:

T(n) = 2^k * T(n/ (2^k) + 2 *Summation from i=0 to k-1 of 2^i

The summation from i=0 to k-1 of 2^i is 2^(k) — 1.

So our general form looks like below:

T(n) = 2^k * T(n/ (2^k) )+ 2 *(2^k — 1)

T(n) = 2^k * T(n/ (2^k) )+ 2^(k+1) — 2 ------>O(n log n) 5M

5b. T(n) = T(2n/3) +1 10 M


6. 10 M
7. Bellman for algorithm 6M
Explanation 4M

8. Single source shortest path algorithm 6M


Explanation 4M
B.N.M. Institute of Technology
Department of Computer Science & Engineering

Internal Test – II Scheme


Sem: M.Tech (II Sem) Course Teacher: Dr. Savitha G
Sub: Advanced Algorithms Sub code: 18SCS22
Max Marks: 40

1. Ford-Fulkerson Algorithm for flow networks Explanation 5M


Example graph to find Max Flow. 5M

2. Construction of Ford-Fulkerson Algorithm for flow networks 5M


Example 5M

3. Construct the algorithm for maximum bipartile matching in a graph 6M


Analysis of its time complexity. 4M

4. Extended Euclid algorithm 6M


Analysis of its time complexity 4M

5. RSA algorithm 6M
Example and explanation 4M

6. Shortest path s-t-x-y 10 M

7. Chinese remainder theorem 5M


Solutions 5M

8. All pair shortest path algorithm for Sparse Graphs 7M


Example 3M
B.N.M. Institute of Technology
Department of Computer Science & Engineering

Internal Test – III Scheme


Sem: M.Tech (II Sem) Course Teacher: Dr. Savitha G
Sub: Advanced Algorithms Sub code: 18SCS22
Max Marks: 40

1. Naïve string matching algorithm 6M


Analysis for the text pattern 2M
Time complexity 2M

2. Algorithm for finite automata matcher and transition function 5M


Explanation 5M

3. Rabin-Karp Matcher algorithm 5M


Apply the algorithm when T=314152926535, p = 26, q = 11 5M

4. Monte carlo design explanation 4M


Polynomial equality testing algorithm 4M
Analysis of time complexity 2M

5. Knuth-Morris-Pratt algorithm for pattern matching 5M


Analysis of time complexity 5M

6. Boyer-Moore algorithm for pattern matching 6M


Analysis its time complexity 4M

7. Randomized deterministic algorithm for Linear search 7M


Analysis of it time complexity 3M

8. Randomized deterministic algorithm for quick sort 7M


Analysis of its time complexity 3M

You might also like