Practice 6
I checked solution descriptions and solutions in for the problems in practice 6.
Additional resources:
I checked solution descriptions and solutions in for the problems in practice 6.
Additional resources:
I checked solution descriptions and solutions in for the problems in practice 5.
Additional resources include a slide set by Kleinberg/Tardos
I checked solution descriptions and solutions in for the problems in practice 4.
Additional resources
I checked solution descriptions and solutions in for the problems in practice 3.
Additional resources
heapq, Java: PriorityQueue, C++: priority_queue) with O(E log V) or O(m log n).I checked solution descriptions and solutions in for the problems in practice 2.
Additional resources
Note that our handbook code (Java/C++) implements a space-efficient version of union-by-rank with path compression.
I checked solution descriptions and solutions in for the problems in practice 1.
Competitive Programmer's Handbook by Antti Laaksonen contains a nice overview of different complexity classes.
I also updated the pickup sticks example to include DFS versions of the topological sorting algorithms in Python and Java.
Take note of the required increase in the recursion limit.
In Java, nothing is required in your source code, but you must
run the code with an increased stack size as
described here.
Use -Xss64m.
In Python, do
import sys
sys.setrecursionlimit(...)
This is all that's necessary for Kattis, but on some systems (where
there is a lower OS stack limit), you must add a call to setrlimit.
So the complete incantation is:
import sys, resource
sys.setrecursionlimit(2000000)
resource.setrlimit(resource.RLIMIT_STACK, (-1, -1))
We discussed Pick up Sticks today.
The 2 solutions to Pickup Sticks developed in class today are here.
If you like to read more about Kahn's algorithm, here are some external resources:
Try coding this algorithm yourself and check if your submission passes!
I will be keeping this semester's programs in a git repository on our git.cs.vt.edu server to which you can get access via your CS account. The URL is https://git.cs.vt.edu/gback/icpc-fall-2023
Welcome to the new website of the VT ICPC team.
Information about the class/team is here.