1 EE5900 Advanced Embedded System For Smart Infrastructure Advanced Theory.

Slides:



Advertisements
Similar presentations
Completeness and Expressiveness
Advertisements

Minimum Clique Partition Problem with Constrained Weight for Interval Graphs Jianping Li Department of Mathematics Yunnan University Jointed by M.X. Chen.
MCS 312: NP Completeness and Approximation algorithms Instructor Neelima Gupta
1 EE5900 Advanced Embedded System For Smart Infrastructure Static Scheduling.
Lecture 23. Subset Sum is NPC
Section 11 Direct Products and Finitely Generated Abelian Groups One purpose of this section is to show a way to use known groups as building blocks to.
1 NP-completeness Lecture 2: Jan P The class of problems that can be solved in polynomial time. e.g. gcd, shortest path, prime, etc. There are many.
EE 4271 VLSI Design1 Logic Synthesis. Starts from RTL description in HDL or Boolean expressions Outputs a standard cell netlist EE 4271 VLSI Design2.
Week 21 Basic Set Theory A set is a collection of elements. Use capital letters, A, B, C to denotes sets and small letters a 1, a 2, … to denote the elements.
COUNTING AND PROBABILITY
Parallel Scheduling of Complex DAGs under Uncertainty Grzegorz Malewicz.
Lecture 5 Set Packing Problems Set Partitioning Problems
Applied Discrete Mathematics Week 11: Graphs
Counting Techniques: Combinations
The number of edge-disjoint transitive triples in a tournament.
Complexity 11-1 Complexity Andrei Bulatov NP-Completeness.
Lecture 14: Oct 28 Inclusion-Exclusion Principle.
Chapter 4: Probability (Cont.) In this handout: Total probability rule Bayes’ rule Random sampling from finite population Rule of combinations.
Orthogonality and Least Squares
Linear Programming Applications
1 Lecture 4 Maximal Flow Problems Set Covering Problems.
- ABHRA DASGUPTA Solving Adhoc and Math related problems.
GRAPH Learning Outcomes Students should be able to:
Stochastic Methods A Review (Mostly). Relationship between Heuristic and Stochastic Methods  Heuristic and stochastic methods useful where –Problem does.
The Theory of NP-Completeness 1. What is NP-completeness? Consider the circuit satisfiability problem Difficult to answer the decision problem in polynomial.
Copyright © Cengage Learning. All rights reserved. CHAPTER 9 COUNTING AND PROBABILITY.
Discrete Mathematical Structures (Counting Principles)
Basic Concepts of Discrete Probability (Theory of Sets: Continuation) 1.
9.3 Addition Rule. The basic rule underlying the calculation of the number of elements in a union or difference or intersection is the addition rule.
Fall 2002CMSC Discrete Structures1 One, two, three, we’re… Counting.
Elements of Combinatorics (Continuation) 1. Pigeonhole Principle Theorem. If pigeons are placed into pigeonholes and there are more pigeons than pigeonholes,
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
The Train Marshalling Problem Joe Ryan University of Ballarat joint work with Elias Dahlhaus, Peter Horak and Mirka Miller.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
Approximation Schemes Open Shop Problem. O||C max and Om||C max {J 1,..., J n } is set of jobs. {M 1,..., M m } is set of machines. J i : {O i1,..., O.
The Theory of Complexity for Nonpreemptive Scheduling 1.
1 Prune-and-Search Method 2012/10/30. A simple example: Binary search sorted sequence : (search 9) step 1  step 2  step 3  Binary search.
Chapter 2: Probability · An Experiment: is some procedure (or process) that we do and it results in an outcome. A random experiment: is an experiment we.
Mathematical Proofs. Chapter 1 Sets 1.1 Describing a Set 1.2 Subsets 1.3 Set Operations 1.4 Indexed Collections of Sets 1.5 Partitions of Sets.
Copyright © Cengage Learning. All rights reserved.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
Chapter SETS DEFINITION OF SET METHODS FOR SPECIFYING SET SUBSETS VENN DIAGRAM SET IDENTITIES SET OPERATIONS.
The Pigeonhole Principle. The pigeonhole principle Suppose a flock of pigeons fly into a set of pigeonholes to roost If there are more pigeons than pigeonholes,
Instructor Neelima Gupta Table of Contents Class NP Class NPC Approximation Algorithms.
1.1 Chapter 3: Proving NP-completeness Results Six Basic NP-Complete Problems Some Techniques for Proving NP-Completeness Some Suggested Exercises.
Lecture.6. Table of Contents Lp –rounding Dual Fitting LP-Duality.
CS6045: Advanced Algorithms NP Completeness. NP-Completeness Some problems are intractable: as they grow large, we are unable to solve them in reasonable.
Chapter 8: Relations. 8.1 Relations and Their Properties Binary relations: Let A and B be any two sets. A binary relation R from A to B, written R : A.
NP-completeness NP-complete problems. Homework Vertex Cover Instance. A graph G and an integer k. Question. Is there a vertex cover of cardinality k?
CSC 413/513: Intro to Algorithms
Copyright © Cengage Learning. All rights reserved. CHAPTER 8 RELATIONS.
Chapter 9: Graphs.
2/24/20161 One, two, three, we’re… Counting. 2/24/20162 Basic Counting Principles Counting problems are of the following kind: “How many different 8-letter.
1 © 2011 Professor W. Eric Wong, The University of Texas at Dallas Requirements-based Test Generation for Functional Testing W. Eric Wong Department of.
12. Lecture WS 2012/13Bioinformatics III1 V12 Menger’s theorem Borrowing terminology from operations research consider certain primal-dual pairs of optimization.
Introduction to NP Instructor: Neelima Gupta 1.
NP Hard Problems Instructor Neelima Gupta Presentation Edited by Sapna Grover.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
CHAPTER SIX T HE P ROBABILISTIC M ETHOD M1 Zhang Cong 2011/Nov/28.
The Relation Induced by a Partition
What is Probability? Quantification of uncertainty.
Chapter 2 Sets and Functions.
Finding Large Set Covers Faster via the Representation Method
EE4271 VLSI Design Logic Synthesis EE 4271 VLSI Design.
Venn Diagrams and Partitions
COUNTING AND PROBABILITY
Chapter 2.3 Counting Sample Points Combination In many problems we are interested in the number of ways of selecting r objects from n without regard to.
CSE 6408 Advanced Algorithms.
Counting Elements of Disjoint Sets: The Addition Rule
A Few Sample Reductions
Presentation transcript:

1 EE5900 Advanced Embedded System For Smart Infrastructure Advanced Theory

3DM to Numerical 4DM First show that numerical 4DM is NP- complete. Reduce from 3DM. 4DM problem says that given four sets S1,S2,S3,S4, each of which consists of q distinct elements, and a collection C=S1S2S3S4, one asks whether there exists a subcollection C’ to partition the union of four sets and the sum of values of each set in C’ is B. 2

Reduce from 3DM to numerical 4DM Create four elements for each candidate set (x a,y b,z c ) in M. e 1 in S 1, e 2 in S 2, e 3 in S 3 and e 4 in S 4. If x a is in the candidate set, create an element e 1 with value either 2q 3 +aq 2 (core) or aq 2 (dummy). If y b is in the candidate set, create an element e 2 with value either bq (core) or q 3 +bq (dummy). If z c is in the candidate set, create an element e 3 with value either c (core) or q 3 +c (dummy). create an element e 4 with value 2q 3 -aq 2 -bq-c. If there is only one occurrence of a variable (e.g., x1) in M, then there is only one core element generated. If there are k occurrences (e.g., z7) in M, then there are k elements generated where contains one core element and k-1 dummy elements. Note that different elements can have the same value. Candidate sets in 4DM is created such that it contains either all core elements or all dummy elements. Enumerate all possible candidate sets. Set B=4q 3. 3

Reduction example Suppose that the candidate sets M in 3DM is as follows. (x 1,y 5,z 7 ), (x 2,y 2,z 7 ), (x 2,y 5,z 5 ) … (x 1,y 5,z 7 ) produces e 11 with value 2q 3 +q 2, e 21 with value 5q, e 31 with value q 3 +7, e 41 with value 2q 3 -q 2 -5q-7. (x 2,y 2,z 7 ) produces e 12 with value 2q 3 +2q 2, e 22 with value 2q, e 32 with value 7, e 42 with value 2q 3 -2q 2 -2q-7. (x 2,y 5,z 5 ) produces e 13 with value 2q 2, e 23 with value q 3 +5q, e 33 with value 5, e 43 with value 2q 3 -2q 2 -5q-5. If (x 1,y 5,z 7 ) is picked in M, we pick (e 11 e 21 e 32 e 41 ). Since (x 2,y 2,z 7 ), (x 2,y 5,z 5 ) are not picked, we pick (2q 2 q 3 +2q e 31 e 42 ) and (2q 2 e 23 e 33 e 43 ). The elements with values are those generated from other candidate sets in M. e 12 e 22 e 13 are not picked and they will be picked corresponding to some sets picked in M. 4

If direction When there is solution of 3DM problem, If a set is picked in 3DM, the corresponding core set is picked in numerical 4DM. Otherwise, the corresponding dummy set is picked. Each variable is picked exactly once in 3DM, so each core element is picked exactly once. Note that core elements generated from multiple sets in M could be combined together and picked (since we enumerate candidate sets in numerical 4DM). Given k occurrences of a variable in M, they are in k candidate sets in M. One of them is picked (so is the corresponding core element), and k-1 of them is not picked (so the corresponding k-1 dummy elements are picked). Thus, each generated element is picked exactly once. There is only one e4 for each set in M, which will be used to make the sum of values 4q 3. This is the subcollection of sets to partition the union of four sets and each set with the sum of values to be B. 5

Only if direction Given a solution to numerical 4DM, each core element is covered exactly once. There exists sets which contain only the core elements and one can pick the corresponding sets in M. 6

Numerical 4DM to Numerical 3DM Given a numerical 4DM instance, we have four sets S1, S2, S3, S4. We create three new sets T1, T2, T3. –T1 = S1 ⋃ P where P=S3 S4 are pairing elements –T2= S2 ⋃ S3 ⋃ F where F are fillers and |F|=q 2 -q –T3=S4 ⋃ P’ where P’ are copairing elements Form the collection as follows 7

Form Collection (t1,t2,t3) can be formed as the elements from the following sets through enumeration –(S1,S2,P’) –(P,S3,S4) –(P,F,P’) Weighting functions –w1’(p)=3B-w3(s3)-w4(s4) –w1’(s1)=w1(s1) –w2’(s2)=w2(s2)+2B –w2’(s3)=w3(s3)+4B –w2’(f)=0 –w3’(s4)=w4(s4) –w3’(p’)=4B+w3(s3)+w4(s4) 8

Only if direction When there is a solution for numerical 4DM, for each selected candidate set (s1,s2,s3,s4), we pick (t1,t2,t3) as (s1,s2,p’(s3,s4)) and (p(s3,s4),s3,s4). Since |S1|=|S2|=|S3|=|S4|=q, we have picked 2q sets for numerical 3DM. Since |T1|=|T2|=|T3|=q 2 +q, we need to pick q 2 -q sets. They are (p,f,p’). The sum of each set is 7B 9

If Direction When there is a solution for numerical 3DM, since there are only q 2 -q filler elements, we need to pick at least 2q sets in the form of (s1,s2,p’) or (p,s3,s4) to cover all elements. Note that |S1|=|S2|=|S3|=|S4|=q, so there are only q sets of (s1,s2,p’) and q sets of (p,s3,s4). Since |P|=q 2, there are only q sets of (p,s3,s4) which can be picked since other |P| are picked with fillers. Similarly, since |P’|=q 2, there are only q sets of (s1,s2,p’) which can be picked. One then correspondingly picks (s1,s2,s3,s4) Each set has sum 7B in numerical 3DM, and thus each set has sum B in numerical 4DM 10

Numerical 3DM to 3Partition Given a set S of 3m elements where each element a has a value v(s) and ∑ s ∈ S v(s)=mB, one asks whether S can be partitioned into m disjoint subsets S 1,S 2,…,S m such that for each subset ∑ s ∈ Si v(s)=B? Reduce from Numerical 3DM with sum target B’. Form the set S as T1 ⋃ T2 ⋃ T3 and set w(s)=w’(t)+3iB’ where i = 1,2,3. Set B=19B’. 11

Reduction When there is a solution for Numerical 3DM, one accordingly partition the sets and each set has sum 19B’ since the sum of elements in each set in the solution for numerical 3DM is B’. When there is a solution for 3Partition, one accordingly picks the sets in numerical 3DM. 12

3Partition to Nonpreemptive Scheduling Given an instance of 3partition, form an instance of nonpreemptive scheduling problem which contains 3m+1 tasks, T 1,T 2,…,T 3m+1 as follows. For each element s i, create a task T i with p=d=mB+m and c=v(s i ). Create a task T 3m+1 with p=B+1 and d=c=1. We claim that the task set is schedulable if and only if the 3partition instance is feasible. 13

Only if direction When the task set is schedulable –Task T 3m+1 is scheduled at time 0, B+1, 2(B+1), … –Consider the hyper period mB+m. All of the first 3m tasks need to be scheduled within it. –During this hyper period, T 3m+1 has run for m times with total time m. –Thus, mB time is for all other tasks. –The available time between the first and the second T 3m+1 is B. –The task set between them has total time bounded by B. Let S1 denote the corresponding set in S, so ∑ s ∈ S1 v(s) ≦ B –Similarly, ∑ s ∈ Si v(s) ≦ B for all 1 ≦ i ≦ m since T 3m+1 has run for m times –On the other hand, ∑ s ∈ S1 v(s) + ∑ s ∈ S2 v(s) +…+ ∑ s ∈ Sm v(s)=mB. One has that each ∑ s ∈ Si v(s)=B. 14

If direction When there is a feasible 3partition solution, –One can schedule T 3m+1 at time 0, B+1, 2(B+1),… –One then puts the other tasks according to the 3partition solution 15