COMPSCI 170 Study Guide - Midterm Guide: Acm International Collegiate Programming Contest, Longest Increasing Subsequence, Disjoint Sets

29 views12 pages
8 Jan 2019
School
Professor

Document Summary

True, of course: integer factorization is the problem of determining whether a number is not prime. True, given a non-prime n and a proper divisor p of n, it is easy to verify in polynomial time that n is not prime. Hence the above problem is in np: the ford-fulkerson algorithm can be used to nd the maximum ow through a graph with cycles. True, ford-fulkerson works for any graph: all hu man encoding trees are full binary trees. (that is, each node has zero or two children. ) True, by de nition of hu man encoding trees: if a linear program has an unbounded value, then its dual is also unbounded. The reason is that we can give dollar to each of n nodes, and this node can use this node to pay for the change in its parent pointer during path compression.