Phillip Trinh
COMP2007 Course Notes
1. Basics of algorithm design
1.1 When is an algorithm said to be of polynomial time?
An algorithm is said to be of polynomial time if its running time is upper bounded by a polynomial expression
in the size of the inp
Algorithms and Complexity
Divide and conquer
Julin Mestre
School of Information Technologies
The University of Sydney
Divide and conquer
Paradigm for designing algorithm based on the following idea:
- Break big problem into two or more smaller subproblems
Due: 5th of September 2016 at 11:59pm
COMP 2007 Assignment 2
All submitted work must be done individually without consulting someone elses solutions in accordance with the Universitys Academic Dishonesty and Plagiarism policies.
IMPORTANT! Questions 1a-c
Due: 22nd of August 2016 at 11:59pm
COMP 2007 Assignment 1
All submitted work must be done individually without consulting someone elses
solutions in accordance with the Universitys Academic Dishonesty and Plagiarism policies.
IMPORTANT! Questions 1 and 2
comp2007
Assignment 7
s2 2015
This assignment is due on September 14. All submitted work must be done individually without consulting someone elses solutions in accordance with the Universitys Academic Dishonesty and Plagiarism policies.
Problem 1. A part
Algorithms and Complexity
Network flows
Julin Mestre
School of Information Technologies
The University of Sydney
Bipartite matching
A matching M is a subset of edges where no two edges are
incident to the same vertex.
Matching model the assignment of appl
Algorithms and Complexity
Applications of max flow and min cut
Julin Mestre
School of Information Technologies
The University of Sydney
Recap from last week
An instance of the maximum flow problem is defined by a
directed graph G=(V,E), a pair s-t, and ca
Algorithms and Complexity
Dynamic programming
Julin Mestre
School of Information Technologies
The University of Sydney
A counting problem
How many way are there to go up a staircase with n steps when
you can go up one or two steps at a time?
Let F(n) be t
Algorithms and Complexity
Beyond NP-completeness:
Weak NP-completeness, coNP, and PSPACE
Julin Mestre
School of Information Technologies
The University of Sydney
Subset sum
Input:
- Set of n number A=cfw_a1, a2, ., an
- Target value T
Question:
- Is there
Algorithms and Complexity
NP-completeness
Julin Mestre
School of Information Technologies
The University of Sydney
Reductions
We have seen a number of reductions in the last few lectures:
- Maximum matching Maximum flow
- Minimum cut Maximum flow
- Open-p
Algorithms and Complexity
Coping with NP-hardness
Julin Mestre
School of Information Technologies
The University of Sydney
So the problem is NP-hard, now what?
Imagine that your boss asks you to develop a piece of software to
carry out a critical task in
Algorithms and Complexity
Greedy Algorithms
Julin Mestre
School of Information Technologies
The University of Sydney
Greedy algorithms
Greedy algorithms are the simplest kind of algorithms. There is no
formal definition, but they usually involve making in
Algorithms and Complexity / (Adv)
Algorithm Analysis
Julin Mestre
School of Information Technologies
The University of Sydney
Three abstractions
Problem:
- defines a computational task
- specifies what the input is and what the output should be
Algorithm:
Algorithms and Complexity
Dynamic programming
Julin Mestre
School of Information Technologies
The University of Sydney
RNA
RNA is a close relative of DNA but has
a single strand of genetic code
Unlike DNA, which folds into a double
helix shape, RNA folds
Algorithms and Complexity
Graphs: Representations and Exploration
Julian Mestre
School of Information Technologies
The University of Sydney
Undirected graphs
Let G=(V,E) be an undirected graph:
- V = set of vertices (a.k.a. nodes)
- E = set of edges
Some
Assignment 8
comp2007
s2 2015
This assignment is due on September 21. All submitted work must be done individually without consulting someone elses solutions in accordance with the Universitys Academic Dishonesty and Plagiarism policies.
Problem 1. So far