Introduction to CS 5114courses.cs.vt.edu/cs5114/spring2009/lectures/lecture01...About the Course...
Transcript of Introduction to CS 5114courses.cs.vt.edu/cs5114/spring2009/lectures/lecture01...About the Course...
![Page 1: Introduction to CS 5114courses.cs.vt.edu/cs5114/spring2009/lectures/lecture01...About the Course Theory of Algorithms Course Information I Instructor I T. M. Murali, 2160B orgerson,T](https://reader034.fdocuments.us/reader034/viewer/2022042418/5f3471d558b4b667102a9b7f/html5/thumbnails/1.jpg)
About the Course Theory of Algorithms
Introduction to CS 5114
T. M. Murali
January 20, 2009
![Page 2: Introduction to CS 5114courses.cs.vt.edu/cs5114/spring2009/lectures/lecture01...About the Course Theory of Algorithms Course Information I Instructor I T. M. Murali, 2160B orgerson,T](https://reader034.fdocuments.us/reader034/viewer/2022042418/5f3471d558b4b667102a9b7f/html5/thumbnails/2.jpg)
About the Course Theory of Algorithms
Course InformationI Instructor
I T. M. Murali, 2160B Torgerson, 231-8534, [email protected] O�ce Hours: 3pm�5pm Mondays and by appointment
I Teaching assistantI Ajeet Singh, [email protected] O�ce Hours: 10am-12pm, Wednesdays and Fridays, 106
McBryde
I Class meeting timeI TR 12:30pm�1:45pm, McBryde 329
I Keeping in TouchI Course web site
http://courses.cs.vt.edu/~cs5114/spring2009, updated
regularly through the semesterI Listserv: [email protected]
I Prerequisite: a grade of C or better in CS 2604
![Page 3: Introduction to CS 5114courses.cs.vt.edu/cs5114/spring2009/lectures/lecture01...About the Course Theory of Algorithms Course Information I Instructor I T. M. Murali, 2160B orgerson,T](https://reader034.fdocuments.us/reader034/viewer/2022042418/5f3471d558b4b667102a9b7f/html5/thumbnails/3.jpg)
About the Course Theory of Algorithms
Course InformationI Instructor
I T. M. Murali, 2160B Torgerson, 231-8534, [email protected] O�ce Hours: 3pm�5pm Mondays and by appointment
I Teaching assistantI Ajeet Singh, [email protected] O�ce Hours: 10am-12pm, Wednesdays and Fridays, 106
McBryde
I Class meeting timeI TR 12:30pm�1:45pm, McBryde 329
I Keeping in TouchI Course web site
http://courses.cs.vt.edu/~cs5114/spring2009, updated
regularly through the semesterI Listserv: [email protected]
I Prerequisite: a grade of C or better in CS 2604
![Page 4: Introduction to CS 5114courses.cs.vt.edu/cs5114/spring2009/lectures/lecture01...About the Course Theory of Algorithms Course Information I Instructor I T. M. Murali, 2160B orgerson,T](https://reader034.fdocuments.us/reader034/viewer/2022042418/5f3471d558b4b667102a9b7f/html5/thumbnails/4.jpg)
About the Course Theory of Algorithms
Course InformationI Instructor
I T. M. Murali, 2160B Torgerson, 231-8534, [email protected] O�ce Hours: 3pm�5pm Mondays and by appointment
I Teaching assistantI Ajeet Singh, [email protected] O�ce Hours: 10am-12pm, Wednesdays and Fridays, 106
McBryde
I Class meeting timeI TR 12:30pm�1:45pm, McBryde 329
I Keeping in TouchI Course web site
http://courses.cs.vt.edu/~cs5114/spring2009, updated
regularly through the semesterI Listserv: [email protected]
I Prerequisite: a grade of C or better in CS 2604
![Page 5: Introduction to CS 5114courses.cs.vt.edu/cs5114/spring2009/lectures/lecture01...About the Course Theory of Algorithms Course Information I Instructor I T. M. Murali, 2160B orgerson,T](https://reader034.fdocuments.us/reader034/viewer/2022042418/5f3471d558b4b667102a9b7f/html5/thumbnails/5.jpg)
About the Course Theory of Algorithms
Course InformationI Instructor
I T. M. Murali, 2160B Torgerson, 231-8534, [email protected] O�ce Hours: 3pm�5pm Mondays and by appointment
I Teaching assistantI Ajeet Singh, [email protected] O�ce Hours: 10am-12pm, Wednesdays and Fridays, 106
McBryde
I Class meeting timeI TR 12:30pm�1:45pm, McBryde 329
I Keeping in TouchI Course web site
http://courses.cs.vt.edu/~cs5114/spring2009, updated
regularly through the semesterI Listserv: [email protected]
I Prerequisite: a grade of C or better in CS 2604
![Page 6: Introduction to CS 5114courses.cs.vt.edu/cs5114/spring2009/lectures/lecture01...About the Course Theory of Algorithms Course Information I Instructor I T. M. Murali, 2160B orgerson,T](https://reader034.fdocuments.us/reader034/viewer/2022042418/5f3471d558b4b667102a9b7f/html5/thumbnails/6.jpg)
About the Course Theory of Algorithms
Required Course Textbook
I Algorithm DesignI Jon Kleinberg and Éva TardosI Addison-WesleyI 2006I ISBN: 0-321-29535-8
![Page 7: Introduction to CS 5114courses.cs.vt.edu/cs5114/spring2009/lectures/lecture01...About the Course Theory of Algorithms Course Information I Instructor I T. M. Murali, 2160B orgerson,T](https://reader034.fdocuments.us/reader034/viewer/2022042418/5f3471d558b4b667102a9b7f/html5/thumbnails/7.jpg)
About the Course Theory of Algorithms
Course Goals
I Learn methods and principles to construct algorithms.I Learn techniques to analyze algorithms mathematically for
correctness and e�ciency (e.g., running time and space used).I Course roughly follows the topics suggested in textbook
I Measures of algorithm complexityI Greedy algorithmsI Divide and conquerI Dynamic programmingI Network �ow problemsI NP-completenessI Coping with intractabilityI Approximation algorithmsI Randomized algorithms
![Page 8: Introduction to CS 5114courses.cs.vt.edu/cs5114/spring2009/lectures/lecture01...About the Course Theory of Algorithms Course Information I Instructor I T. M. Murali, 2160B orgerson,T](https://reader034.fdocuments.us/reader034/viewer/2022042418/5f3471d558b4b667102a9b7f/html5/thumbnails/8.jpg)
About the Course Theory of Algorithms
Required Readings
I Reading assignment available on the website.I Read before class.
![Page 9: Introduction to CS 5114courses.cs.vt.edu/cs5114/spring2009/lectures/lecture01...About the Course Theory of Algorithms Course Information I Instructor I T. M. Murali, 2160B orgerson,T](https://reader034.fdocuments.us/reader034/viewer/2022042418/5f3471d558b4b667102a9b7f/html5/thumbnails/9.jpg)
About the Course Theory of Algorithms
Lecture Slides
I Will be available on class web site.I Usually posted just before class.I Class attendance is extremely important.
Lecture in classcontains signi�cant and substantial additions to material on theslides.
![Page 10: Introduction to CS 5114courses.cs.vt.edu/cs5114/spring2009/lectures/lecture01...About the Course Theory of Algorithms Course Information I Instructor I T. M. Murali, 2160B orgerson,T](https://reader034.fdocuments.us/reader034/viewer/2022042418/5f3471d558b4b667102a9b7f/html5/thumbnails/10.jpg)
About the Course Theory of Algorithms
Lecture Slides
I Will be available on class web site.I Usually posted just before class.I Class attendance is extremely important. Lecture in class
contains signi�cant and substantial additions to material on theslides.
![Page 11: Introduction to CS 5114courses.cs.vt.edu/cs5114/spring2009/lectures/lecture01...About the Course Theory of Algorithms Course Information I Instructor I T. M. Murali, 2160B orgerson,T](https://reader034.fdocuments.us/reader034/viewer/2022042418/5f3471d558b4b667102a9b7f/html5/thumbnails/11.jpg)
About the Course Theory of Algorithms
Homeworks
I Posted on the web site ≈ one week before due date.I Prepare solutions digitally but hand in hard-copy.
I Solution preparation recommended in LATEX.
![Page 12: Introduction to CS 5114courses.cs.vt.edu/cs5114/spring2009/lectures/lecture01...About the Course Theory of Algorithms Course Information I Instructor I T. M. Murali, 2160B orgerson,T](https://reader034.fdocuments.us/reader034/viewer/2022042418/5f3471d558b4b667102a9b7f/html5/thumbnails/12.jpg)
About the Course Theory of Algorithms
Homeworks
I Posted on the web site ≈ one week before due date.I Prepare solutions digitally but hand in hard-copy.
I Solution preparation recommended in LATEX.
![Page 13: Introduction to CS 5114courses.cs.vt.edu/cs5114/spring2009/lectures/lecture01...About the Course Theory of Algorithms Course Information I Instructor I T. M. Murali, 2160B orgerson,T](https://reader034.fdocuments.us/reader034/viewer/2022042418/5f3471d558b4b667102a9b7f/html5/thumbnails/13.jpg)
About the Course Theory of Algorithms
Examinations
I Take-home midterm.I Take-home �nal (comprehensive).I Prepare digital solutions (recommend LATEX).
I Examinations may change to be in class.
![Page 14: Introduction to CS 5114courses.cs.vt.edu/cs5114/spring2009/lectures/lecture01...About the Course Theory of Algorithms Course Information I Instructor I T. M. Murali, 2160B orgerson,T](https://reader034.fdocuments.us/reader034/viewer/2022042418/5f3471d558b4b667102a9b7f/html5/thumbnails/14.jpg)
About the Course Theory of Algorithms
Examinations
I Take-home midterm.I Take-home �nal (comprehensive).I Prepare digital solutions (recommend LATEX).I Examinations may change to be in class.
![Page 15: Introduction to CS 5114courses.cs.vt.edu/cs5114/spring2009/lectures/lecture01...About the Course Theory of Algorithms Course Information I Instructor I T. M. Murali, 2160B orgerson,T](https://reader034.fdocuments.us/reader034/viewer/2022042418/5f3471d558b4b667102a9b7f/html5/thumbnails/15.jpg)
About the Course Theory of Algorithms
Grades
I Homeworks: ≈ 10, 60% of the grade.I Take-home midterm: 15% of the grade.I Take-home �nal: 25% of the grade.
![Page 16: Introduction to CS 5114courses.cs.vt.edu/cs5114/spring2009/lectures/lecture01...About the Course Theory of Algorithms Course Information I Instructor I T. M. Murali, 2160B orgerson,T](https://reader034.fdocuments.us/reader034/viewer/2022042418/5f3471d558b4b667102a9b7f/html5/thumbnails/16.jpg)
About the Course Theory of Algorithms
What is an Algorithm?
Chamber's A set of prescribed computational procedures for solvinga problem; a step-by-step method for solving a problem.
Knuth, TAOCP An algorithm is a �nite, de�nite, e�ective procedure,with some input and some output.
![Page 17: Introduction to CS 5114courses.cs.vt.edu/cs5114/spring2009/lectures/lecture01...About the Course Theory of Algorithms Course Information I Instructor I T. M. Murali, 2160B orgerson,T](https://reader034.fdocuments.us/reader034/viewer/2022042418/5f3471d558b4b667102a9b7f/html5/thumbnails/17.jpg)
About the Course Theory of Algorithms
What is an Algorithm?
Chamber's A set of prescribed computational procedures for solvinga problem; a step-by-step method for solving a problem.
Knuth, TAOCP An algorithm is a �nite, de�nite, e�ective procedure,with some input and some output.
![Page 18: Introduction to CS 5114courses.cs.vt.edu/cs5114/spring2009/lectures/lecture01...About the Course Theory of Algorithms Course Information I Instructor I T. M. Murali, 2160B orgerson,T](https://reader034.fdocuments.us/reader034/viewer/2022042418/5f3471d558b4b667102a9b7f/html5/thumbnails/18.jpg)
About the Course Theory of Algorithms
Origin of the word �Algorithm�
1. From the Arabic al-Khwarizmi, a native of Khwarazm, a namefor the 9th century mathematician, Abu Ja'far Mohammed benMusa.
He wrote �Kitab al-jabr wa'l-muqabala,� which evolvedinto today's high school algebra text.
2. From Al Gore, the former U.S. vice-president who invented theinternet.
3. From the Greek algos (meaning �pain,� also a root of�analgesic�) and rythmos (meaning ��ow,� also a root of�rhythm�). �Pain �owed through my body whenever I worked onCS 5114 homeworks.� � former CS 5114 student.
![Page 19: Introduction to CS 5114courses.cs.vt.edu/cs5114/spring2009/lectures/lecture01...About the Course Theory of Algorithms Course Information I Instructor I T. M. Murali, 2160B orgerson,T](https://reader034.fdocuments.us/reader034/viewer/2022042418/5f3471d558b4b667102a9b7f/html5/thumbnails/19.jpg)
About the Course Theory of Algorithms
Origin of the word �Algorithm�
1. From the Arabic al-Khwarizmi, a native of Khwarazm, a namefor the 9th century mathematician, Abu Ja'far Mohammed benMusa.
He wrote �Kitab al-jabr wa'l-muqabala,� which evolvedinto today's high school algebra text.
2. From Al Gore, the former U.S. vice-president who invented theinternet.
3. From the Greek algos (meaning �pain,� also a root of�analgesic�) and rythmos (meaning ��ow,� also a root of�rhythm�). �Pain �owed through my body whenever I worked onCS 5114 homeworks.� � former CS 5114 student.
![Page 20: Introduction to CS 5114courses.cs.vt.edu/cs5114/spring2009/lectures/lecture01...About the Course Theory of Algorithms Course Information I Instructor I T. M. Murali, 2160B orgerson,T](https://reader034.fdocuments.us/reader034/viewer/2022042418/5f3471d558b4b667102a9b7f/html5/thumbnails/20.jpg)
About the Course Theory of Algorithms
Origin of the word �Algorithm�
1. From the Arabic al-Khwarizmi, a native of Khwarazm, a namefor the 9th century mathematician, Abu Ja'far Mohammed benMusa.
He wrote �Kitab al-jabr wa'l-muqabala,� which evolvedinto today's high school algebra text.
2. From Al Gore, the former U.S. vice-president who invented theinternet.
3. From the Greek algos (meaning �pain,� also a root of�analgesic�) and rythmos (meaning ��ow,� also a root of�rhythm�).
�Pain �owed through my body whenever I worked onCS 5114 homeworks.� � former CS 5114 student.
![Page 21: Introduction to CS 5114courses.cs.vt.edu/cs5114/spring2009/lectures/lecture01...About the Course Theory of Algorithms Course Information I Instructor I T. M. Murali, 2160B orgerson,T](https://reader034.fdocuments.us/reader034/viewer/2022042418/5f3471d558b4b667102a9b7f/html5/thumbnails/21.jpg)
About the Course Theory of Algorithms
Origin of the word �Algorithm�
1. From the Arabic al-Khwarizmi, a native of Khwarazm, a namefor the 9th century mathematician, Abu Ja'far Mohammed benMusa.
He wrote �Kitab al-jabr wa'l-muqabala,� which evolvedinto today's high school algebra text.
2. From Al Gore, the former U.S. vice-president who invented theinternet.
3. From the Greek algos (meaning �pain,� also a root of�analgesic�) and rythmos (meaning ��ow,� also a root of�rhythm�). �Pain �owed through my body whenever I worked onCS 5114 homeworks.� � former CS 5114 student.
![Page 22: Introduction to CS 5114courses.cs.vt.edu/cs5114/spring2009/lectures/lecture01...About the Course Theory of Algorithms Course Information I Instructor I T. M. Murali, 2160B orgerson,T](https://reader034.fdocuments.us/reader034/viewer/2022042418/5f3471d558b4b667102a9b7f/html5/thumbnails/22.jpg)
About the Course Theory of Algorithms
Origin of the word �Algorithm�
1. From the Arabic al-Khwarizmi, a native of Khwarazm, a namefor the 9th century mathematician, Abu Ja'far Mohammed benMusa. He wrote �Kitab al-jabr wa'l-muqabala,� which evolvedinto today's high school algebra text.
2. From Al Gore, the former U.S. vice-president who invented theinternet.
3. From the Greek algos (meaning �pain,� also a root of�analgesic�) and rythmos (meaning ��ow,� also a root of�rhythm�). �Pain �owed through my body whenever I worked onCS 5114 homeworks.� � former CS 5114 student.
![Page 23: Introduction to CS 5114courses.cs.vt.edu/cs5114/spring2009/lectures/lecture01...About the Course Theory of Algorithms Course Information I Instructor I T. M. Murali, 2160B orgerson,T](https://reader034.fdocuments.us/reader034/viewer/2022042418/5f3471d558b4b667102a9b7f/html5/thumbnails/23.jpg)
About the Course Theory of Algorithms
Problem Example
Find Minimum
INSTANCE: Nonempty list x1, x2, . . . , xn of integers.
SOLUTION: Pair (i , xi) such that xi = min{xj | 1 ≤ j ≤ n}.
![Page 24: Introduction to CS 5114courses.cs.vt.edu/cs5114/spring2009/lectures/lecture01...About the Course Theory of Algorithms Course Information I Instructor I T. M. Murali, 2160B orgerson,T](https://reader034.fdocuments.us/reader034/viewer/2022042418/5f3471d558b4b667102a9b7f/html5/thumbnails/24.jpg)
About the Course Theory of Algorithms
Algorithm Example
Find-Minimum(x1, x2, . . . , xn)1 i ← 1
2 for j ← 2 to n
3 do if xj < xi
4 then i ← j
5 return (i , xi)