Download presentation
Presentation is loading. Please wait.
Published byLisa Kennedy Modified over 8 years ago
1
Honors Track: Competitive Programming & Problem Solving Seminar Topics Kevin Verbeek
2
Seminar Seminar: You give the lectures! Setup You pick a topic… You investigate the topic/problem/algorithm You choose which aspects to present You prepare a presentation You give the presentation! Picking a topic Everybody gives a presentation We provide topics You give preferences for each topic We assign topics using maximum weighted bipartite matching
3
Push-relabel algorithm Another algorithm to compute maximum flow s = 0 t = 5 1 2 3 4 0/3 0/2 0/1 0/2 0/3 0/2 0/1 Can run in O(V 2 √E ) time Usually faster than other algorithms
4
Avoiding negative edges Problem Dijkstra’s algorithm does not work with negative weight edges Johnson’s algorithm All-pairs shortest path for sparse graphs with negative weights Suurballe’s algorithm Finding two disjoint paths of minimum length
5
Min-cost flow problem Min-cost flow: Same as maximum flow, except: Amount of flow is specified Every edge has weight Goal is to minimize flow x weight s = 0 t = 5 1 2 3 4 0/3 0/2 0/1 0/2 0/3 0/2 0/1 1 4 7 5 3 9 2 4 8
6
Stable Marriage Stable Marriage Problem A type of stable bipartite matching problem Every node has preferences Matching is stable if there is no pair (a, b) that prefer each other over their current matches A stable matching always exists
7
Layered graphs Layered graph technique Solving a graph problem with additional parameters Copy the graph several times into different layers Add cross-edges between layers Use graph algorithm
8
A* A* algorithm Shortest path algorithm using heuristics for speed-up Speed-up based on estimating distance to goal Often useful in geometric settings
9
Tree isomorphism Graph isomorphism Checking if two graphs have the same structure Hard for general graphs (Recent: quasi-polynomial, not NP-hard) Polynomial-time algorithms for trees Similar techniques for decision diagram reduction
10
Tries Trie Data structure to store a set of strings Every node can have a child for each letter Efficient to insert and search
11
Binary Indexed Trees Efficient data structure for cumulative (range) queries Easy to implement Like range trees, but coordinates must be bounded Also for higher dimensions
12
Simple convex optimization Problem For a convex function f, find the x such that f(x) is minimum (or max) Also in higher dimensions Ternary search, golden section search, gradient descent, etc.
13
Polynomial interpolation Problem Given d+1 pairs (x i, y i ), construct a polynomial y = f(x) of degree d such that y i = f(x i ) for all i Usefulness To approximate complex function If you know solution behaves as low-degree polynomial
14
Basic number theory Prime number An integer > 1 that can only be divided by 1 or itself Finite field A finite set with proper definitions for +,-,x,/ Numbers modulo prime number form a finite field… … thus binary digits also form finite field E.g. Gaussian elimination also possible in finite field
15
Linear programming Optimize linear function under linear constraints Very powerful Polynomial-time algorithms exist Usually simplex method works well Can model e.g. min-cost flow problem Example Maximize 5x + 4y Subject to: 2x + y ≤ 6 3x + 5y ≤ 12 x, y ≥ 0
16
Impartial game theory Impartial game A 2-player game where allowable moves are player-independent Goal Come up with a winning strategy
17
(Partisan) Game theory Partisan game A (2-player) game that is not impartial Generally harder than impartial games Minimax strategies (often using dynamic programming) Alpha-beta pruning
18
2-SAT 2-Satisfiability Given a 2-CNF boolean formula, determine if boolean variables can be set so that the formula is true 2-CNF formula A conjuction of disjunctions with two arguments
19
Subset dynamic programming Dynamic programming where subproblems are represented as subsets Use bitmasks for representation Slightly faster than brute-force Example: TSP
20
Meet-in-the-middle Meet-in-the-middle approach Split problem in the middle Solve halves separately with brute-force Merge results Examples Bidirectional BFS 4SUM Subset sum
21
Solution analysis Finding properties of an optimal solution that helps you find it more efficiently Sometimes these solutions are called canonical solutions Very useful in geometry
22
Randomized algorithms Randomized algorithm An algorithm that uses randomness as part of its logic Can be used for a simple and efficient algorithm Running time is random variable Examples Randomized Quicksort Finding a line through many points LP-type problems (min. enclosing circle)
23
Delaunay triangulation Special type of triangulation of a set of points For every triangle: the circle through the vertices must be empty Dual to Voronoi diagram Can be computed in O(n log n) time, but not easy
24
Geometric duality Points are lines and lines are points A problem can be simpler in the geometric dual Other geometric dualities exist
25
3D Convex hull Convex hull For a given set of points, the smallest convex set containing the points Like a rubber band around the points In 3D also in O(n log n) time, but harder than Delaunay triangulation
26
Picking Topics Procedure Assign an integer weight between 1 and 23 to every problem All weights must be unique! 1. Push-relabel algorithm9. Binary Indexed Trees17. Subset DP 2. Avoiding negative edges10. Convex optimization18. Meet-in-the-middle 3. Min-cost flow11. Polynomial interpolation19. Solution analysis 4. Stable marriage12. Basic number theory20. Randomized algs 5. Layered graphs13. Linear programming21. Delaunay triangulation 6. A* algorithm14. Impartial game theory22. Geometric duality 7. Tree isomorphism15. (Partisan) game theory23. 3D convex hull 8. Tries16. 2-Satisfiability
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.