Sunteți pe pagina 1din 6

Desain Dan Analisis Algoritma

CSH2G3

Description
Introduction to the mathematical analysis of correctness & complexity of algorithms to solve a
particular problem using an appropriate algorithm’s strategy.

Objectives
[1] To introduce students to the tool and technique for analyzing and designing an algorithm.
[2] To provide students knowledge of designing, analyzing and proving the correctness of an
algorithm.
[3] To be capable of determining the appropriate algorithmic strategy for a particular problem.

Textbooks and recommended readings


1. Introduction to Algorithms, 2nd edition
T. H. Cormen, C. E. Leiserson, R. L. Rivest, and Clifford Stein
Published by: MIT Press or McGraw-Hill
2. Introduction to the design and analysis of algorithm
Anany Levitin
Published by: Addison Wesley 2003
3. Foundations of algorithms
Richard Neapolitan
Kumarss Naimipour
Published by D.C Heath and Company 1996
4. Diktat Strategi Algoritmik IF2251
Dr. Ir. Rinaldi Munir, M.T
Departemen Teknik Informatika, Institut Teknologi Bandung

Prerequisite
1. Basic programming
a. Loops
b. Pointers
c. recursion
2. Discrete Mathematic
a. Induction
b. Permutation
c. Sets
d. Probability
3. Calculus
a. Logarithms
b. Integration
c. Differentiation
4. Data Structure
a. Stack
b. List
c. Queue
d. Heaps
e. trees

Credit

Tiga (3) sks, yaitu 3 jam teori + 1 jam kelas besar/responsi

Grading policy

Activities Percentages
Quizzes/homework/assignments 10%
Project 20%
Midterm exam 30%
Final exam 40%

Course syllabus
1. Introduction to software engineering concepts
1.1. Top-down & bottom-up programming
1.2. Correctness proofs by induction
1.3. Transforming & optimizing programs
2. Basic algorithmic analysis
2.1. Asymptotic analysis of upper and average complexity bounds
2.2. Identifying differences among best, average, and worst case behaviors
2.3. Big "O," little "o," omega, and theta notation
2.4. Standard complexity classes
2.5. Time and space tradeoffs in algorithms
2.6. Using recurrence relations, characteristic equation, and master theorem to analyze
recursive algorithms
3. Algorithmic strategies
3.1. Brute-force algorithms
3.2. Greedy algorithms
3.3. Divide-and-conquer
3.4. Backtracking
3.5. Branch-and-bound
3.6. Heuristics
3.7. Pattern matching and string/text algorithms
3.8. Numerical approximation algorithms
4. Fundamental computing algorithms
4.1. Sequential and binary search algorithms
4.2. Quadratic sorting algorithm (selection, insertion, bubble)
4.3. O(N log N) sorting algorithms (quicksort, mergesort)
4.4. Depth and breadth first traversal
4.5. Shortest path algorithm
4.6. Minimum spanning tree (Prim’s and Kruskal’s algorithm)
5. Advanced algorithmic analysis
5.1. Dynamic Programming

Detailed topics for each session


Week Sessions Topics References
• Course policy • PPt slides recursive
1 1 • Overview of recursive algorithm
• Construct algorithms either iterative or • Diktat bu Inge
recursive for several cases, e.g.
factorial, exponentiation.
• Tail recursion: transforming &
optimizing algorithm
• Homework: construct recursive
algorithms of exponentiation and
Fibonacci.
Algorithm correctness: Ian Parberry LNOA
2 • Review the homework
• Fibonacci algorithm (iterative)
• Homework: Correctness of iterative:
maximum algorithm
Algorithm correctness: Ian Parberry LNOA
2 3 ▪ Review the homework: maximum
algorithm
▪ Exercise: sum of the integers in array
A[1..n]
▪ Correctness of recursive algorithm
(fibonacci)
▪ Exercise: recursive correctness of
maximum algorithm
• Diawali dengan contoh,
Kompleksitas waktu misal insertion sort.
• Menjelaskan problems
types (pengelompokkan
persoalan) dalam computer
science [levitin]
• Memberikan ilustrasi
4 pentingnya algoritma yang
efisien [cormen]
• Analysis framework,
meliputi measuring an
input’s size, units for
measuring running time, &
worst-case, best-case,
average-case efficiencies.
[levitin]
• Asymptotic notations
3 5 Kompleksitas waktu asimptotik (Big-O, big-Ω, big- Θ),
berikan ilustrasi
dengan grafik [levitin]
• Efficiency classes
• Latihan soal
• Mathematical analysis of
6 Kompleksitas waktu asimptotik nonrecursive algorithms
neapolitan
• Exercises
• Solving recurrences by
4 7 Kompleksitas waktu asimptotik substitution and
characteristic equation
• Mathematical analysis of
recursive algorithms
neapolitan
• Exercises

8 QUIZ #1: correctness & complexity


• Contoh yang tepat:
5 9 Brute force design technique sequential search.
Usahakan gunakan kasus
yang sama untuk
menjelaskan perbedaan
tiap strategi.
• an algorithm
• n! algorithm, etc (see
rinaldi’s slide)
• karakteristik brute force
• Exercises
• Demo program (optional)
• String matching + demo
10 Brute force design technique (cont.) & (optional)
presentasi tugas kecil • Closest-pair
• Exhaustive search [rinaldi’s
slide]
• Keypoint: tidak selalu
6 11 Greedy design technique menghasilkan nilai optimum.
• Contoh menarik: selection-
sort.
• Contoh opsi lainnya:
o Coin-changing problem
o Schedulling problem
o 0/1 knapsack problem:
greedy by profit, weight,
and density
o Fractional knapsack
problem
o Greedy with Heuristic
• Penjadwalan dengan
12 Greedy Design Technique & presentasi deadline
tugas kecil • MST : prim & kruskal
algorithm
• Shortest path: dijsktra
• Target: mengurangi search
7 13 Divide Conquer space. Advanced topic:
Bagaimana jika n>2 ?
• Pengertian DC, skema
umum DC
• Persoalan pencarian nilai
ekstrem, bandingkan dg
brute force
• Persoalan closest-pair,
bandingkan dengan brute
force
• Tugas kelompok topik2 DC
• Algoritma pengurutan:
14 Divide Conquer quick-sort & merge sort.
Jelaskan konsep divide &
conquer.
• Perpangkatan an
• Perkalian matriks
• Tugas puzzle: TRIOMINO
UJIAN TENGAH SEMESTER
• Pengertian dynamic
9 15 Dynamic Programming programming
• Pendekatan DP
• Shortest path problem
• Permutasi
• Integer knapsack [rinaldi’s
16 Dynamic programming sld]
• Memoization (kombinasi
bottom-up & top-down
approach)
• Pengertian backtracking,
10 17 Backtracking properti umum
backtracking
• Prinsip pencarian solusi
• The N-queens problem &
algoritmanya
• The maze problem [rinaldi’s
slide]
• Tugas game: the knight
tour, missionaris canibal
• Pengertian branch bound
11 18 Branch bound [rinaldi’s sld]
• Knapsack problem
[neapolitan]
• Prinsip breadth first search,
struktur data, algoritma
[neapolitan]
• Tracing algoritma u/
memahami pembentukan
pohon ruang status
• 0/1 knapsack dg best first
19 Branch bound search, tracing algoritma
• TSP dg best first search,
tracing algoritma
• Exercises

12 20 QUIZ #2: Algorithm strategies


• Knuth-Morris-Pratt (KMP)
21 Advanced topic (bebas setiap dosen, tidak • Bandingkan dengan brute
masuk materi ujian): force
▪ String matching • Demo program (opt)
▪ Problem solving pada soal-soal • Booyer-Moore
programming contest Bandingkan dengan brute force

UJIAN AKHIR SEMESTER

TUGAS BESAR
Menyelesaikan suatu permasalahan dengan menerapkan salah satu strategi algoritma yang telah
dipelajari, kemudian menuliskan ide penyelesaian tersebut dalam bentuk makalah dan
dipresentasikan di akhir perkuliahan.

S-ar putea să vă placă și