|
Course Web Page: http://www.cs.utsa.edu/~kwek/cs3343.html
Time and Location: TuTh 3:30-4:45 pm, HSS 2.01.33
Instructor: Dr. Stephen
Kwek (Office: BB 4.01.18 )
Instructor's Office Hours: TuTh 2-3pm
Teaching Assistant: Amitava Karmaker (email: akarmake@cs.utsa.edu)
TA's Office Hours: M 4-5pm, SB 3.02.10A
Prerequisite: CS 2413, CS3233, and MAT 2213
Textbook: Introduction to the Design and Analysis of Algorithms,
Anany Levitin. Addison-Wesley. ISBN: 0-201-74394th Octo5-7
- Objectives: This course is to provide an introduction to the
design and analysis of computer algorithms. The students will learn
how to analyze the performance of computer algorithms, and
programming techniques and data structures used in the writing of
effective algorithms.
- Course Topics (tentative and not in order):
- [Ch. 1] Introduction
- Specification of an algorithm
- Requirement of an algorithm
- [Ch. 2] Asymptotic Notations [material
from CLR][lecture notes 1
, notes 2]
- Comparing running time of two programs
- Aymptotic notations
- Asserting bounds
- Derive from definitions
- Using Limit
- Efficiency classes
- Analyzing running time for iterative algorithms:
- Count number of basic operations (Example: selection sort)
- Rough estimate (Example: Matrix multiplication)
- Idea behind Recursion:
- Boundary case: small input (easy solution)
- Not so small input: solve smaller subproblem(s) and extend
it to the larger problem
- Express running time as a recurrence
- Solving recurrences
- Substition
- Iterative Method
- Master Theorem
- [Ch. 3] Brute Force Method [notes]
- Exhaustive search
- Brute force evaluation
- Advantages and disadvantages of brute-force approach
- More examples: Traveling salesman problem and knapsack
problem.
- [Ch. 4] Divide-and-Conquer: Merge-sort, tree traversal and related
algorithms
- Components of Divide and Conquer Technique:
- Boundary Case
- Recurrence:
- Divide - partition the problem into subproblems.
- Conquer - Solve the subproblems
- Merge - 'combine' the solutions to subproblems to one
that solve the original problem.
- Examples: Merge Sort, Summing up array of integers.
- Tree Traversals: preorder, inorder and postorder.
- Further examples: Computing the height of a tree, and counting
the number of nodes in a tree.
- [Ch. 5] Incremental Methods (Decreased and Conquer)
- Components of Chip and Conquer Technique:
- Boundary Case
- Recurrence:
- Chip - Reduce the problem to a slightly smaller
problem.
- Conquer - Solve the smaller problem
- Extend - Extend the solution to solve the original
- Examples: insertion sort, removing nodes from a linked
list and counting number of nodes with key 'a' in list.
- Incremental Method:
- Depth first search, depth-first search forest and types of
edges
- Breath first search, breath-first search forest and types
of edges
- Topological sort
- Rank-k selection
- [Ch. 6] Transform and Conquer [material
on heaps]
- Techniques:
- Change to easier input instance (e.g. presorting)
- Change the input representation (i.e. data structures)
- Problem Reduction
- Data Structures:
- Heaps
- AVL-tree
- (2.,3)-tree
- [Ch. 9] Greedy Algorithms[lecture material:greedy
and dynamic programming, MST,
Problems]
- Minimum spanning trees
- Prim's algorithm
- Proof of correctness:
- Greedy choice is in some solution
- Optimal substructure property.
- Kruskal's algorithm
- Greedy choice is in some solution
- Optimal substructure property.
- Activitry selection problem
- Proof of correctness:
- Greedy choice is in some solution
- Optimal substructure property.
- Why proof?
- Knapsack Problem
- Fibonacci Example
- [Ch. 8] Dynamic Programming [Optimum
Binary Search Trees, Problems]:
- Elements of Dynamic Programming:
- Understand where function f() is your solution optimizing.
- Express f (n) in terms of f( ) of smaller subproblems.
[But note that simple divide-and-conquer strategy yeield a
slow exponential time algorithm].
- Construct a table for f() and an auxilary table l to keep
track of how the entries in f() were obtained.
- Using the table construct the optimum solution/
- Longest common subsequence
- Freshman approach: Brute force -- enumerate all 2n
possibilites..
- Sophomore approach: Divide and conquer -- a very short
program that runs much slower than brute fore due to
recomputation of the same problem
- Dynamic programming approach -- O(mn) time.
- [Ch. 10] NP-Completeness [material
from CLR, exercises]
- The need to learn about NP-Completeness.
- Opimization problem vs. decision problem
- A list of problems: graph-coloring, Hamiltonion cycle (path),
traveling saleman problem, kanpsack, bin-packing, satisfiability.
- The size of an input. Prime factorizing problem
- Polynomial time reduction
- Definition of NP-hard and NP-complete
- Proving NP-Completeness.
- Dealing with NP-Completeness:
- Restricted cases of NP-complete problems maybe easy.
- Approximation algorithm
- Randomized algorithm
- Heuristics and hope for the best (without any guarnatee on
the approximation ratio).
Grading:
Exam 1 15%
Exam 2 15%
Final Exam 35%
Lab Work 10%
Homework plus programming projects 25%
Class participation: 5%
No grades will be dropped. Exams cannot be made up, cannot be
taken early, and must be taken in class at the scheduled time.
There will be no make up exams. The grade that you obtain for the course
will also be served as the grade for the lab.
The letter grade for the course will be determined as follows:
80% or better = A; 70 to 79.99 = B; 60 to 69.99 = C; 50 to 59.99 = D;
and less than 50 = F. The instructor may curve this scale down but
will not curve it up.
Since your grade is partially based on computer and homework
assignments, they must be your own work unless otherwise stated in the
assignment. You can ask me questions about any aspect of an assignment
and pursue general discussions with others on the system or on an
approach to solving a problem.
The assignments are typically due on Tuesday before class. If for any
personal or health reason, you are not able to hand in on Tuesday, you
can hand in on the following Thursday (i.e., two days later) without
asking for the instructor permission. However, no assignment will be
accepted after Thursday.
Cheating (for example, copy homework solution from the web, friends
or other textbooks) will result at least in an immediate
failing grade ('F') and maybe expelled from UTSA. Anyone who assists in
cheating (e.g. letting others copied your solution) will receive the
same penalty. All the written work should be done by yourself, although
some group discussion is strongly encouraged.
It is your responsibility to contact me in a timely manner if there
are extenuating circumstances that impact your ability to perform in
this class. Your grade is 'not given' by the instructor, but rather is
earned by you through demonstrating your mastery of the subject. A poor
grade does not say anything about you as a person.
Assignments:
Assignment 1: Asymptotic Notations
[Soln]
Assignment 2: Time Analysis
Assignment 3: Solving Recurrences
Important Dates:
- Test 1: 2nd October (Tues)
- Test 2: 6th November (Tues)
- Final: TBA
|