7/29/2019 01a Introduction v2(1)
1/28
FACULTY OF
ENGINEERING &
INFORMATION
TECHNOLOGIES
Algorithms and Complexity
COMP2007 COMP2907 COMP5211
School of Information technologies
7/29/2019 01a Introduction v2(1)
2/28
FACULTY OF
ENGINEERING &
INFORMATION
TECHNOLOGIES
Introduction
Algorithms and Complexity
7/29/2019 01a Introduction v2(1)
3/28
7/29/2019 01a Introduction v2(1)
4/28
COMP2007
COMP2907
COMP5211
Textbook: Algorithm Design by Tardos & Kleinberg
All information on Sydney e-learning
http://elearning.sydney.edu.au/
Material for all units will be available on the elearning site titlted:
2013 Semester 2 - COMP2007 Algorithms and Complexity
4
7/29/2019 01a Introduction v2(1)
5/28
Contents
We will cover
Basic algorithms
Basic algorithm design methods
Reductions
Basic Complexity theory
Connections between problems
Differences between problems
Also
How to present algorithms
How to explain, analyze and argue about correctness
7/29/2019 01a Introduction v2(1)
6/28
Example
Sound similar? (computationally speaking...)
Shortest Path
Longest Path
7/29/2019 01a Introduction v2(1)
7/28
Example from textbook material
7/29/2019 01a Introduction v2(1)
8/28
Example
What about these?
Mergesort
Counting inversions in preference profiles
7/29/2019 01a Introduction v2(1)
9/28
Example
7/29/2019 01a Introduction v2(1)
10/28
Example
Sound similar? (computationally speaking...)
Shortest Path
Longest Path
What about these?
Mergesort
Counting inversions in preference profiles
7/29/2019 01a Introduction v2(1)
11/28
Admin
7/29/2019 01a Introduction v2(1)
12/28
Assessment
Quizzes 20%
Assignments 20%
Final exam 60%
5 quizzes
All quizzes will be in-class during your assigned tutorial time
5 Assignments
Each assignment will be available about one week before its due date. Final exam has a 40% barrier
If your exam mark is below 40%, you will not get a passing mark for the unit
Closed book, only two A4 pages of your own notes allowed
7/29/2019 01a Introduction v2(1)
13/28
Assessment Quizzes
Quizzes 20%
5 quizzes
All quizzes will be in-class during your assigned tutorial time On e-learning, mostly multiple choice questions, but may include other
questions too.
First quiz is in week 3
7/29/2019 01a Introduction v2(1)
14/28
Assessment Assignments
Assignments 20%
5 assignments
Same weight (4% each) Some programming will be required
You can use C, C++, Java, Python
All assignments must be submitted on e-learning in pdf format
All assignments will be submitted to the Turnitin similarity checking tool All code will be submitted to MOSS or/and other plagiarism detection
tool
7/29/2019 01a Introduction v2(1)
15/28
Contact
Taso Viglas
Tutors: See e-learning website for names, emails etc (coming soon)
For questions about the unit, please use the e-learning discussion forum
If this is not what you need, try to talk to your tutor during your tutorial time
Otherwise email your tutor
mailto:[email protected]:[email protected]:[email protected]7/29/2019 01a Introduction v2(1)
16/28
Material
All lecture slides will be available on e-learning
Lectures will follow the textbook closely
A large part of the lecture slides are available from the textbook publisher,
covered by the publishers copyright Lectures are recorded and will be available on e-learning
Solutions to quiz questions will be available
Solutions to selected tutorial questions will be available, but some material will
only be available from your tutor during the tutorial times.
Solutions to the assignments will not be available on e-learning
Some solutions will be discussed in tutorials.
7/29/2019 01a Introduction v2(1)
17/28
Tutorials start in week 2
- For all algorithms units this semester- COMP2007
- COMP2907
- COMP5211
17
7/29/2019 01a Introduction v2(1)
18/28
Algorithms then, and now
7/29/2019 01a Introduction v2(1)
19/28
What's in an algorithm?
Algorithms can have huge impact
For example- A report to the White House from 2010 includes the following.
Professor Martin Grotschel
A benchmark production planning model solved using linearprogramming would have taken 82 years to solve in 1988, using the
computers and the linear programming algorithms of the day.
Fifteen years later, in 2003, this same model could be solved in
roughly 1 minute, an improvement by a factor of roughly
43 million
7/29/2019 01a Introduction v2(1)
20/28
What's in an algorithm?
In 2003 we can solve a problem 43 million times faster than in 1988
This is because of better hardware and better algorithms
7/29/2019 01a Introduction v2(1)
21/28
1988 ?
In 1988
Intel 386 and 386SX
About 275,000 transistors
clock speeds of 16MHz,20MHz, 25MHz, and
33MHz
MSDOS 4.0 and windows 2.0
VGA
Mobile phones are the size of
a brick
People dress funny and listen
to unbearable music
In 2003
Pentium M
About 140 million
transistors
Up to 2.2 GHz
AMD Athlon 64
Windows XP
iTunes
7/29/2019 01a Introduction v2(1)
22/28
22
Images from wikipedia, CC licence
Source: Rico Shen
7/29/2019 01a Introduction v2(1)
23/28
What's in an algorithm?
Report to the White House from 2010 includes the following.
Professor Martin Grotschel:
A benchmark production planning model solved using linear
programming would have taken 82 years to solve in 1988, using the
computers and the linear programming algorithms of the day.
Fifteen years later, in 2003, this same model could be solved in
roughly 1 minute, an improvement by a factor of roughly
43 million
Hardware: 1,000 times improvement
Algorithms: 43,000 times improvement
http://www.whitehouse.gov/sites/default/files/microsites/ostp/pcast-nitrd-report-2010.pdfhttp://www.whitehouse.gov/sites/default/files/microsites/ostp/pcast-nitrd-report-2010.pdf7/29/2019 01a Introduction v2(1)
24/28
Efficient algorithms
Efficient algorithms produce results within available resource limits
In practice
Low polynomial time algorithms behave well
Exponential running times are infeasible except for very small instances, or carefully designedalgorithms
Performance depends on many obvious factors
Hardware
Software
Algorithm
Implementation of the algorithm
This unit: Analysis of algorithms, and
a little bit of implementation of algorithms
7/29/2019 01a Introduction v2(1)
25/28
Efficient algorithms
Efficient algorithms do the job the way you want them to...
Dealing with huge data?
Do you need the exact solution?
Are you dealing with some special case and not with a general problem?
Is it ok if you miss the right solution sometimes?
7/29/2019 01a Introduction v2(1)
26/28
Efficient algorithms
Complex, highly sophisticated algorithms can greatly improve
performance
apart from that...
Reasonably good algorithmic solutions that avoid simple, or lazy
mistakes, can have even greater contribution
7/29/2019 01a Introduction v2(1)
27/28
List of topics
Greedy algorithms
Divide and conquer
Dynamic programmingNetwork flows, maxflow
Mincut theorems
Complexity theory
P, NP, and NP-completenessIntractability
Approximation, Randomization
Optimization problems
7/29/2019 01a Introduction v2(1)
28/28
Preliminary List of topics
Week 1 Unit introduction, algorithms and complexity
Week 2 Introduction to graph algorithms, Intro to greedy
Week 3 Greedy algorithms
Week 4 Divide and conquer
Week 5 Dynamic programming
Week 6 Network flows, maxflow
Week 7 Mincut theorems, matching
Week 8 Other Max-flow and min-cut applications, Intro to complexity theory
Week 9 Complexity theory: Polynomial time reductions, P, NP, and NP-completeness Week 10 Intractability
Week 11 Coping with hardness: Solving special cases, approximation, randomization
Week 12 Optimization problems
Week 13 Review
Note: The following list of topics may change