Upload
rohit-kumar-singh
View
15
Download
1
Embed Size (px)
Citation preview
SPLIT AND LISTEXACT EXPONENTIAL ALGORITHMS
CHAPTER 9
Rohit Kumar SinghImai Lab Reading CircleJune 17th, 2015
EXACT EXPONENTIAL ALGORITHMS (CHAPTER 9) 2
OUTLINE:
•Introduction•Split and List [Williams, 2007]
•Sort and Search•2-TABLE Problem•Subset Sum•Exact Satisfiability (XSAT)•Binary Knapsack•K-TABLE problem
•Maximum CutJune 17, 2015
EXACT EXPONENTIAL ALGORITHMS (CHAPTER 9) 3
INTRODUCTION:
Split the input of a problem into sub-
problems.
List all possible solutions to each
sub-problem.
Combine solutions of all sub-problems
using fast polynomial time
algorithms to obtain complete solution
June 17, 2015
EXACT EXPONENTIAL ALGORITHMS (CHAPTER 9) 4
SORT AND SEARCH:
Lexicographical Order (:On a vector space over rational number set Vectors = (), = () , then we define that xyif and only if Such that for all
Example:1. (2,4,8,3) (2,7,2,4)2. (2,4,8,3) (2,4,8,3)
So we can also write if or
June 17, 2015
EXACT EXPONENTIAL ALGORITHMS (CHAPTER 9) 5
2-TABLE PROBLEM:
Given:
Two tables and of size x , and a vector
Each table consists of columns of size from vector space
Goal:
: A column from Table
: A column from Table
+ = An instance of 2-TABLE problem consists of entries from
June 17, 2015
EXACT EXPONENTIAL ALGORITHMS (CHAPTER 9) 6
2-TABLE PROBLEM…
Example:
Let vector
Then there are two solutions
Running Time:• Trivial solution is to enumerate all pairs of columns• Each comparisons will take • Number of pairs of vectors is • Total running time required is
June 17, 2015
EXACT EXPONENTIAL ALGORITHMS (CHAPTER 9) 7
2-TABLE PROBLEM…
Lemma 9.1The 2-TABLE problem for tables and of size x with entries from can be solved in time log.
1. Sort table vectors increasingly in lexicographic order.2. Sort table vectors decreasingly in lexicographic order.3. Two vectors comparison will take time .4. Consequently sorting can be done in time log.
June 17, 2015
EXACT EXPONENTIAL ALGORITHMS (CHAPTER 9) 8
LEMMA 9.1…
Given sorted vector sequences increasing and decreasing in lexicographical order respectively.
June 17, 2015
EXACT EXPONENTIAL ALGORITHMS (CHAPTER 9) 9
SUBSET SUM:[HOROWITZ, SAHNI, 1974]
Given:
Positive integers , and
Goal:
Find a subset such that
Example: and the solution is
June 17, 2015
EXACT EXPONENTIAL ALGORITHMS (CHAPTER 9) 10
SUBSET SUM…[HOROWITZ, SAHNI, 1974]
Theorem 9.2.
1. Partition into two sets and 2. Compute set of all possible subset sums for both sets and 3. Let and where and such that 4. To find and we reduce the problem into 2-TABLE problem.5. Table and is formed by elements of and 6. Both table sizes will be x , where and 7. Using Lemma 9.1, we can calculate two elements (, ) in =
June 17, 2015
EXACT EXPONENTIAL ALGORITHMS (CHAPTER 9) 11
EXACT SATISFIABILITY (XSAT):
Given:
A CNF-formula (Conjunctive Normal Form) with variables and clauses.
Goal:
A satisfying assignment of such that each clause contain exactly one true literal.Example:For CNF Formula : Satisfied by truth assignment true, false, and true
June 17, 2015
EXACT EXPONENTIAL ALGORITHMS (CHAPTER 9) 12
EXACT SATISFIABILITY (XSAT)…
Theorem 9.3
1. Let be an input of 2. Set and are sets of clauses and variables respectively for .3. Split variable set into two sets and 4. For every possible truth assignment f (true, false) to variables of , calculate
characteristic vector . The coordinate of is total count of true for literals in clause .
5. Repeat step four for variable set and calculate . The coordinate of is total count of true for literals in clause .
6. is exactly satisfied if and only if + .7. Form two tables from characteristic vectors of set and .8. Each table has at most columns. Using Lemma 9.1, solve in June 17, 2015
EXACT EXPONENTIAL ALGORITHMS (CHAPTER 9) 13
SOLVING SAT IN
Because:
•We required to find characteristic vector such that,
•Above condition is real obstacle for using Lemma 9.1
Argument:
• then for every does not hold anymore.
• So enumerating all possible pairs of vectors is the only solution in worst case.
June 17, 2015
EXACT EXPONENTIAL ALGORITHMS (CHAPTER 9) 14
BINARY KNAPSACK:[SCHROEPPEL, SHAMIR, 1981]
Given:
Positive integer and items ,
Each item has value and its weight which are integers.
Goal:
Find such that, and is maximized
June 17, 2015
EXACT EXPONENTIAL ALGORITHMS (CHAPTER 9) 15
MODIFIED 2-TABLE PROBLEM:
Given:
Two tables and of size x having integers and an integer
Goal:
Find one number from each table whose sum is at most
Example:
For the solution is the pair of integers
June 17, 2015
EXACT EXPONENTIAL ALGORITHMS (CHAPTER 9) 16
MODIFIED 2-TABLE PROBLEM…
MODIFIED 2-TABLE problem can be solved in time with algorithm similar to 2-table
1. First sorts entries of in increasing and in decreasing order. Let and . 2. If , then all in yields Therefor all such pairs can be discarded for
consideration.3. Similarly, if , then all in yields . Therefor all such pairs can be discarded for
consideration.4. Initial sorting requires time and pair finding will take steps.
June 17, 2015
EXACT EXPONENTIAL ALGORITHMS (CHAPTER 9) 17
BINARY KNAPSACK…[SCHROEPPEL, SHAMIR, 1981]
Theorem 9.4
1. Split the set of items in two subsets and 2. For each subset , construct a couple , where , and .3. Put all couples in set whose cardinality is at most .4. Repeat step two to construct where and step three to obtain couples set .5. Find couples and such that is maximum and . 6. Remove couples dominated by other couples by preprocessing in order to
convert the instance into Modified 2-TABLE problem.
June 17, 2015
EXACT EXPONENTIAL ALGORITHMS (CHAPTER 9) 18
BINARY KNAPSACK…[SCHROEPPEL, SHAMIR, 1981]
…Preprocessing Steps:1. Sort items of in increasing order of their weight , where .2. For every , we define and move into the list from to .3. If , replace otherwise , we remove .4. Step 1-3 is repeated for set .
5. We have and , and maximum sum subject to .6. Construct a table of size x and and to implement MODIFIED 2-TABLE.7. Total running time = Sorting time + finding set with no dominant couple in
time .8. Total time =
June 17, 2015
EXACT EXPONENTIAL ALGORITHMS (CHAPTER 9) 19
K-TABLE PROBLEM:
Given:
tables of size x with entries from
Goal:
For a given vector , find the set of vectors such that,
Time Complexity:
-TABLE problem can be solved in time
June 17, 2015
EXACT EXPONENTIAL ALGORITHMS (CHAPTER 9) 20
K-TABLE PROBLEM…
•-TABLE problem uses and hence useful in reducing space requirement by algorithms we discussed.
•-TABLE problem is used by [Schroeppel, Shamir, 81] to reduce the space requirement to
Example:• Problem like can be split into subsets.• Then construct sets of vector for each table.• By using -TABLE algorithm recursively, -TABLE problem of can be solved in
time
June 17, 2015
EXACT EXPONENTIAL ALGORITHMS (CHAPTER 9) 21
MAXIMUM CUT:
Product of x matrices in time , where called square matrix multiplication exponent.
Given:
Undirected graph
Goal:
Find set maximizing the value of
Example:
and June 17, 2015
EXACT EXPONENTIAL ALGORITHMS (CHAPTER 9) 22
MAXIMUM CUT…
Theorem 9.5 [Itai, Rodeh, 1978]
1. Let be the adjacency matrix of G.2. power of of the entry on the main diagonal of is equal to number of walks of
length which starts and ends at vertex .3. A walk of length 3 = triangle, so non-zero entries at the diagonals of assures
triangles in G. 4. Time required is .5. Space requirement is proportional to size of , which is .
June 17, 2015
EXACT EXPONENTIAL ALGORITHMS (CHAPTER 9) 23
MAXIMUM CUT…[WILLIAMS, 2007]
Theorem 9.6-.
• Let is a graph on vertices and . Let are partitions of into sets of sizes • Construct a auxiliary weighted directed graph as follow:1. subset , graph has vertex 2. Total vertices in is x . 3. has all possible pairs of arcs between where , and .4. Total number of arcs in x .5. Define weight for for every arc , and , as
June 17, 2015
EXACT EXPONENTIAL ALGORITHMS (CHAPTER 9) 24
MAXIMUM CUT…[WILLIAMS, 2007]
Claim: The following properties are equivalent There is such that The contains directed triangle , such that
:1. put 2. Every edge if is edge between and otherwise to the sum
3. put ,4. Every edge e counted in is same as counted in sum
June 17, 2015
EXACT EXPONENTIAL ALGORITHMS (CHAPTER 9) 25
MAXIMUM CUT…[WILLIAMS, 2007]
1. To proof claim holds, we try all possible values of .2. For every triple such that , construct subgraph of having only arcs of weight
from to .3. For , number of such triples is .4. The subgraph for all arcs of can be constructed in time . 5. contains triangle can be verified in time using Theorem 9.5 .6. The total running time is .
June 17, 2015
EXACT EXPONENTIAL ALGORITHMS (CHAPTER 9) 26
REFERENCES:
Williams, R.: Algorithms and resource requirements for fundamental problems. Ph.D. thesis, Carnegie Mellon University (2007)
Horowitz, E., Sahni, S.: Computing partitions with applications to the knapsack problem. J. ACM 21, 277–292 (1974)
Schroeppel, R., Shamir, A.: A T = O(2n/2), S = O(2n/4) algorithm for certain NP-completeproblems. SIAM J. Comput. 10(3), 456–464 (1981)
Itai, A., Rodeh, M.: Finding a minimum circuit in a graph. SIAM J. Comput. 7(4), 413–423 (1978)
Coppersmith, D., Winograd, S.: Matrix multiplication via arithmetic progressions. J. Symbolic Comput. 9(3), 251–280 (1990)
June 17, 2015