# Lec2 - COT 6936 Topics in Algorithms Giri Narasimhan ECS 254A EC 2443 Phone x3748 [email protected]/* <![CDATA[ */!function(t,e,r,n,c,a,p){try{t=document.currentScript||function(){for(t=document.getElementsByTagName('script'),e=t.length;e--;)if(t[e].getAttribute('data-cfhash'))return t[e]}();if(t&&(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute('data-cfemail')){for(e='',r='0x'+a.substr(0,2)|0,n=2;a.length-n;n+=2)e+='%'+('0'+('0x'+a.substr(n,2)^r).toString(16)).slice(-2);p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]> */ http/www.cs.fiu.edu/~giri/teach/COT6936_S10.html

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

1 COT 6936: Topics in Algorithms Giri Narasimhan ECS 254A / EC 2443; Phone: x3748 [email protected] http://www.cs.fiu.edu/~giri/teach/COT6936_S10.html https://online.cis.fiu.edu/portal/course/view.php?id=427 1/7/10 1 COT 6936 Semester Schedule • Milestones: – By Jan 18: Meet with me and discuss project – By Jan 25: Send me email with project team information and topic – Feb 3 rd week : Short presentation (15 minutes) giving intro to project, problem definition, notation, and background – March 2 nd week : Take-home Exam – Starting March last week : Full length presentation of project (1 hour) – April 15 : Written report on project 1/7/10 COT 6936 2 Problems from last lecture • Achieving diversity in heights: – Largest empty range problem – Smallest empty range problem – Which is harder and why? • Binary Counter – How many bits were changed when a binary counter is incremented from 0 to N? • Drunken Sailors problem – How many sailors will sleep in their own cabins? • Homework: Robot Challenge problem 1/7/10 COT 6936 3

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

View Full Document
2 NP-Completeness • Computers and Intractability: A Guide to the theory of NP-Completeness , by Garey and Johnson – Compendium (100 pages) of NP-Complete and related problems 1/7/10 COT 6936 4 1/7/10 COT 6936 5 Polynomial-time computations • An algorithm has ( worst-case ) time complexity O(T(n)) if it runs in time at most cT(n) for some c > 0 and for every input of length n. [ Time complexity ± worst-case. ] • An algorithm is a polynomial-time algorithm if its ( worst-case ) time complexity is O(p(n)), where p(n) is some polynomial in n. [ Polynomial in what? ] • Composition of polynomials is a polynomial. [ What are the implications? ] 1/7/10 COT 6936 6 The class P • A problem is in P if there exists a polynomial-time algorithm for the problem. [ is therefore a class of problems, not algorithms. ] • Examples of DFS: Linear-time algorithm exists Sorting: O(n log n)-time algorithm exists Bubble Sort: Quadratic-time algorithm O(n 2 ) APSP: Cubic-time algorithm O(n 3 )
3 1/7/10 COT 6936 7 The class NP • A problem is in NP if there exists a non- deterministic polynomial-time algorithm that solves the problem. • [ Alternative definition ] A problem is in if there exists a ( deterministic ) polynomial- time algorithm that verifies a solution to the problem. • All problems in P are in . [ The converse is the big deal! ] 1/7/10 COT 6936 8 TSP: Traveling Salesperson Problem Input: – Weighted graph, G – Length bound, B Output: – Is there a TSP tour in G of length at most B ? • Is TSP in ? – YES . Easy to verify a given solution. • Is TSP in P ? – OPEN ! – One of the greatest unsolved problems of this century! – Same as asking: Is = ? 1/7/10 COT 6936 9 So, what is NP-Complete ? problems are the “hardest” problems in . • We need to formalize the notion of “hardest”.

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

View Full Document
4 1/7/10 COT 6936 10 Terminology • Problem: – An abstract problem is a function (relation) from a set I of instances of the problem to a set S of solutions.
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 02/18/2012 for the course CIS 6936 taught by Professor Giri during the Spring '12 term at FIU.

### Page1 / 11

Lec2 - COT 6936 Topics in Algorithms Giri Narasimhan ECS 254A EC 2443 Phone x3748 [email protected] http/www.cs.fiu.edu/~giri/teach/COT6936_S10.html

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

View Full Document
Ask a homework question - tutors are online