# lec20 - CS C341 I S C361 Data Structures Algorithms...

This preview shows pages 1–7. Sign up to view the full content.

Click to edit Master subtitle style 2/7/11 Sundar B. CS C341 / I S C361 Algorithm Design Techniques - GREEDY Types of Problems - Optimization Problems: Examples Greedy Algorithms - Examples - Task Scheduling - (Fractional) KnapSack - Greedy Choice Property - Optimal Substructure Property - Limitation 11

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2/7/11 Sundar B. Types of Problems Decision Problems: E.g. Membership in a given set, Primality Testing General Description: Input Instance: x ϵ I, the set of all instances Property: A predicate P on I Query: Is P(x) true? 22
2/7/11 Sundar B. Types of Problems [2] Search Problems: E.g. Finding an element with a given key, Order/Rank Queries such as find the median or find the kth smallest element General Description: Input Instance: ls 5 I = Lists[E] where ls “ Lists[E], a set of collections of elements of type E. Property: A predicate P on E Query: Find a y ϵ ls such that P(y) is true. 33

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2/7/11 Sundar B. Types of Problems [3] Function Problems: E.g. gcd of two numbers, all substrings of a given string General Description: Input Instance: x ϵ I, the set of all instances Function: A function f on I Query: Compute f(x) 44
2/7/11 Sundar B. Types of Problems [4] Optimization Problems: E.g. Huffman Coding / Compression General Description: Input Instance : x ϵ I, the set of all instances Function: A function f : I -> S, where S is set of solutions Property: A predicate P on S Feasible Solutions: for each x, SOL(x) = { f(x) | P(f(x)) is true } 55

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2/7/11 Sundar B. Problem - Task Scheduling
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 19

lec20 - CS C341 I S C361 Data Structures Algorithms...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online