csc 575 algorithm and complexity analysis
fall 2008
crn=12765 section=01 R 11:00-1:145 MSB104
instr: dr. shanti shantaram
office: 213 msb
office hours: MW 10-12NOON
other times by appt.
contact info:
email: rshantar@umflint.edu
NOTE: put "csc575" in the s
Csc 575 Algorithm and Complexity analysis
CRN=12765
Thursday 11:00-1:45 MSB 104
fall 2008
Ch 1 introduction
Algorithm is a step by step procedure for solving a problem. It is like a recipe in cooking.
Algo have the following properties:
Input:
algo receiv
4.1 binary search
Bsearch(L, I, j, key) cfw_
While (I<=j) cfw_
K=(i+j)/2
If (key=L(k) return k;
If (key <L(k) j=k-1; /search the left part
Else i=k+1; /search the right part
Return -1 /not found
Bsearch_recurs(L, I, j, key) cfw_
If (i>j) return -1;
K=(i
CSC 575
Chapter 2: graphs
Graph is a set of vertices V (also called nodes) connected by edges E. The edges may be directed
(digraph)
1
e4
6
2
e1
e2
3
e5
e7
4
e5
5
e6
7
(Fig 2.5.1 page 68)
An edge connects a vertex to a different vertex or to itself (in th
Csc 575
Chapter 3: data structures
Stack
Queue
List
Set
Vector
Deque
These are considered in the STL folder in progdata and in blackboard
These contain several examples of ADTs (abstract data types) and you are expected to be
familiar with them and be abl
AVL trees
As we have seen, depending on the order in which you insert data into a
BST, the shape of the tree will be different.
Consider inserting the same data items in the following two orders:
Eg1: 10 20 40 30 50 60 70
Eg2: 40 20 10 30 60 50 70
Thus it
CSC 575 huffman code program assignment
This assignment consists of 2 parts:
Huffman part 1
and
Huffman part 2
Huffman part 1
In this program you will obtain the Huffman codes for the English alphabet a thru z
using the frequency data given below:
Frequen
DYNAMIC
PROGRAMMING AND
TEXT SEARCHING
CSC 575
OVERVIEW
What is dynamic programming?
Applications
Text searching
Algorithm
Examples
Dynamic Programming
Sometimescalledtheforwardbackward
CreatedbyRichardBellman(1956)
Resemblesdivideandconquer
Computes the