• 沒有找到結果。

Identifying all nonmajorized shapes and shape-types

Algorithm 1. (For enumerating all nonmajorized shapes in Γ(L, U ))

The input for the algorithm consists of integer p-vectors L and U that satisfy (1.1.1) and L ¿ U.

(a) For u = 1, ..., p and A ⊆ {1, ..., p} \ {u} do:

(i) Set B = {1, . . . , p} \ A \ {u}, UA = P

i∈AUi, LB = P

i∈BLi and Mu = n − UA− LB.

(ii) If Lu ≤ Mu ≤ Uu, set nj = {

Uj for j ∈ A , Lj for j ∈ B , Mu for j = u ,

and include (n1, . . . , np) in a temporary list that we denote TEMP.

(b) Test each shape in TEMP for being nonmajorized by testing if it majorized by any shape in TEMP.

The next lemma analyzes Algorithm 1. For the complexity analysis, com-putational effort counts arithmetic operations and comparisons.

Lemma 3.3.1. (a) At the end of step (a), TEMP contains all nonmajorized shapes.

(b) The output of Algorithm 1 consists of all nonmajorized shapes in Γ(L, U ).

(c) The computational time in executing step (a) of Algorithm 1 is bounded by O(p2p−1), and the computational time in executing the complete algorithm is bounded by O(p32p).

Proof. (a) Lemma 3.1.3 (part (b)) assures that at the completion of step (a), TEMP contains all nonmajorized shapes.

(b) As transitivity of the majorization relation assures that a majorized shape is majorized by some nonmajorized shape, a test for a shape to be nonmajorized is to compare it with all the shapes in TEMP.

(c) The number of iterations within step (a) is p2p−1. The initial calcula-tion of the quantity UA, LB and Mu requires p − 1 addition/subtraction and the updates within each iteration requires O(1) computational time. Hence, the total time to execute step (a) is O(p2p−1) and the output may contain up to p2p−1 shapes.

In step (b), each output shape of step (a) is tested against all others.

The test requires determining the order statistics of the shapes, creating their partial sums, and executing p comparisons for each pair of shapes. The total time is then bounded by O[(p + p lg p)p2p−1+ (p2p−1)2p] = O[p322p].

Given integer p-vectors L and U satisfying (1.1.1)–(1.1.2), the set of float-ing indices of (L, U ) is defined as {i = 1, . . . , p : Li < Ui}. Also, if G is the set as the availability under (L, U ). We say that the upper bound of index i is effective for (L, U ) if

Ui+X

j6=i

Lj ≤ n; (3.3.1)

when the upper bound of index i is not effective, we refer to the replacement of Ui by n −P

j6=i

Lj ≥ Li as the adjustment of the upper bound of i. Similarly, we say that the lower bound of index i is effective for (L, U ) if

Li+X

j6=i

Uj ≥ n, (3.3.2)

and if the lower bound of index i is not effective, we refer to the replacement of Li by n −P

j6=iUj ≤ Ui as the adjustment of the upper bound of i. Evidently, (1.2.6) and (1.1.1) stay in effect when an upper bound or a lower bound is adjusted.

Lemma 3.3.2. Consecutive adjustment of bounds results in a pair of vectors for which all bounds are effective, and this outcome is independent of the order in which bounds are adjusted.

Proof. Trivially, consecutive adjustment of bounds must terminate with a pair of vectors for which all bounds are effective.

Evidently, (1.2.6) and (1.1.1) stay in effect when a bound is adjusted.

Further, if the upper bound of i needs adjustment, all the lower bounds of indices j 6= i are effective throughout any sequence of adjustments; this is the

case because a decrease of an upper bound does not invalidate the effective-ness of a lower bound and an increase of a lower bound does not invalidate effectiveness of an upper bound. We conclude that if an upper/lower bound of i is adjusted, no lower/upper bound of another j 6= i will require adjust-ment. Further, the order of consecutive adjustment of upper bounds or of lower bounds has no effect on the outcome. The only remaining case is the adjustment of the upper bound and the lower bound of a particular i—it is easy to verify that here, too, the order of executing these adjustments does not influence the outcome.

We refer to the operation that is described in Lemma 3.3.2 as an ad-justment of the bounds. We observe that (1.2.6) assures that the bounds of indices that are not floating, are always effective and will therefore not be affected by an adjustment of the bounds. But, bound-adjusting can reduce the set of floating indices.

Algorithm 2. (For enumerating all nonmajorized shape-types in Γ(L, U ))

The input for the algorithm consists of integer p-vectors L and U that satisfy (1.2.6). Set r = 1.

Iteration r:

(a) Adjust the bounds (L, U ). Let F and v be the set of floating indices and the availability with respect to the adjusted bounds and set ni = Li = Ui for each i ∈ {1, . . . , p} \ F .

If F = ∅, set r = p and go to step (c). Otherwise, set α ≡ maxk∈F Uk and β ≡ mink∈FLk.

(b) Execute, in parallel and record separately the outcome of the following three steps:

(i) Select i as any index that maximizes the lower bound among those whose upper bound is α. Set ni ← Ui and Li ← Ui.

(ii) Select i as any index that minimizes the upper bound among those whose lower bound is β. Set ni ← Li and Ui ← Li.

(iii) This option is executed only if one identifies an index i that satisfies Ui = α > Uj for each j 6= i, Li = β < Lj for each j 6= i and F \ {i} can be partitioned into two sets A and B such that

|A| ≥ 2, |B| ≥ 2 (3.3.3) When the above holds with 3.3.4 in strict inequalities, do for each such pair A, B the following: Set nt ← Ut and Lt ← Ut for t ∈ A, ns ← Ls and such y exists, then output this shape-type as in the 3.3.4 in strict inequalities case.

Similarly, suppose ni = min

j∈ALj = Lz. Check the existence of a part w in A \ {z} such that |(Lz, Uz) ∩ (Lw, Uw)| ≥ 2. If no such w exists, then output this shape-type.

(c) If r = p, output the shape-types of all generated shapes in step (b)(i) and (b)(ii). Otherwise, replace r with r + 1 and go to step (a) with each outcome of step (b)(i) and of step (b)(ii).

Remarks.

(1)Step (b) of Algorithm 2 allows a selection between 3 options. Option (iii) can be executed only if one identifies an index i with Ui > Ujand Li < Lj for each j 6= i. When such an index i is identified, options (i) and (ii) will be executed with this particular selection of i. Option (iii) will then be followed for each partition of F \ {i} into sets A and B that satisfy (3.3.3)–(3.3.5). It is possible to have no such pair A, B, or alternatively, to have multiple pairs.

(2)Ambiguity can occur in Algorithm 2 only in steps (b)(i) and (b)(ii) when there is more than one index i with Ui = α and Li = max{Lk : Uk= α}

or, respectively, with Li = B and Ui = min{Uk : Lk = β}. In these cases, the corresponding outputs of the algorithm will obviously generate the same shape-types.

(3)Whenever option (b)(iii) is completed with a particular selection of A, B, there will be no free variables in the next iteration and the algorithm will stop.

(4)If in a given iteration, option (b)(i)/(b)(ii) selects index i whose up-per/lower bound was adjusted in that iteration, then the next iteration will have F = ∅ and the algorithm will stop.

(5)If at the beginning of an iteration there is only one index i with Li < Ui, then the adjustment of the bounds will result in F = ∅ and the algorithm will stop. In particular, as each iteration eliminates at least one free index, one will never enter step (b) in iteration p.

We refer to option (i), (ii) and (iii) in Algorithm 2 as, respectively, a U-step, an L-step and an E-step. We refer to an E-shape as one that is determined when an E-step is executed.

The next example shows how Algorithm 2 is executed without the need for an E-step.

Example 7. Applying Algorithm 2 to Example 5 is summarized in Figure 1.

18

The corresponding nonmajorized shapes are listed in Table 2.

The following examples demonstrate that there may be more than one option in executing step (b)(iii) of Algorithm 2 and that step (b)(i) (or (b)(ii)) may be followed even when step (b)(iii) is possible.

Example 8. U = (13, 12, 12, 8, 8, 4, 4), L = (1, 10, 10, 6, 6, 2, 2) and n = 49.

Then the nonmajorized shapes (13, 10, 10, 6, 6, 2, 2) and (1, 12, 12, 8, 8, 4, 4) are determined by following a U-step and an L-step, respectively, in the first iteration. We also find two shapes (5, 12, 12, 8, 8, 2, 2) and (9, 12, 12, 6, 6, 2, 2), by initial use of E-steps, corresponding respectively to the partitions A = {2, 3, 4, 5}, B = {6, 7} and A0 = {2, 3}, B0 = {4, 5, 6, 7}.

There are two partitions of the three groups {2, 3}, {4, 5}, {6, 7} of parts in Example 8 having, respectively, the same bounds. In general, g groups would yield up to g − 1 partitions.

Example 9. U = (11, 10, 10, 10, 7, 7, 7, 5, 3, 3, 3), L = (1, 9, 9, 9, 6, 6, 6, 4, 2, 2, 2) and n = 66. Then the nonmajorized shapes are: s1 = (11, 9, 9, 9, 6, 6, 6, 4, 2, 2, 2), s2 = (8, 10, 10, 10, 6, 6, 6, 4, 2, 2, 2), s3 = (5, 10, 10, 10, 7, 7, 7, 4, 2, 2, 2), s4 = (4, 10, 10, 10, 7, 7, 7, 5, 2, 2, 2) and s5 = (1, 10, 10, 10, 7, 7, 7, 5, 3, 3, 3).

Then s2 is an example of an E-shape with strict inequalities in (3.3.4), and s3 and s4 are examples of an E-shape with nonstrict inequalities in (3.3.4).

Example 10. U = (11, 9, 8, 10, 4, 4, 4, 4, 4), L = (3, 6, 6, 0, 2, 2, 2, 2, 2) and n = 43. If one starts with a U-step, an output can be determined in the next iteration by an E-step, or a U-step resulting, respectively, in the output (11, 9, 8, 5, 2, 2, 2, 2, 2) and (11, 6, 6, 10, 2, 2, 2, 2, 2). Alternatively, one may start with an L-step, which will eliminate the option of an E-step with i = 4;

then L1 will be adjusted to 6, and the output (11, 9, 8, 0, 4, 4, 4, 3, 2) can be generated.

The next lemma refers to sensitivity of being nonmajorized.

Lemma 3.3.3. Let {(Lj, Uj) | j = 1, . . . , p} and {(L0j, Uj0) | j = 1, . . . , p}

be two sets of bounds which differ only in one bound corresponding to part j where either Lj = L0j and Uj < Uj0, or Lj > L0j and Uj = Uj0. Then, for a given n, every shape in Γ(L, U ) is majorized by a nonmajorized shape in Γ(L0, U0).

Proof. Let s be a nonmajorized shape in Γ(L, U ). Then s is also a shape in Γ(L0, U0). Thus, it is either a nonmajorized shape, or is majorized by a nonmajorized shape in Γ(L0, U0).

By Lemma 3.3.4, we order the upper bounds such that Ui  Uj either if Ui > Uj or Ui = Uj but Li > Lj. Similarly, Li ≺ Lj either if Li < Lj or Li = Lj but Ui < Uj. Obviously, if Ui = Uj and Li = Lj, then the order between i and j does not matter. Under ≺, we have a linear order for the upper(lower) bounds.

Lemma 3.3.4. Let s be a shape output by Algorithm 2. Suppose Nk, con-sisting of j upper bounds and k − j lower bounds, is the set of values obtained

before an E-step in s (if no E-step occurs, then k = p). Let s0 be any other shape. If s0 majorizes s, then the j largest n0i and the k − j smallest n0i must be equivalent to Nk.

Proof. We prove Lemma 3.3.4 by induction on k. The case k = 1 is trivial.

Consider a general k. Without loss of generality, assume the first step of s is taking the largest upper bound U[1]. If the largest n0i < U[1]. Then s0 cannot majorize s. If they are equal, then by Lemma 3.3.3 we may assume s0 takes the same part as s. Delete this part from the problem and k is reduced to k − 1. Use induction.

Corollary 3.3.5. A regular shape output by Algorithm 2 is nonmajorized.

Theorem 3.3.6. (a)Every shape that is constructed by Algorithm 2 is non-majorized.

(b)For every nonmajorized shape, there is an equivalent shape that is con-structed by Algorithm 2.

(c)The number of outputs of the algorithm is bounded by 2p+1 (duplica-tions are possible).

(d)The computational time of all executions of Algorithm 2 is bounded by O(2p+ p2p−5log p).

Proof. (a) By Corollary 3.3.5, we only need to consider an E-shape s. Sup-pose to the contrary that s0 majorizes s. By Lemma 3.3.4, s0 majorizes s in the remaining p − k parts. But this is impossible by our construction of an E-shape whose largest k-sum, 1 ≤ k ≤ |A|, is ≥ the largest k-sum of s0, and whose smallest k-sum, 1 ≤ k ≤ |B|, ≤ the smallest |B|-sum of s0. This proves that for the remaining parts, s either majorize s0 or they are equivalent.

(b) Now, suppose at a given iteration, there exists a nonmajorized shape s which contains neither the maximum upper bound Ui nor the minimum lower bound Lj. Suppose i 6= j. Let s choose ni < Ui and nj > Lj. Since Ui > nj and ni > Lj, we can choose n0i = max{ni, nj} + 1 and n0j = min{ni, nj} − 1 to obtain a shape majorizing s, contradicting the assumption that s is nonmajorized.

Assume i = j but s takes ni such that Li < ni < Ui. By the comment after Lemma 3.3.3, Ui  Uj and Li ≺ Lj for any remaining part j.

Suppose there exists a part j such that Lj < ni < Uj. Without loss of generality, assume nj = Uj. Then s is majorized by s0 with n0i = Uj+ 1 and n0j = ni− 1.

Next suppose Lj = ni, which implies nj = Uj, i.e., j ∈ A. Suppose that there exists another part x in A such that (Lj, Uj) ∩ (Lx, Ux) 6= ∅. Then s is majorized by s0 with n0i = max{Uj, Ux} + 1, n0j = Lj, n0x = Ux− (n0i− Uj).

Note that if n0i = Ux + 1, then n0x = Uj − 1 ≥ Lx implies the part-j range and the part-x range must overlap by at least 2. We have shown that s can be a nonmajorized shape only if condition (3.3.4) is satisfied.

Finally, we justify (3.3.3). Suppose that there exists an E-shape s with

|A| = 1. Without loss of generality, assume U1 = max{Ui}, L1 = min{Li}, A = {2}, B = {3, 4, . . . , p}, L2 > n1 > Ui for all i ∈ B, and n = n1 + U2 + (L3 + L4 + · · · + Lp). Then U1 is adjusted to U10 such that U10 < U2

because U1 + (L2+ L3+ · · · + Lp) > n. Then s, as an non-E-shape, will be generated by selecting the largest upper bound U2. Therefore we can restrict our construction of E-shape under the conditions |A| ≥ 2 and |B| ≥ 2.

(c) The underlying graph of the part of Algorithm 2 yielding regular shapes is a complete binary tree with depth p − 1 (ni of the last part is determined by the previous p − 1 choices). Hence there are at most 2p−1 terminal points yielding 2p−1 regular shapes. At every path and every stage i, 1 ≤ i ≤ p − 4, an E-step may occur. The reason of the upper bound of i is due to 3.3.3 which specifies that at lest 5 parts remain for an E-shape to exist.

The maximum number of E-shapes at stage i is 1 + (n − i − 4), since the first A-set and the last B-set must contain at lest two parts, while the other A(B)-set can increase by 1. Summing over i, we obtain 2p−1+p−4P

i=1

2i(n − i − 3) = (32) × 2p−1+ 1.

(d) For easier analysis of time complexity, we write the subroutine which separates the remaining parts into A and B in pseudo code. Suppose the inputs are U = (U1, ..., Up), L = (L1, ..., Lp), and n. The outputs are all

possible combinations of A and B.

1: Obtain U1 ≥ U2 ≥ · · · ≥ Up by sorting U.

2: sep := L1

3: Determine the order statistic, say r, of sep in U.

4: for i = 2 to p do

11: Determine the order statistic, say r, of sep in U.

12: end if

13: end for

The running time in Line 1 needs O(p log p) to sort. Line 3 needs O(log p) by using binary search. The loop from Line 5 to 13 runs p − 1 times. Inside loop body, every line runs constant time except Line 12 which needs O(log p) by using binary search. The total time is p log p + log p + (p − 1) log p = O(p log p).

Furthermore, back to Algorithm 2, for every output of A and B from above, we need to check whether (3.3.4) and (3.3.5) hold. We count P

Li before the algorithm starts. Then count P

j∈A

Uj and P

j∈A

Lj in every loop.

Once Line 8 is executed, count P

j∈B

Therefore, an E-step taking O(p log p) time. There are O(2p) steps in Algorithm 2 with at most O(2p−5) of them can contain an E-step. The generation of regular shapes takes constant time at every step. Therefore the total time is O(2p) + O(2p−5)O(p log p) = O(2p+ p2p−5log p).

3.4 Determining the existence of a

相關文件