WITH COMMUNICATION COSTS in .NET Generating QR-Code in .NET WITH COMMUNICATION COSTS 42 WITH COMMUNICATION COSTSScanning QR Code 2d Barcode In Visual Studio .NETUsing Barcode Control SDK for .NET Control to generate, create, read, scan barcode image in Visual Studio .NET applications.NP-complete problems can be found in Coffman [37], Cormen et al [42], and Garey and Johnson [73] Theorem 41 (NP-Completeness) Let G = (V, E, w, c) be a task graph and P a parallel system The decision problem SCHED(G, P) associated with the scheduling problem is as follows Is there a schedule S for G on P with length sl(S) T , T Q+ SCHED(G, P) is NP-complete in the strong sense Proof First, it is argued that SCHED belongs to NP, then it is shown that SCHED is NP-hard by reducing the well-known NP-complete problem 3-PARTITION (Garey and Johnson [73]) in polynomial time to SCHED 3-PARTITION is NP-complete in the strong sense The reduction is inspired by a proof presented in Sarkar [167] The 3-PARTITION problem is stated as follows Given a set A of 3m positive integer numbers ai and a positive integer bound B such that 3m ai = mB with B/4 < i=1 ai < B/2 for i = 1, , 3m, can A be partitioned into m disjoint sets A1 , , Am (triplets) such that each Ai , i = 1, , m, contains exactly 3 elements of A, whose sum is B Clearly, for any given solution S of SCHED(G, P) it can be veri ed in polynomial time that S is feasible (Algorithm 5) and sl(S) T ; hence, SCHED(G, P) NP From an arbitrary instance of 3-PARTITION A = {a1 , a2 , , a3m }, an instance of SCHED(G, P) is constructed in the following way A so-called fork, or send, graph G = (V, E, w, c) is constructed as shown in Figure 42 It consists of |V| = 3m + 1 nodes (n0 , n1 , , n3m ), where node n0 is the entry node with 3m successors Hence, one edge goes from n0 to each of the other nodes of G and there are no other edges apart from these The edge weight of the 1 3m edges is c(e) = 2 e E, node n0 has weight w(n0 ) = 1, and the 3m nodes have weights that correspond to the integer numbers of A, w(ni ) = ai , i = 1, , 3m The number of processors of the target system is |P| = m and the time bound is set to T = B + 15 Clearly, the construction of the instance of SCHED is polynomial in the size of the instance of 3-PARTITION It is now shown how a schedule S is derived for SCHED(G, P) from an arbitrary instance of 3-PARTITION A = {a1 , a2 , , a3m }, that admits a solution to 3-PARTITION: let A1 , , Am (triplets) be m disjoint sets such that each Ai , i = 1, , m, contains exactly 3 elements of A, whose sum is BQR-Code Maker In .NETUsing Barcode generator for Visual Studio .NET Control to generate, create Quick Response Code image in .NET framework applications.Figure 42 The constructed task graph Reading QR Code In .NET FrameworkUsing Barcode recognizer for .NET Control to read, scan read, scan image in Visual Studio .NET applications.TASK SCHEDULING Drawing Barcode In .NET FrameworkUsing Barcode drawer for .NET framework Control to generate, create barcode image in .NET applications.Figure 43 Extract of the constructed schedule for P1 and Pi Bar Code Scanner In .NETUsing Barcode scanner for .NET framework Control to read, scan read, scan image in .NET applications.Node n0 is allocated to a processor, which shall be called P1 The remaining nodes n1 , , n3m are allocated in triplets to the processors P1 , , Pm Let ai1 , ai2 , ai3 be the elements of Ai The nodes ni1 , ni2 , ni3 , corresponding to the elements of triplet Ai , are allocated to processor Pi The resulting schedule is illustrated for P1 and Pi in Figure 43 What is the length of this schedule The time to execute ni1 , ni2 , ni3 on each processor is B, n0 is executed in 1 time unit, and the communication from n0 to 1 its successor nodes takes 2 time unit Hence, the nish time of all processors Pi , i = 2, , m, is tf (Pi ) = B + 15 Since the communication on P1 is local, the nish time on P1 is tf (P1 ) = B + 1 The resulting length of the constructed schedule S is sl(S) = B + 15 T and therefore the constructed schedule S is a solution to SCHED(G, P) Conversely, assume that an instance of SCHED admits a solution, given by the feasible schedule S with sl(S) T It will now be shown that S is necessarily of the same kind as the schedule constructed above In this schedule S, each processor can at most spend B time units in executing nodes from {n1 , , n3m } Otherwise the nish time of a processor, say, Pi , spending more that B time units is tf (Pi ) > w(n0 ) + B = 1 + B Due to the fact that all ai s (ie, node weights) are positive integers, this means that tf (Pi ) 2 + B However, this is larger than the bound T Furthermore, with 3m w(ni ) = mB and |P| = m, it follows that each processor i=1 spends exactly B time units in executing nodes from {n1 , , n3m } Finally, due to w(ni ) = ai , B/4 < ai < B/2, i = 1, , 3m, only three nodes can have the exact execution time of B Hence, the distribution of the nodes on the m processors corresponds to a solution of 3-PARTITION This proof demonstrated the NP-completeness of the scheduling problem SCHED in the strong sense (Garey and Johnson [73]) Alternatively, the NP-completeness can also be shown with a proof based on a reduction from PARTITION (Garey and Johnson [73]) Such a proof (Chr tienne [32]) is slightly less involved, but only demonstrates NP-completeness in the weak sense, since PARTITION is NP-complete in the weak sense In Exercise 43 you are asked to devise a proof based on PARTITIONDrawing QR Code In Visual C#.NETUsing Barcode drawer for .NET framework Control to generate, create QR Code 2d barcode image in VS .NET applications.QR Code ISO/IEC18004 Encoder In Visual Studio .NETUsing Barcode creation for ASP.NET Control to generate, create Quick Response Code image in ASP.NET applications.USS Code 128 Generation In Visual Studio .NETUsing Barcode encoder for .NET framework Control to generate, create USS Code 128 image in Visual Studio .NET applications.Generating EAN / UCC - 13 In VS .NETUsing Barcode encoder for .NET Control to generate, create EAN / UCC - 13 image in .NET applications.Drawing Bar Code In VB.NETUsing Barcode drawer for .NET framework Control to generate, create barcode image in .NET applications.EAN / UCC - 13 Creator In Visual C#Using Barcode printer for Visual Studio .NET Control to generate, create GS1 128 image in .NET framework applications.Code 39 Extended Printer In Visual C#.NETUsing Barcode maker for .NET Control to generate, create Code 39 Extended image in Visual Studio .NET applications.Encode Barcode In .NET FrameworkUsing Barcode printer for ASP.NET Control to generate, create barcode image in ASP.NET applications.